Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/declarative-plugin/previewsettings.h
Show All 18 Lines | |||||
19 | */ | 19 | */ | ||
20 | #ifndef KDECOARTIONS_PREVIEW_SETTINGS_H | 20 | #ifndef KDECOARTIONS_PREVIEW_SETTINGS_H | ||
21 | #define KDECOARTIONS_PREVIEW_SETTINGS_H | 21 | #define KDECOARTIONS_PREVIEW_SETTINGS_H | ||
22 | 22 | | |||
23 | #include <KDecoration2/Private/DecorationSettingsPrivate> | 23 | #include <KDecoration2/Private/DecorationSettingsPrivate> | ||
24 | #include <KDecoration2/DecorationSettings> | 24 | #include <KDecoration2/DecorationSettings> | ||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <QAbstractListModel> | 26 | #include <QAbstractListModel> | ||
27 | #include <QColor> | ||||
27 | 28 | | |||
28 | namespace KDecoration2 | 29 | namespace KDecoration2 | ||
29 | { | 30 | { | ||
30 | 31 | | |||
31 | namespace Preview | 32 | namespace Preview | ||
32 | { | 33 | { | ||
33 | class ButtonsModel; | 34 | class ButtonsModel; | ||
34 | class PreviewBridge; | 35 | class PreviewBridge; | ||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | |||||
152 | private: | 153 | private: | ||
153 | void createSettings(); | 154 | void createSettings(); | ||
154 | QPointer<PreviewBridge> m_bridge; | 155 | QPointer<PreviewBridge> m_bridge; | ||
155 | QSharedPointer<KDecoration2::DecorationSettings> m_settings; | 156 | QSharedPointer<KDecoration2::DecorationSettings> m_settings; | ||
156 | PreviewSettings *m_previewSettings = nullptr; | 157 | PreviewSettings *m_previewSettings = nullptr; | ||
157 | int m_borderSize = 3; | 158 | int m_borderSize = 3; | ||
158 | }; | 159 | }; | ||
159 | 160 | | |||
161 | class DecorationPalette : public QObject | ||||
162 | { | ||||
163 | Q_OBJECT | ||||
164 | Q_PROPERTY(KDecoration2::Preview::PreviewBridge *bridge READ bridge WRITE setBridge NOTIFY bridgeChanged) | ||||
165 | Q_PROPERTY(QColor titleBarColor READ titleBarColor NOTIFY titleBarColorChanged) | ||||
166 | Q_PROPERTY(QColor foregroundColor READ foregroundColor NOTIFY foregroundColorChanged) | ||||
167 | public: | ||||
168 | explicit DecorationPalette(QObject *parent = nullptr); | ||||
169 | ~DecorationPalette() override = default; | ||||
170 | | ||||
171 | PreviewBridge *bridge() const; | ||||
172 | void setBridge(PreviewBridge *bridge); | ||||
173 | | ||||
174 | QColor titleBarColor() const {return m_titleBarColor;} | ||||
175 | QColor foregroundColor() const {return m_foregroundColor;} | ||||
176 | Q_SIGNALS: | ||||
177 | void bridgeChanged(); | ||||
178 | void titleBarColorChanged(); | ||||
179 | void foregroundColorChanged(); | ||||
180 | private: | ||||
181 | QPointer<PreviewBridge> m_bridge; | ||||
182 | QColor m_titleBarColor; | ||||
183 | QColor m_foregroundColor; | ||||
184 | }; | ||||
185 | | ||||
160 | } | 186 | } | ||
161 | } | 187 | } | ||
162 | 188 | | |||
163 | #endif | 189 | #endif |