Changeset View
Changeset View
Standalone View
Standalone View
kcms/desktoptheme/kcm.h
Show All 35 Lines | 34 | { | |||
---|---|---|---|---|---|
36 | Q_PROPERTY(QStandardItemModel *desktopThemeModel READ desktopThemeModel CONSTANT) | 36 | Q_PROPERTY(QStandardItemModel *desktopThemeModel READ desktopThemeModel CONSTANT) | ||
37 | Q_PROPERTY(QString selectedPlugin READ selectedPlugin WRITE setSelectedPlugin NOTIFY selectedPluginChanged) | 37 | Q_PROPERTY(QString selectedPlugin READ selectedPlugin WRITE setSelectedPlugin NOTIFY selectedPluginChanged) | ||
38 | Q_PROPERTY(bool canEditThemes READ canEditThemes CONSTANT) | 38 | Q_PROPERTY(bool canEditThemes READ canEditThemes CONSTANT) | ||
39 | 39 | | |||
40 | public: | 40 | public: | ||
41 | enum Roles { | 41 | enum Roles { | ||
42 | PluginNameRole = Qt::UserRole + 1, | 42 | PluginNameRole = Qt::UserRole + 1, | ||
43 | ThemeNameRole, | 43 | ThemeNameRole, | ||
44 | DescriptionRole, | ||||
44 | IsLocalRole | 45 | IsLocalRole | ||
45 | }; | 46 | }; | ||
46 | Q_ENUM(Roles) | 47 | Q_ENUM(Roles) | ||
47 | 48 | | |||
48 | KCMDesktopTheme(QObject *parent, const QVariantList &args); | 49 | KCMDesktopTheme(QObject *parent, const QVariantList &args); | ||
49 | ~KCMDesktopTheme(); | 50 | ~KCMDesktopTheme(); | ||
50 | 51 | | |||
51 | QStandardItemModel *desktopThemeModel() const; | 52 | QStandardItemModel *desktopThemeModel() const; | ||
Show All 9 Lines | |||||
61 | Q_INVOKABLE void applyPlasmaTheme(QQuickItem *item, const QString &themeName); | 62 | Q_INVOKABLE void applyPlasmaTheme(QQuickItem *item, const QString &themeName); | ||
62 | 63 | | |||
63 | Q_INVOKABLE int indexOf(const QString &themeName) const; | 64 | Q_INVOKABLE int indexOf(const QString &themeName) const; | ||
64 | 65 | | |||
65 | Q_INVOKABLE void editTheme(const QString &themeName); | 66 | Q_INVOKABLE void editTheme(const QString &themeName); | ||
66 | 67 | | |||
67 | Q_SIGNALS: | 68 | Q_SIGNALS: | ||
68 | void selectedPluginChanged(const QString &plugin); | 69 | void selectedPluginChanged(const QString &plugin); | ||
69 | void showInfoMessage(const QString &infoMessage); | 70 | void showSuccessMessage(const QString &message); | ||
71 | void showErrorMessage(const QString &message); | ||||
70 | 72 | | |||
71 | public Q_SLOTS: | 73 | public Q_SLOTS: | ||
72 | void load() override; | 74 | void load() override; | ||
73 | void save() override; | 75 | void save() override; | ||
74 | void defaults() override; | 76 | void defaults() override; | ||
75 | 77 | | |||
76 | private: | 78 | private: | ||
77 | void removeThemes(); | 79 | void removeThemes(); | ||
Show All 13 Lines |