File indexing completed on 2024-11-24 04:59:26
0001 /* 0002 SPDX-FileCopyrightText: 2006-2007 Aaron Seigo <aseigo@kde.org> 0003 SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef PLASMA_QUICKTHEME_H 0009 #define PLASMA_QUICKTHEME_H 0010 0011 #include <plasma/theme.h> 0012 0013 #include <QColor> 0014 0015 namespace Plasma 0016 { 0017 /** 0018 * @short Interface to the Plasma theme 0019 * 0020 * 0021 * Plasma::Theme provides access to a common and standardized set of graphic 0022 * elements stored in SVG format. This allows artists to create single packages 0023 * of SVGs that will affect the look and feel of all workspace components. 0024 * 0025 * Plasma::Svg uses Plasma::Theme internally to locate and load the appropriate 0026 * SVG data. Alternatively, Plasma::Theme can be used directly to retrieve 0027 * file system paths to SVGs by name. 0028 * 0029 * <b>Import Statement</b> 0030 * @code import org.kde.plasma.core @endcode 0031 * @version 2.0 0032 */ 0033 class QuickTheme : public Plasma::Theme 0034 { 0035 Q_OBJECT 0036 0037 // colors 0038 Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChangedProxy) 0039 Q_PROPERTY(QColor highlightColor READ highlightColor NOTIFY themeChangedProxy) 0040 Q_PROPERTY(QColor highlightedTextColor READ highlightedTextColor NOTIFY themeChangedProxy) 0041 Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY themeChangedProxy) 0042 Q_PROPERTY(QColor linkColor READ linkColor NOTIFY themeChangedProxy) 0043 Q_PROPERTY(QColor visitedLinkColor READ visitedLinkColor NOTIFY themeChangedProxy) 0044 Q_PROPERTY(QColor positiveTextColor READ positiveTextColor NOTIFY themeChangedProxy) 0045 Q_PROPERTY(QColor neutralTextColor READ neutralTextColor NOTIFY themeChangedProxy) 0046 Q_PROPERTY(QColor negativeTextColor READ negativeTextColor NOTIFY themeChangedProxy) 0047 Q_PROPERTY(QColor disabledTextColor READ disabledTextColor NOTIFY themeChangedProxy) 0048 0049 Q_PROPERTY(QColor buttonTextColor READ buttonTextColor NOTIFY themeChangedProxy) 0050 Q_PROPERTY(QColor buttonBackgroundColor READ buttonBackgroundColor NOTIFY themeChangedProxy) 0051 Q_PROPERTY(QColor buttonHoverColor READ buttonHoverColor NOTIFY themeChangedProxy) 0052 Q_PROPERTY(QColor buttonFocusColor READ buttonFocusColor NOTIFY themeChangedProxy) 0053 Q_PROPERTY(QColor buttonHighlightedTextColor READ buttonHighlightedTextColor NOTIFY themeChangedProxy) 0054 Q_PROPERTY(QColor buttonPositiveTextColor READ buttonPositiveTextColor NOTIFY themeChangedProxy) 0055 Q_PROPERTY(QColor buttonNeutralTextColor READ buttonNeutralTextColor NOTIFY themeChangedProxy) 0056 Q_PROPERTY(QColor buttonNegativeTextColor READ buttonNegativeTextColor NOTIFY themeChangedProxy) 0057 0058 Q_PROPERTY(QColor viewTextColor READ viewTextColor NOTIFY themeChangedProxy) 0059 Q_PROPERTY(QColor viewBackgroundColor READ viewBackgroundColor NOTIFY themeChangedProxy) 0060 Q_PROPERTY(QColor viewHoverColor READ viewHoverColor NOTIFY themeChangedProxy) 0061 Q_PROPERTY(QColor viewFocusColor READ viewFocusColor NOTIFY themeChangedProxy) 0062 Q_PROPERTY(QColor viewHighlightedTextColor READ viewHighlightedTextColor NOTIFY themeChangedProxy) 0063 Q_PROPERTY(QColor viewPositiveTextColor READ viewPositiveTextColor NOTIFY themeChangedProxy) 0064 Q_PROPERTY(QColor viewNeutralTextColor READ viewNeutralTextColor NOTIFY themeChangedProxy) 0065 Q_PROPERTY(QColor viewNegativeTextColor READ viewNegativeTextColor NOTIFY themeChangedProxy) 0066 0067 Q_PROPERTY(QColor complementaryTextColor READ complementaryTextColor NOTIFY themeChangedProxy) 0068 Q_PROPERTY(QColor complementaryBackgroundColor READ complementaryBackgroundColor NOTIFY themeChangedProxy) 0069 Q_PROPERTY(QColor complementaryHoverColor READ complementaryHoverColor NOTIFY themeChangedProxy) 0070 Q_PROPERTY(QColor complementaryFocusColor READ complementaryFocusColor NOTIFY themeChangedProxy) 0071 Q_PROPERTY(QColor complementaryHighlightedTextColor READ complementaryHighlightedTextColor NOTIFY themeChangedProxy) 0072 Q_PROPERTY(QColor complementaryPositiveTextColor READ complementaryPositiveTextColor NOTIFY themeChangedProxy) 0073 Q_PROPERTY(QColor complementaryNeutralTextColor READ complementaryNeutralTextColor NOTIFY themeChangedProxy) 0074 Q_PROPERTY(QColor complementaryNegativeTextColor READ complementaryNegativeTextColor NOTIFY themeChangedProxy) 0075 0076 Q_PROPERTY(QColor headerTextColor READ headerTextColor NOTIFY themeChangedProxy) 0077 Q_PROPERTY(QColor headerBackgroundColor READ headerBackgroundColor NOTIFY themeChangedProxy) 0078 Q_PROPERTY(QColor headerHoverColor READ headerHoverColor NOTIFY themeChangedProxy) 0079 Q_PROPERTY(QColor headerFocusColor READ headerFocusColor NOTIFY themeChangedProxy) 0080 Q_PROPERTY(QColor headerHighlightedTextColor READ headerHighlightedTextColor NOTIFY themeChangedProxy) 0081 Q_PROPERTY(QColor headerPositiveTextColor READ headerPositiveTextColor NOTIFY themeChangedProxy) 0082 Q_PROPERTY(QColor headerNeutralTextColor READ headerNeutralTextColor NOTIFY themeChangedProxy) 0083 Q_PROPERTY(QColor headerNegativeTextColor READ headerNegativeTextColor NOTIFY themeChangedProxy) 0084 0085 public: 0086 explicit QuickTheme(QObject *parent = nullptr); 0087 ~QuickTheme() override; 0088 0089 /** 0090 * @return The theme's colorscheme's text color 0091 * @since 5.0 0092 */ 0093 QColor textColor() const; 0094 0095 /** 0096 * @return The theme's colorscheme's highlight color 0097 * @since 5.0 0098 */ 0099 QColor highlightColor() const; 0100 0101 /** 0102 * @return The theme's colorscheme's highlighted text color 0103 * @since 5.22 0104 */ 0105 QColor highlightedTextColor() const; 0106 0107 /** 0108 * @return The theme's colorscheme's positive text color 0109 * @since 5.22 0110 */ 0111 QColor positiveTextColor() const; 0112 0113 /** 0114 * @return The theme's colorscheme's neutral text color 0115 * @since 5.22 0116 */ 0117 QColor neutralTextColor() const; 0118 0119 /** 0120 * @return The theme's colorscheme's negative text color 0121 * @since 5.22 0122 */ 0123 QColor negativeTextColor() const; 0124 0125 /** 0126 * @return The theme's colorscheme's disabled text color 0127 * @since 5.64 0128 */ 0129 QColor disabledTextColor() const; 0130 0131 /** 0132 * @return The theme's colorscheme's background color 0133 * @since 5.0 0134 */ 0135 QColor backgroundColor() const; 0136 0137 /** 0138 * @return The theme's colorscheme's color for text on buttons 0139 * @since 5.0 0140 */ 0141 QColor buttonTextColor() const; 0142 0143 /** 0144 * @return The theme's colorscheme's background color color of buttons 0145 * @since 5.0 0146 */ 0147 QColor buttonBackgroundColor() const; 0148 0149 /** 0150 * @return The theme's colorscheme's positive text color of buttons 0151 * @since 5.22 0152 */ 0153 QColor buttonPositiveTextColor() const; 0154 0155 /** 0156 * @return The theme's colorscheme's neutral text color of buttons 0157 * @since 5.22 0158 */ 0159 QColor buttonNeutralTextColor() const; 0160 0161 /** 0162 * @return The theme's colorscheme's negative text color of buttons 0163 * @since 5.22 0164 */ 0165 QColor buttonNegativeTextColor() const; 0166 0167 /** 0168 * @return The theme's colorscheme's link color 0169 * @since 5.0 0170 */ 0171 QColor linkColor() const; 0172 0173 /** 0174 * @return The theme's colorscheme's text color for visited links 0175 * @since 5.0 0176 */ 0177 QColor visitedLinkColor() const; 0178 0179 /** 0180 * @return The theme's colorscheme's color of hovered buttons 0181 * @since 5.0 0182 */ 0183 QColor buttonHoverColor() const; 0184 0185 /** 0186 * @return The theme's colorscheme's color of focused buttons 0187 * @since 5.0 0188 */ 0189 QColor buttonFocusColor() const; 0190 0191 /** 0192 * @return The theme's colorscheme's highlighted text color for buttons 0193 * @since 5.22 0194 */ 0195 QColor buttonHighlightedTextColor() const; 0196 0197 /** 0198 * @return The theme's colorscheme's text color in views 0199 * @since 5.0 0200 */ 0201 QColor viewTextColor() const; 0202 0203 /** 0204 * @return The theme's colorscheme's background color of views 0205 * @since 5.0 0206 */ 0207 QColor viewBackgroundColor() const; 0208 0209 /** 0210 * @return The theme's colorscheme's color of hovered views 0211 * @since 5.0 0212 */ 0213 QColor viewHoverColor() const; 0214 0215 /** 0216 * @return The theme's colorscheme's color of focused views 0217 * @since 5.0 0218 */ 0219 QColor viewFocusColor() const; 0220 0221 /** 0222 * @return The theme's colorscheme's highlighted text color for views 0223 * @since 5.22 0224 */ 0225 QColor viewHighlightedTextColor() const; 0226 0227 /** 0228 * @return The theme's colorscheme's positive text color of view 0229 * @since 5.22 0230 */ 0231 QColor viewPositiveTextColor() const; 0232 0233 /** 0234 * @return The theme's colorscheme's neutral text color of view 0235 * @since 5.22 0236 */ 0237 QColor viewNeutralTextColor() const; 0238 0239 /** 0240 * @return The theme's colorscheme's negative text color of view 0241 * @since 5.22 0242 */ 0243 QColor viewNegativeTextColor() const; 0244 0245 /** 0246 * @return The theme's colorscheme's text color of "complementary" areas 0247 * @since 5.0 0248 */ 0249 QColor complementaryTextColor() const; 0250 0251 /** 0252 * @return The theme's colorscheme's background color of "complementary" areas 0253 * @since 5.0 0254 */ 0255 QColor complementaryBackgroundColor() const; 0256 0257 /** 0258 * @return The theme's colorscheme's color of hovered "complementary" areas 0259 * @since 5.0 0260 */ 0261 QColor complementaryHoverColor() const; 0262 0263 /** 0264 * @return The theme's colorscheme's color of focused "complementary" areas 0265 * @since 5.0 0266 */ 0267 QColor complementaryFocusColor() const; 0268 0269 /** 0270 * @return The theme's colorscheme's highlighted text color for "complementary" areas 0271 * @since 5.22 0272 */ 0273 QColor complementaryHighlightedTextColor() const; 0274 0275 /** 0276 * @return The theme's colorscheme's positive text color of complementary 0277 * @since 5.22 0278 */ 0279 QColor complementaryPositiveTextColor() const; 0280 0281 /** 0282 * @return The theme's colorscheme's neutral text color of complementary 0283 * @since 5.22 0284 */ 0285 QColor complementaryNeutralTextColor() const; 0286 0287 /** 0288 * @return The theme's colorscheme's negative text color of complementary 0289 * @since 5.22 0290 */ 0291 QColor complementaryNegativeTextColor() const; 0292 0293 /** 0294 * @return The theme's colorscheme's text color of "header" areas 0295 * @since 5.0 0296 */ 0297 QColor headerTextColor() const; 0298 0299 /** 0300 * @return The theme's colorscheme's background color of "header" areas 0301 * @since 5.0 0302 */ 0303 QColor headerBackgroundColor() const; 0304 0305 /** 0306 * @return The theme's colorscheme's color of hovered "header" areas 0307 * @since 5.0 0308 */ 0309 QColor headerHoverColor() const; 0310 0311 /** 0312 * @return The theme's colorscheme's color of focused "header" areas 0313 * @since 5.0 0314 */ 0315 QColor headerFocusColor() const; 0316 0317 /** 0318 * @return The theme's colorscheme's highlighted text color for "header" areas 0319 * @since 5.22 0320 */ 0321 QColor headerHighlightedTextColor() const; 0322 0323 /** 0324 * @return The theme's colorscheme's positive text color of header 0325 * @since 5.22 0326 */ 0327 QColor headerPositiveTextColor() const; 0328 0329 /** 0330 * @return The theme's colorscheme's neutral text color of header 0331 * @since 5.22 0332 */ 0333 QColor headerNeutralTextColor() const; 0334 0335 /** 0336 * @return The theme's colorscheme's negative text color of header 0337 * @since 5.22 0338 */ 0339 QColor headerNegativeTextColor() const; 0340 0341 Q_SIGNALS: 0342 void themeChangedProxy(); 0343 }; 0344 0345 } // Plasma namespace 0346 0347 #endif // multiple inclusion guard