Changeset View
Changeset View
Standalone View
Standalone View
kcms/ksplash/kcm.h
Show All 28 Lines | |||||
29 | class QStandardItemModel; | 29 | class QStandardItemModel; | ||
30 | 30 | | |||
31 | class KCMSplashScreen : public KQuickAddons::ConfigModule | 31 | class KCMSplashScreen : public KQuickAddons::ConfigModule | ||
32 | { | 32 | { | ||
33 | Q_OBJECT | 33 | Q_OBJECT | ||
34 | Q_PROPERTY(QStandardItemModel *splashModel READ splashModel CONSTANT) | 34 | Q_PROPERTY(QStandardItemModel *splashModel READ splashModel CONSTANT) | ||
35 | Q_PROPERTY(QString selectedPlugin READ selectedPlugin WRITE setSelectedPlugin NOTIFY selectedPluginChanged) | 35 | Q_PROPERTY(QString selectedPlugin READ selectedPlugin WRITE setSelectedPlugin NOTIFY selectedPluginChanged) | ||
36 | Q_PROPERTY(int selectedPluginIndex READ selectedPluginIndex NOTIFY selectedPluginIndexChanged) | 36 | Q_PROPERTY(int selectedPluginIndex READ selectedPluginIndex NOTIFY selectedPluginIndexChanged) | ||
37 | Q_PROPERTY(bool testing READ testing NOTIFY testingChanged) | ||||
37 | 38 | | |||
38 | public: | 39 | public: | ||
39 | enum Roles { | 40 | enum Roles { | ||
40 | PluginNameRole = Qt::UserRole +1, | 41 | PluginNameRole = Qt::UserRole +1, | ||
41 | ScreenhotRole, | 42 | ScreenhotRole, | ||
42 | DescriptionRole | 43 | DescriptionRole | ||
43 | }; | 44 | }; | ||
44 | KCMSplashScreen(QObject* parent, const QVariantList& args); | 45 | KCMSplashScreen(QObject* parent, const QVariantList& args); | ||
45 | 46 | | |||
46 | QList<Plasma::Package> availablePackages(const QString &component); | 47 | QList<Plasma::Package> availablePackages(const QString &component); | ||
47 | 48 | | |||
48 | QStandardItemModel *splashModel(); | 49 | QStandardItemModel *splashModel(); | ||
49 | 50 | | |||
50 | QString selectedPlugin() const; | 51 | QString selectedPlugin() const; | ||
51 | void setSelectedPlugin(const QString &plugin); | 52 | void setSelectedPlugin(const QString &plugin); | ||
52 | 53 | | |||
53 | int selectedPluginIndex() const; | 54 | int selectedPluginIndex() const; | ||
54 | 55 | | |||
56 | bool testing() const; | ||||
57 | | ||||
55 | void loadModel(); | 58 | void loadModel(); | ||
56 | 59 | | |||
57 | public Q_SLOTS: | 60 | public Q_SLOTS: | ||
58 | void getNewClicked(); | 61 | void getNewClicked(); | ||
59 | void load() override; | 62 | void load() override; | ||
60 | void save() override; | 63 | void save() override; | ||
61 | void defaults() override; | 64 | void defaults() override; | ||
62 | void test(const QString &plugin); | 65 | void test(const QString &plugin); | ||
63 | 66 | | |||
64 | Q_SIGNALS: | 67 | Q_SIGNALS: | ||
65 | void selectedPluginChanged(); | 68 | void selectedPluginChanged(); | ||
66 | void selectedPluginIndexChanged(); | 69 | void selectedPluginIndexChanged(); | ||
67 | 70 | | |||
71 | void testingChanged(); | ||||
72 | void testingFailed(); | ||||
73 | | ||||
68 | private: | 74 | private: | ||
69 | QStandardItemModel *m_model; | 75 | QStandardItemModel *m_model; | ||
70 | Plasma::Package m_package; | 76 | Plasma::Package m_package; | ||
71 | QString m_selectedPlugin; | 77 | QString m_selectedPlugin; | ||
72 | 78 | | |||
79 | QProcess *m_testProcess = nullptr; | ||||
80 | | ||||
73 | KConfig m_config; | 81 | KConfig m_config; | ||
74 | KConfigGroup m_configGroup; | 82 | KConfigGroup m_configGroup; | ||
75 | }; | 83 | }; | ||
76 | 84 | | |||
77 | #endif | 85 | #endif |