Changeset View
Changeset View
Standalone View
Standalone View
kded/gtkconfig.h
Show All 20 Lines | |||||
21 | 21 | | |||
22 | #pragma once | 22 | #pragma once | ||
23 | 23 | | |||
24 | #include <KDEDModule> | 24 | #include <KDEDModule> | ||
25 | #include <KConfigWatcher> | 25 | #include <KConfigWatcher> | ||
26 | 26 | | |||
27 | #include "configeditor.h" | 27 | #include "configeditor.h" | ||
28 | #include "configvalueprovider.h" | 28 | #include "configvalueprovider.h" | ||
29 | #include "themepreviewer.h" | ||||
29 | 30 | | |||
30 | class Q_DECL_EXPORT GtkConfig : public KDEDModule | 31 | class Q_DECL_EXPORT GtkConfig : public KDEDModule | ||
31 | { | 32 | { | ||
32 | Q_OBJECT | 33 | Q_OBJECT | ||
34 | Q_CLASSINFO("D-Bus Interface", "org.kde.GtkConfig") | ||||
33 | 35 | | |||
34 | enum class SettingsChangeType { | 36 | enum class SettingsChangeType { | ||
35 | Palette = 0, | 37 | Palette = 0, | ||
36 | Font, | 38 | Font, | ||
37 | Style, | 39 | Style, | ||
38 | Settings, | 40 | Settings, | ||
39 | Icon, | 41 | Icon, | ||
40 | Cursor, | 42 | Cursor, | ||
Show All 10 Lines | 48 | enum class SettingsCategory { | |||
51 | Qt, | 53 | Qt, | ||
52 | Shortcuts, | 54 | Shortcuts, | ||
53 | Locale, | 55 | Locale, | ||
54 | Style | 56 | Style | ||
55 | }; | 57 | }; | ||
56 | 58 | | |||
57 | public: | 59 | public: | ||
58 | GtkConfig(QObject *parent, const QVariantList& args); | 60 | GtkConfig(QObject *parent, const QVariantList& args); | ||
61 | ~GtkConfig(); | ||||
59 | 62 | | |||
60 | void setFont() const; | 63 | void setFont() const; | ||
61 | void setIconTheme(int iconGroup) const; | 64 | void setIconTheme(int iconGroup) const; | ||
62 | void setCursorTheme() const; | 65 | void setCursorTheme() const; | ||
63 | void setIconsOnButtons() const; | 66 | void setIconsOnButtons() const; | ||
64 | void setIconsInMenus() const; | 67 | void setIconsInMenus() const; | ||
65 | void setToolbarStyle() const; | 68 | void setToolbarStyle() const; | ||
66 | void setScrollbarBehavior() const; | 69 | void setScrollbarBehavior() const; | ||
67 | void setDarkThemePreference() const; | 70 | void setDarkThemePreference() const; | ||
68 | void setWindowDecorationsButtonsOrder() const; | 71 | void setWindowDecorationsButtonsOrder() const; | ||
69 | 72 | | |||
70 | void applyAllSettings() const; | 73 | void applyAllSettings() const; | ||
71 | 74 | | |||
72 | public Q_SLOTS: | 75 | public Q_SLOTS: | ||
76 | Q_SCRIPTABLE void setGtk2Theme(const QString &themeName) const; | ||||
77 | Q_SCRIPTABLE void setGtk3Theme(const QString &themeName) const; | ||||
78 | | ||||
79 | Q_SCRIPTABLE QString gtk2Theme() const; | ||||
80 | Q_SCRIPTABLE QString gtk3Theme() const; | ||||
81 | | ||||
82 | Q_SCRIPTABLE void showGtk2ThemePreview(const QString &themeName) const; | ||||
83 | Q_SCRIPTABLE void showGtk3ThemePreview(const QString &themeName) const; | ||||
84 | | ||||
73 | void onGlobalSettingsChange(int settingsChangeType, int arg) const; | 85 | void onGlobalSettingsChange(int settingsChangeType, int arg) const; | ||
74 | void onKWinSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const; | 86 | void onKWinSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const; | ||
75 | 87 | | |||
76 | private: | 88 | private: | ||
77 | QScopedPointer<ConfigValueProvider> configValueProvider; | 89 | QScopedPointer<ConfigValueProvider> configValueProvider; | ||
90 | QScopedPointer<ThemePreviewer> themePreviewer; | ||||
78 | KConfigWatcher::Ptr kwinConfigWatcher; | 91 | KConfigWatcher::Ptr kwinConfigWatcher; | ||
79 | }; | 92 | }; |