Changeset View
Changeset View
Standalone View
Standalone View
kcms/style/gtkpage.h
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #pragma once | 21 | #pragma once | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QDBusInterface> | 24 | #include <QDBusInterface> | ||
25 | #include <QQmlListReference> | ||||
25 | 26 | | |||
26 | #include "gtkthemesmodel.h" | 27 | #include "gtkthemesmodel.h" | ||
27 | 28 | | |||
28 | class GtkPage : public QObject | 29 | class GtkPage : public QObject | ||
29 | { | 30 | { | ||
30 | Q_OBJECT | 31 | Q_OBJECT | ||
31 | 32 | | |||
32 | Q_PROPERTY(GtkThemesModel *gtk2ThemesModel MEMBER m_gtk2ThemesModel NOTIFY gtk2ThemesModelChanged) | 33 | Q_PROPERTY(GtkThemesModel *gtk2ThemesModel MEMBER m_gtk2ThemesModel NOTIFY gtk2ThemesModelChanged) | ||
33 | Q_PROPERTY(GtkThemesModel *gtk3ThemesModel MEMBER m_gtk3ThemesModel NOTIFY gtk3ThemesModelChanged) | 34 | Q_PROPERTY(GtkThemesModel *gtk3ThemesModel MEMBER m_gtk3ThemesModel NOTIFY gtk3ThemesModelChanged) | ||
34 | 35 | | |||
35 | public: | 36 | public: | ||
36 | GtkPage(QObject *parent = nullptr); | 37 | GtkPage(QObject *parent = nullptr); | ||
37 | ~GtkPage() override; | 38 | ~GtkPage() override; | ||
38 | 39 | | |||
39 | void load(); | 40 | void load(); | ||
40 | void save(); | 41 | void save(); | ||
41 | void defaults(); | 42 | void defaults(); | ||
42 | 43 | | |||
43 | public Q_SLOTS: | 44 | public Q_SLOTS: | ||
44 | QString gtk2ThemeFromConfig(); | 45 | QString gtk2ThemeFromConfig(); | ||
45 | QString gtk3ThemeFromConfig(); | 46 | QString gtk3ThemeFromConfig(); | ||
46 | 47 | | |||
48 | bool gtk2PreviewAvailable(); | ||||
49 | bool gtk3PreviewAvailable(); | ||||
50 | | ||||
47 | void showGtk2Preview(); | 51 | void showGtk2Preview(); | ||
48 | void showGtk3Preview(); | 52 | void showGtk3Preview(); | ||
49 | 53 | | |||
50 | void installGtkThemeFromFile(const QUrl &fileUrl); | 54 | void installGtkThemeFromFile(const QUrl &fileUrl); | ||
51 | void installGtk2ThemeFromGHNS(); | | |||
52 | void installGtk3ThemeFromGHNS(); | | |||
53 | 55 | | |||
54 | void onThemeRemoved(); | 56 | void onThemeRemoved(); | ||
57 | void onGhnsEntriesChanged(const QQmlListReference &changedEnties); | ||||
55 | 58 | | |||
56 | Q_SIGNALS: | 59 | Q_SIGNALS: | ||
57 | void gtk2ThemesModelChanged(GtkThemesModel *model); | 60 | void gtk2ThemesModelChanged(GtkThemesModel *model); | ||
58 | void gtk3ThemesModelChanged(GtkThemesModel *model); | 61 | void gtk3ThemesModelChanged(GtkThemesModel *model); | ||
59 | 62 | | |||
60 | void showErrorMessage(const QString &message); | 63 | void showErrorMessage(const QString &message); | ||
61 | void selectGtk2ThemeInCombobox(const QString &themeName); | 64 | void selectGtk2ThemeInCombobox(const QString &themeName); | ||
62 | void selectGtk3ThemeInCombobox(const QString &themeName); | 65 | void selectGtk3ThemeInCombobox(const QString &themeName); | ||
Show All 9 Lines |