Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/private/theme_p.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
53 | enum CacheType { | 53 | enum CacheType { | ||
54 | NoCache = 0, | 54 | NoCache = 0, | ||
55 | PixmapCache = 1, | 55 | PixmapCache = 1, | ||
56 | SvgElementsCache = 2 | 56 | SvgElementsCache = 2 | ||
57 | }; | 57 | }; | ||
58 | Q_DECLARE_FLAGS(CacheTypes, CacheType) | 58 | Q_DECLARE_FLAGS(CacheTypes, CacheType) | ||
59 | Q_DECLARE_OPERATORS_FOR_FLAGS(CacheTypes) | 59 | Q_DECLARE_OPERATORS_FOR_FLAGS(CacheTypes) | ||
60 | 60 | | |||
61 | class ThemePrivate : public QObject | 61 | class ThemePrivate : public QObject, public QSharedData | ||
62 | { | 62 | { | ||
63 | Q_OBJECT | 63 | Q_OBJECT | ||
64 | 64 | | |||
65 | public: | 65 | public: | ||
66 | explicit ThemePrivate(QObject *parent = nullptr); | 66 | explicit ThemePrivate(QObject *parent = nullptr); | ||
67 | ~ThemePrivate() override; | 67 | ~ThemePrivate() override; | ||
68 | 68 | | |||
69 | KConfigGroup &config(); | 69 | KConfigGroup &config(); | ||
Show All 32 Lines | 101 | public: | |||
102 | static const char defaultTheme[]; | 102 | static const char defaultTheme[]; | ||
103 | static const char systemColorsTheme[]; | 103 | static const char systemColorsTheme[]; | ||
104 | static const char themeRcFile[]; | 104 | static const char themeRcFile[]; | ||
105 | #if HAVE_X11 | 105 | #if HAVE_X11 | ||
106 | static EffectWatcher *s_backgroundContrastEffectWatcher; | 106 | static EffectWatcher *s_backgroundContrastEffectWatcher; | ||
107 | #endif | 107 | #endif | ||
108 | //Ref counting of ThemePrivate instances | 108 | //Ref counting of ThemePrivate instances | ||
109 | static ThemePrivate *globalTheme; | 109 | static ThemePrivate *globalTheme; | ||
110 | static QAtomicInt globalThemeRefCount; | | |||
111 | static QHash<QString, ThemePrivate *> themes; | 110 | static QHash<QString, ThemePrivate *> themes; | ||
112 | static QHash<QString, QAtomicInt> themesRefCount; | | |||
113 | 111 | | |||
114 | QString themeName; | 112 | QString themeName; | ||
115 | KPluginInfo pluginInfo; | 113 | KPluginInfo pluginInfo; | ||
116 | QList<QString> fallbackThemes; | 114 | QList<QString> fallbackThemes; | ||
117 | KSharedConfigPtr colors; | 115 | KSharedConfigPtr colors; | ||
118 | KColorScheme colorScheme; | 116 | KColorScheme colorScheme; | ||
119 | KColorScheme selectionColorScheme; | 117 | KColorScheme selectionColorScheme; | ||
120 | KColorScheme buttonColorScheme; | 118 | KColorScheme buttonColorScheme; | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |