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