Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/kcmcursortheme.h
Show All 14 Lines | |||||
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KCMCURSORTHEME_H | 20 | #ifndef KCMCURSORTHEME_H | ||
21 | #define KCMCURSORTHEME_H | 21 | #define KCMCURSORTHEME_H | ||
22 | 22 | | |||
23 | #include <KQuickAddons/ConfigModule> | 23 | #include <KQuickAddons/ManagedConfigModule> | ||
24 | #include <QScopedPointer> | 24 | #include <QScopedPointer> | ||
25 | 25 | | |||
26 | class QStandardItemModel; | 26 | class QStandardItemModel; | ||
27 | class QTemporaryFile; | 27 | class QTemporaryFile; | ||
28 | 28 | | |||
29 | class CursorThemeModel; | 29 | class CursorThemeModel; | ||
30 | class SortProxyModel; | 30 | class SortProxyModel; | ||
31 | class CursorTheme; | 31 | class CursorTheme; | ||
32 | class CursorThemeSettings; | 32 | class CursorThemeSettings; | ||
33 | 33 | | |||
34 | namespace KIO | 34 | namespace KIO | ||
35 | { | 35 | { | ||
36 | class FileCopyJob; | 36 | class FileCopyJob; | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | class CursorThemeConfig : public KQuickAddons::ConfigModule | 39 | class CursorThemeConfig : public KQuickAddons::ManagedConfigModule | ||
40 | { | 40 | { | ||
41 | Q_OBJECT | 41 | Q_OBJECT | ||
42 | Q_PROPERTY(CursorThemeSettings *cursorThemeSettings READ cursorThemeSettings CONSTANT) | 42 | Q_PROPERTY(CursorThemeSettings *cursorThemeSettings READ cursorThemeSettings CONSTANT) | ||
43 | Q_PROPERTY(bool canInstall READ canInstall WRITE setCanInstall NOTIFY canInstallChanged) | 43 | Q_PROPERTY(bool canInstall READ canInstall WRITE setCanInstall NOTIFY canInstallChanged) | ||
44 | Q_PROPERTY(bool canResize READ canResize WRITE setCanResize NOTIFY canResizeChanged) | 44 | Q_PROPERTY(bool canResize READ canResize WRITE setCanResize NOTIFY canResizeChanged) | ||
45 | Q_PROPERTY(bool canConfigure READ canConfigure WRITE setCanConfigure NOTIFY canConfigureChanged) | 45 | Q_PROPERTY(bool canConfigure READ canConfigure WRITE setCanConfigure NOTIFY canConfigureChanged) | ||
46 | Q_PROPERTY(QAbstractItemModel *cursorsModel READ cursorsModel CONSTANT) | 46 | Q_PROPERTY(QAbstractItemModel *cursorsModel READ cursorsModel CONSTANT) | ||
47 | Q_PROPERTY(QAbstractItemModel *sizesModel READ sizesModel CONSTANT) | 47 | Q_PROPERTY(QAbstractItemModel *sizesModel READ sizesModel CONSTANT) | ||
Show All 33 Lines | 52 | public: | |||
81 | Q_INVOKABLE int cursorSizeFromIndex(int index); | 81 | Q_INVOKABLE int cursorSizeFromIndex(int index); | ||
82 | Q_INVOKABLE int cursorThemeIndex(const QString &cursorTheme) const; | 82 | Q_INVOKABLE int cursorThemeIndex(const QString &cursorTheme) const; | ||
83 | Q_INVOKABLE QString cursorThemeFromIndex(int index) const; | 83 | Q_INVOKABLE QString cursorThemeFromIndex(int index) const; | ||
84 | 84 | | |||
85 | Q_SIGNALS: | 85 | Q_SIGNALS: | ||
86 | void canInstallChanged(); | 86 | void canInstallChanged(); | ||
87 | void canResizeChanged(); | 87 | void canResizeChanged(); | ||
88 | void canConfigureChanged(); | 88 | void canConfigureChanged(); | ||
89 | void selectedSizeRowChanged(); | | |||
90 | void downloadingFileChanged(); | 89 | void downloadingFileChanged(); | ||
91 | void preferredSizeChanged(); | 90 | void preferredSizeChanged(); | ||
92 | void themeApplied(); | 91 | void themeApplied(); | ||
93 | 92 | | |||
94 | void showSuccessMessage(const QString &message); | 93 | void showSuccessMessage(const QString &message); | ||
95 | void showInfoMessage(const QString &message); | 94 | void showInfoMessage(const QString &message); | ||
96 | void showErrorMessage(const QString &message); | 95 | void showErrorMessage(const QString &message); | ||
97 | 96 | | |||
Show All 40 Lines | 130 | /** Holds the last size that was chosen by the user. Example: The user chooses | |||
138 | int m_preferredSize; | 137 | int m_preferredSize; | ||
139 | 138 | | |||
140 | bool m_canInstall; | 139 | bool m_canInstall; | ||
141 | bool m_canResize; | 140 | bool m_canResize; | ||
142 | bool m_canConfigure; | 141 | bool m_canConfigure; | ||
143 | 142 | | |||
144 | QScopedPointer<QTemporaryFile> m_tempInstallFile; | 143 | QScopedPointer<QTemporaryFile> m_tempInstallFile; | ||
145 | QPointer<KIO::FileCopyJob> m_tempCopyJob; | 144 | QPointer<KIO::FileCopyJob> m_tempCopyJob; | ||
146 | | ||||
147 | int m_currentSize; | | |||
148 | QString m_currentTheme; | | |||
149 | }; | 145 | }; | ||
150 | 146 | | |||
151 | #endif | 147 | #endif |