Changeset View
Changeset View
Standalone View
Standalone View
src/libkirigami/platformtheme.h
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 36 | { | |||
---|---|---|---|---|---|
163 | 163 | | |||
164 | /** | 164 | /** | ||
165 | * A decoration color that indicates mouse hovering | 165 | * A decoration color that indicates mouse hovering | ||
166 | */ | 166 | */ | ||
167 | Q_PROPERTY(QColor hoverColor READ hoverColor WRITE setCustomHoverColor RESET setCustomHoverColor NOTIFY colorsChanged) | 167 | Q_PROPERTY(QColor hoverColor READ hoverColor WRITE setCustomHoverColor RESET setCustomHoverColor NOTIFY colorsChanged) | ||
168 | 168 | | |||
169 | // font and palette | 169 | // font and palette | ||
170 | Q_PROPERTY(QFont defaultFont READ defaultFont NOTIFY defaultFontChanged) | 170 | Q_PROPERTY(QFont defaultFont READ defaultFont NOTIFY defaultFontChanged) | ||
171 | Q_PROPERTY(QFont smallestFont READ smallestFont NOTIFY smallestFontChanged) | ||||
171 | //Active palette | 172 | //Active palette | ||
172 | Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) | 173 | Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) | ||
173 | 174 | | |||
174 | public: | 175 | public: | ||
175 | 176 | | |||
176 | enum ColorSet { | 177 | enum ColorSet { | ||
177 | View = 0, /** Color set for item views, usually the lightest of all */ | 178 | View = 0, /** Color set for item views, usually the lightest of all */ | ||
178 | Window, /** Default Color set for windows and "chrome" areas */ | 179 | Window, /** Default Color set for windows and "chrome" areas */ | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
225 | QColor neutralBackgroundColor() const; | 226 | QColor neutralBackgroundColor() const; | ||
226 | QColor positiveBackgroundColor() const; | 227 | QColor positiveBackgroundColor() const; | ||
227 | 228 | | |||
228 | //decoration colors | 229 | //decoration colors | ||
229 | QColor focusColor() const; | 230 | QColor focusColor() const; | ||
230 | QColor hoverColor() const; | 231 | QColor hoverColor() const; | ||
231 | 232 | | |||
232 | QFont defaultFont() const; | 233 | QFont defaultFont() const; | ||
234 | QFont smallestFont() const; | ||||
233 | 235 | | |||
234 | //this may is used by the desktop QQC2 to set the styleoption palettes | 236 | //this may is used by the desktop QQC2 to set the styleoption palettes | ||
235 | QPalette palette() const; | 237 | QPalette palette() const; | ||
236 | 238 | | |||
237 | //this will be used by desktopicon to fetch icons with KIconLoader | 239 | //this will be used by desktopicon to fetch icons with KIconLoader | ||
238 | virtual Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent); | 240 | virtual Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent); | ||
239 | 241 | | |||
240 | bool supportsIconColoring() const; | 242 | bool supportsIconColoring() const; | ||
Show All 24 Lines | |||||
265 | 267 | | |||
266 | //QML attached property | 268 | //QML attached property | ||
267 | static PlatformTheme *qmlAttachedProperties(QObject *object); | 269 | static PlatformTheme *qmlAttachedProperties(QObject *object); | ||
268 | 270 | | |||
269 | Q_SIGNALS: | 271 | Q_SIGNALS: | ||
270 | //TODO: parameters to signals as this is also a c++ api | 272 | //TODO: parameters to signals as this is also a c++ api | ||
271 | void colorsChanged(); | 273 | void colorsChanged(); | ||
272 | void defaultFontChanged(const QFont &font); | 274 | void defaultFontChanged(const QFont &font); | ||
275 | void smallestFontChanged(const QFont &font); | ||||
273 | void colorSetChanged(Kirigami::PlatformTheme::ColorSet colorSet); | 276 | void colorSetChanged(Kirigami::PlatformTheme::ColorSet colorSet); | ||
274 | void colorGroupChanged(Kirigami::PlatformTheme::ColorGroup colorGroup); | 277 | void colorGroupChanged(Kirigami::PlatformTheme::ColorGroup colorGroup); | ||
275 | void paletteChanged(const QPalette &pal); | 278 | void paletteChanged(const QPalette &pal); | ||
276 | void inheritChanged(bool inherit); | 279 | void inheritChanged(bool inherit); | ||
277 | 280 | | |||
278 | protected: | 281 | protected: | ||
279 | //Setters, not accessible from QML but from implementations | 282 | //Setters, not accessible from QML but from implementations | ||
280 | void setSupportsIconColoring(bool support); | 283 | void setSupportsIconColoring(bool support); | ||
Show All 39 Lines |