Libplasma

quicktheme.h
1/*
2 SPDX-FileCopyrightText: 2006-2007 Aaron Seigo <aseigo@kde.org>
3 SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef PLASMA_QUICKTHEME_H
9#define PLASMA_QUICKTHEME_H
10
11#include <plasma/theme.h>
12
13#include <QColor>
14#include <QQmlEngine>
15
16namespace Plasma
17{
18/**
19 * @short Interface to the Plasma theme
20 *
21 *
22 * Plasma::Theme provides access to a common and standardized set of graphic
23 * elements stored in SVG format. This allows artists to create single packages
24 * of SVGs that will affect the look and feel of all workspace components.
25 *
26 * Plasma::Svg uses Plasma::Theme internally to locate and load the appropriate
27 * SVG data. Alternatively, Plasma::Theme can be used directly to retrieve
28 * file system paths to SVGs by name.
29 *
30 * <b>Import Statement</b>
31 * @code import org.kde.plasma.core @endcode
32 * @version 2.0
33 */
35{
37 QML_NAMED_ELEMENT(Theme)
38 QML_SINGLETON
39
40 // colors
41 Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChangedProxy)
42 Q_PROPERTY(QColor highlightColor READ highlightColor NOTIFY themeChangedProxy)
43 Q_PROPERTY(QColor highlightedTextColor READ highlightedTextColor NOTIFY themeChangedProxy)
44 Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY themeChangedProxy)
45 Q_PROPERTY(QColor linkColor READ linkColor NOTIFY themeChangedProxy)
46 Q_PROPERTY(QColor visitedLinkColor READ visitedLinkColor NOTIFY themeChangedProxy)
47 Q_PROPERTY(QColor positiveTextColor READ positiveTextColor NOTIFY themeChangedProxy)
48 Q_PROPERTY(QColor neutralTextColor READ neutralTextColor NOTIFY themeChangedProxy)
49 Q_PROPERTY(QColor negativeTextColor READ negativeTextColor NOTIFY themeChangedProxy)
50 Q_PROPERTY(QColor disabledTextColor READ disabledTextColor NOTIFY themeChangedProxy)
51
52 Q_PROPERTY(QColor buttonTextColor READ buttonTextColor NOTIFY themeChangedProxy)
53 Q_PROPERTY(QColor buttonBackgroundColor READ buttonBackgroundColor NOTIFY themeChangedProxy)
54 Q_PROPERTY(QColor buttonHoverColor READ buttonHoverColor NOTIFY themeChangedProxy)
55 Q_PROPERTY(QColor buttonFocusColor READ buttonFocusColor NOTIFY themeChangedProxy)
56 Q_PROPERTY(QColor buttonHighlightedTextColor READ buttonHighlightedTextColor NOTIFY themeChangedProxy)
57 Q_PROPERTY(QColor buttonPositiveTextColor READ buttonPositiveTextColor NOTIFY themeChangedProxy)
58 Q_PROPERTY(QColor buttonNeutralTextColor READ buttonNeutralTextColor NOTIFY themeChangedProxy)
59 Q_PROPERTY(QColor buttonNegativeTextColor READ buttonNegativeTextColor NOTIFY themeChangedProxy)
60
61 Q_PROPERTY(QColor viewTextColor READ viewTextColor NOTIFY themeChangedProxy)
62 Q_PROPERTY(QColor viewBackgroundColor READ viewBackgroundColor NOTIFY themeChangedProxy)
63 Q_PROPERTY(QColor viewHoverColor READ viewHoverColor NOTIFY themeChangedProxy)
64 Q_PROPERTY(QColor viewFocusColor READ viewFocusColor NOTIFY themeChangedProxy)
65 Q_PROPERTY(QColor viewHighlightedTextColor READ viewHighlightedTextColor NOTIFY themeChangedProxy)
66 Q_PROPERTY(QColor viewPositiveTextColor READ viewPositiveTextColor NOTIFY themeChangedProxy)
67 Q_PROPERTY(QColor viewNeutralTextColor READ viewNeutralTextColor NOTIFY themeChangedProxy)
68 Q_PROPERTY(QColor viewNegativeTextColor READ viewNegativeTextColor NOTIFY themeChangedProxy)
69
70 Q_PROPERTY(QColor complementaryTextColor READ complementaryTextColor NOTIFY themeChangedProxy)
71 Q_PROPERTY(QColor complementaryBackgroundColor READ complementaryBackgroundColor NOTIFY themeChangedProxy)
72 Q_PROPERTY(QColor complementaryHoverColor READ complementaryHoverColor NOTIFY themeChangedProxy)
73 Q_PROPERTY(QColor complementaryFocusColor READ complementaryFocusColor NOTIFY themeChangedProxy)
74 Q_PROPERTY(QColor complementaryHighlightedTextColor READ complementaryHighlightedTextColor NOTIFY themeChangedProxy)
75 Q_PROPERTY(QColor complementaryPositiveTextColor READ complementaryPositiveTextColor NOTIFY themeChangedProxy)
76 Q_PROPERTY(QColor complementaryNeutralTextColor READ complementaryNeutralTextColor NOTIFY themeChangedProxy)
77 Q_PROPERTY(QColor complementaryNegativeTextColor READ complementaryNegativeTextColor NOTIFY themeChangedProxy)
78
79 Q_PROPERTY(QColor headerTextColor READ headerTextColor NOTIFY themeChangedProxy)
80 Q_PROPERTY(QColor headerBackgroundColor READ headerBackgroundColor NOTIFY themeChangedProxy)
81 Q_PROPERTY(QColor headerHoverColor READ headerHoverColor NOTIFY themeChangedProxy)
82 Q_PROPERTY(QColor headerFocusColor READ headerFocusColor NOTIFY themeChangedProxy)
83 Q_PROPERTY(QColor headerHighlightedTextColor READ headerHighlightedTextColor NOTIFY themeChangedProxy)
84 Q_PROPERTY(QColor headerPositiveTextColor READ headerPositiveTextColor NOTIFY themeChangedProxy)
85 Q_PROPERTY(QColor headerNeutralTextColor READ headerNeutralTextColor NOTIFY themeChangedProxy)
86 Q_PROPERTY(QColor headerNegativeTextColor READ headerNegativeTextColor NOTIFY themeChangedProxy)
87
88public:
89 explicit QuickTheme(QObject *parent = nullptr);
90 ~QuickTheme() override;
91
92 /**
93 * @return The theme's colorscheme's text color
94 * @since 5.0
95 */
96 QColor textColor() const;
97
98 /**
99 * @return The theme's colorscheme's highlight color
100 * @since 5.0
101 */
102 QColor highlightColor() const;
103
104 /**
105 * @return The theme's colorscheme's highlighted text color
106 * @since 5.22
107 */
108 QColor highlightedTextColor() const;
109
110 /**
111 * @return The theme's colorscheme's positive text color
112 * @since 5.22
113 */
114 QColor positiveTextColor() const;
115
116 /**
117 * @return The theme's colorscheme's neutral text color
118 * @since 5.22
119 */
120 QColor neutralTextColor() const;
121
122 /**
123 * @return The theme's colorscheme's negative text color
124 * @since 5.22
125 */
126 QColor negativeTextColor() const;
127
128 /**
129 * @return The theme's colorscheme's disabled text color
130 * @since 5.64
131 */
132 QColor disabledTextColor() const;
133
134 /**
135 * @return The theme's colorscheme's background color
136 * @since 5.0
137 */
138 QColor backgroundColor() const;
139
140 /**
141 * @return The theme's colorscheme's color for text on buttons
142 * @since 5.0
143 */
144 QColor buttonTextColor() const;
145
146 /**
147 * @return The theme's colorscheme's background color color of buttons
148 * @since 5.0
149 */
150 QColor buttonBackgroundColor() const;
151
152 /**
153 * @return The theme's colorscheme's positive text color of buttons
154 * @since 5.22
155 */
156 QColor buttonPositiveTextColor() const;
157
158 /**
159 * @return The theme's colorscheme's neutral text color of buttons
160 * @since 5.22
161 */
162 QColor buttonNeutralTextColor() const;
163
164 /**
165 * @return The theme's colorscheme's negative text color of buttons
166 * @since 5.22
167 */
168 QColor buttonNegativeTextColor() const;
169
170 /**
171 * @return The theme's colorscheme's link color
172 * @since 5.0
173 */
174 QColor linkColor() const;
175
176 /**
177 * @return The theme's colorscheme's text color for visited links
178 * @since 5.0
179 */
180 QColor visitedLinkColor() const;
181
182 /**
183 * @return The theme's colorscheme's color of hovered buttons
184 * @since 5.0
185 */
186 QColor buttonHoverColor() const;
187
188 /**
189 * @return The theme's colorscheme's color of focused buttons
190 * @since 5.0
191 */
192 QColor buttonFocusColor() const;
193
194 /**
195 * @return The theme's colorscheme's highlighted text color for buttons
196 * @since 5.22
197 */
198 QColor buttonHighlightedTextColor() const;
199
200 /**
201 * @return The theme's colorscheme's text color in views
202 * @since 5.0
203 */
204 QColor viewTextColor() const;
205
206 /**
207 * @return The theme's colorscheme's background color of views
208 * @since 5.0
209 */
210 QColor viewBackgroundColor() const;
211
212 /**
213 * @return The theme's colorscheme's color of hovered views
214 * @since 5.0
215 */
216 QColor viewHoverColor() const;
217
218 /**
219 * @return The theme's colorscheme's color of focused views
220 * @since 5.0
221 */
222 QColor viewFocusColor() const;
223
224 /**
225 * @return The theme's colorscheme's highlighted text color for views
226 * @since 5.22
227 */
228 QColor viewHighlightedTextColor() const;
229
230 /**
231 * @return The theme's colorscheme's positive text color of view
232 * @since 5.22
233 */
234 QColor viewPositiveTextColor() const;
235
236 /**
237 * @return The theme's colorscheme's neutral text color of view
238 * @since 5.22
239 */
240 QColor viewNeutralTextColor() const;
241
242 /**
243 * @return The theme's colorscheme's negative text color of view
244 * @since 5.22
245 */
246 QColor viewNegativeTextColor() const;
247
248 /**
249 * @return The theme's colorscheme's text color of "complementary" areas
250 * @since 5.0
251 */
252 QColor complementaryTextColor() const;
253
254 /**
255 * @return The theme's colorscheme's background color of "complementary" areas
256 * @since 5.0
257 */
258 QColor complementaryBackgroundColor() const;
259
260 /**
261 * @return The theme's colorscheme's color of hovered "complementary" areas
262 * @since 5.0
263 */
264 QColor complementaryHoverColor() const;
265
266 /**
267 * @return The theme's colorscheme's color of focused "complementary" areas
268 * @since 5.0
269 */
270 QColor complementaryFocusColor() const;
271
272 /**
273 * @return The theme's colorscheme's highlighted text color for "complementary" areas
274 * @since 5.22
275 */
276 QColor complementaryHighlightedTextColor() const;
277
278 /**
279 * @return The theme's colorscheme's positive text color of complementary
280 * @since 5.22
281 */
282 QColor complementaryPositiveTextColor() const;
283
284 /**
285 * @return The theme's colorscheme's neutral text color of complementary
286 * @since 5.22
287 */
288 QColor complementaryNeutralTextColor() const;
289
290 /**
291 * @return The theme's colorscheme's negative text color of complementary
292 * @since 5.22
293 */
294 QColor complementaryNegativeTextColor() const;
295
296 /**
297 * @return The theme's colorscheme's text color of "header" areas
298 * @since 5.0
299 */
300 QColor headerTextColor() const;
301
302 /**
303 * @return The theme's colorscheme's background color of "header" areas
304 * @since 5.0
305 */
306 QColor headerBackgroundColor() const;
307
308 /**
309 * @return The theme's colorscheme's color of hovered "header" areas
310 * @since 5.0
311 */
312 QColor headerHoverColor() const;
313
314 /**
315 * @return The theme's colorscheme's color of focused "header" areas
316 * @since 5.0
317 */
318 QColor headerFocusColor() const;
319
320 /**
321 * @return The theme's colorscheme's highlighted text color for "header" areas
322 * @since 5.22
323 */
324 QColor headerHighlightedTextColor() const;
325
326 /**
327 * @return The theme's colorscheme's positive text color of header
328 * @since 5.22
329 */
330 QColor headerPositiveTextColor() const;
331
332 /**
333 * @return The theme's colorscheme's neutral text color of header
334 * @since 5.22
335 */
336 QColor headerNeutralTextColor() const;
337
338 /**
339 * @return The theme's colorscheme's negative text color of header
340 * @since 5.22
341 */
342 QColor headerNegativeTextColor() const;
343
345 void themeChangedProxy();
346};
347
348} // Plasma namespace
349
350#endif // multiple inclusion guard
Interface to the Plasma theme.
Definition quicktheme.h:35
Interface to the Plasma theme.
Definition theme.h:40
Namespace for everything in libplasma.
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:09:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.