Changeset View
Changeset View
Standalone View
Standalone View
kcms/colors/colors.h
Show All 17 Lines | |||||
18 | * You should have received a copy of the GNU General Public License | 18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #pragma once | 22 | #pragma once | ||
23 | 23 | | |||
24 | #include <QScopedPointer> | 24 | #include <QScopedPointer> | ||
25 | #include <QPointer> | 25 | #include <QPointer> | ||
26 | #include <QQmlListReference> | ||||
26 | 27 | | |||
27 | #include <KSharedConfig> | 28 | #include <KSharedConfig> | ||
28 | 29 | | |||
29 | #include <KNewStuff3/KNS3/DownloadDialog> | | |||
30 | 30 | | |||
31 | #include <KQuickAddons/ManagedConfigModule> | 31 | #include <KQuickAddons/ManagedConfigModule> | ||
32 | 32 | | |||
33 | class QProcess; | 33 | class QProcess; | ||
34 | class QTemporaryFile; | 34 | class QTemporaryFile; | ||
35 | 35 | | |||
36 | namespace KIO | 36 | namespace KIO | ||
37 | { | 37 | { | ||
Show All 31 Lines | 54 | public: | |||
69 | }; | 69 | }; | ||
70 | Q_ENUM(SchemeFilter) | 70 | Q_ENUM(SchemeFilter) | ||
71 | 71 | | |||
72 | ColorsModel *model() const; | 72 | ColorsModel *model() const; | ||
73 | FilterProxyModel *filteredModel() const; | 73 | FilterProxyModel *filteredModel() const; | ||
74 | ColorsSettings *colorsSettings() const; | 74 | ColorsSettings *colorsSettings() const; | ||
75 | bool downloadingFile() const; | 75 | bool downloadingFile() const; | ||
76 | 76 | | |||
77 | Q_INVOKABLE void getNewStuff(QQuickItem *ctx); | 77 | Q_INVOKABLE void reloadModel(const QQmlListReference &changedEntries); | ||
78 | Q_INVOKABLE void installSchemeFromFile(const QUrl &url); | 78 | Q_INVOKABLE void installSchemeFromFile(const QUrl &url); | ||
79 | 79 | | |||
80 | Q_INVOKABLE void editScheme(const QString &schemeName, QQuickItem *ctx); | 80 | Q_INVOKABLE void editScheme(const QString &schemeName, QQuickItem *ctx); | ||
81 | 81 | | |||
82 | public Q_SLOTS: | 82 | public Q_SLOTS: | ||
83 | void load() override; | 83 | void load() override; | ||
84 | void save() override; | 84 | void save() override; | ||
85 | 85 | | |||
Show All 16 Lines | 94 | private: | |||
102 | ColorsModel *m_model; | 102 | ColorsModel *m_model; | ||
103 | FilterProxyModel *m_filteredModel; | 103 | FilterProxyModel *m_filteredModel; | ||
104 | ColorsSettings *m_settings; | 104 | ColorsSettings *m_settings; | ||
105 | 105 | | |||
106 | bool m_selectedSchemeDirty = false; | 106 | bool m_selectedSchemeDirty = false; | ||
107 | 107 | | |||
108 | bool m_applyToAlien = true; | 108 | bool m_applyToAlien = true; | ||
109 | 109 | | |||
110 | QPointer<KNS3::DownloadDialog> m_newStuffDialog; | | |||
111 | | ||||
112 | QProcess *m_editDialogProcess = nullptr; | 110 | QProcess *m_editDialogProcess = nullptr; | ||
113 | 111 | | |||
114 | KSharedConfigPtr m_config; | 112 | KSharedConfigPtr m_config; | ||
115 | 113 | | |||
116 | QScopedPointer<QTemporaryFile> m_tempInstallFile; | 114 | QScopedPointer<QTemporaryFile> m_tempInstallFile; | ||
117 | QPointer<KIO::FileCopyJob> m_tempCopyJob; | 115 | QPointer<KIO::FileCopyJob> m_tempCopyJob; | ||
118 | 116 | | |||
119 | }; | 117 | }; |