Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/declarative-plugin/previewbutton.cpp
Show All 18 Lines | |||||
19 | */ | 19 | */ | ||
20 | #include "previewbutton.h" | 20 | #include "previewbutton.h" | ||
21 | #include "previewbridge.h" | 21 | #include "previewbridge.h" | ||
22 | #include "previewclient.h" | 22 | #include "previewclient.h" | ||
23 | #include "previewsettings.h" | 23 | #include "previewsettings.h" | ||
24 | 24 | | |||
25 | #include <KDecoration2/Decoration> | 25 | #include <KDecoration2/Decoration> | ||
26 | 26 | | |||
27 | #include <QDebug> | | |||
28 | 27 | | |||
29 | namespace KDecoration2 | 28 | namespace KDecoration2 | ||
30 | { | 29 | { | ||
31 | 30 | | |||
32 | namespace Preview | 31 | namespace Preview | ||
33 | { | 32 | { | ||
34 | 33 | | |||
35 | PreviewButtonItem::PreviewButtonItem(QQuickItem* parent) | 34 | PreviewButtonItem::PreviewButtonItem(QQuickItem* parent) | ||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 122 | { | |||
127 | m_button->setGeometry(QRect(0, 0, width(), height())); | 126 | m_button->setGeometry(QRect(0, 0, width(), height())); | ||
128 | } | 127 | } | ||
129 | 128 | | |||
130 | void PreviewButtonItem::paint(QPainter *painter) | 129 | void PreviewButtonItem::paint(QPainter *painter) | ||
131 | { | 130 | { | ||
132 | if (!m_button) { | 131 | if (!m_button) { | ||
133 | return; | 132 | return; | ||
134 | } | 133 | } | ||
135 | m_button->paint(painter, QRect(0, 0, width(), height())); | 134 | m_button->paint(painter, QRect(0, 0, width(), height())); | ||
zzag: Doesn't QQuickItem have size() method? | |||||
Everything else can take/return real, but DecorationButton::paint() can only take a QReal so I thought to reduce conversions this way vpilo: Everything else can take/return real, but DecorationButton::paint() can only take a QReal so I… | |||||
136 | } | 135 | } | ||
137 | 136 | | |||
138 | } | 137 | } | ||
139 | } | 138 | } |
Doesn't QQuickItem have size() method?