Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/kcmcursortheme.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright © 2003-2007 Fredrik Höglund <fredrik@kde.org> | 2 | * Copyright © 2003-2007 Fredrik Höglund <fredrik@kde.org> | ||
3 | * Copyright © 2019 Benjamin Port <benjamin.port@enioka.com> | ||||
3 | * | 4 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | 8 | * (at your option) any later version. | ||
8 | * | 9 | * | ||
9 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
Show All 12 Lines | |||||
23 | #include <QScopedPointer> | 24 | #include <QScopedPointer> | ||
24 | 25 | | |||
25 | class QStandardItemModel; | 26 | class QStandardItemModel; | ||
26 | class QTemporaryFile; | 27 | class QTemporaryFile; | ||
27 | 28 | | |||
28 | class CursorThemeModel; | 29 | class CursorThemeModel; | ||
29 | class SortProxyModel; | 30 | class SortProxyModel; | ||
30 | class CursorTheme; | 31 | class CursorTheme; | ||
32 | class CursorThemeSettings; | ||||
31 | 33 | | |||
32 | namespace KIO | 34 | namespace KIO | ||
33 | { | 35 | { | ||
34 | class FileCopyJob; | 36 | class FileCopyJob; | ||
35 | } | 37 | } | ||
36 | 38 | | |||
37 | class CursorThemeConfig : public KQuickAddons::ConfigModule | 39 | class CursorThemeConfig : public KQuickAddons::ConfigModule | ||
38 | { | 40 | { | ||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 115 | @returns If the changes could be applied. Will return \e false if \e theme is | |||
115 | version, otherwise returns \e true. */ | 117 | version, otherwise returns \e true. */ | ||
116 | bool applyTheme(const CursorTheme *theme, const int size); | 118 | bool applyTheme(const CursorTheme *theme, const int size); | ||
117 | bool iconsIsWritable() const; | 119 | bool iconsIsWritable() const; | ||
118 | 120 | | |||
119 | 121 | | |||
120 | CursorThemeModel *m_model; | 122 | CursorThemeModel *m_model; | ||
121 | SortProxyModel *m_proxyModel; | 123 | SortProxyModel *m_proxyModel; | ||
122 | QStandardItemModel *m_sizesModel; | 124 | QStandardItemModel *m_sizesModel; | ||
125 | CursorThemeSettings *m_settings; | ||||
123 | 126 | | |||
124 | int m_appliedSize; | 127 | int m_appliedSize; | ||
125 | // This index refers to the CursorThemeModel, not the proxy or the view | 128 | // This index refers to the CursorThemeModel, not the proxy or the view | ||
126 | QPersistentModelIndex m_appliedIndex; | 129 | QPersistentModelIndex m_appliedIndex; | ||
127 | | ||||
ervin: Why the empty line removal? The previous line is now stuck with the comment. | |||||
128 | /** Holds the last size that was chosen by the user. Example: The user chooses | 130 | /** Holds the last size that was chosen by the user. Example: The user chooses | ||
129 | theme1 which provides the sizes 24 and 36. He chooses 36. preferredSize gets | 131 | theme1 which provides the sizes 24 and 36. He chooses 36. preferredSize gets | ||
130 | set to 36. Now, he switches to theme2 which provides the sizes 30 and 40. | 132 | set to 36. Now, he switches to theme2 which provides the sizes 30 and 40. | ||
131 | preferredSize still is 36, so the UI will default to 40, which is next to 36. | 133 | preferredSize still is 36, so the UI will default to 40, which is next to 36. | ||
132 | Now, he chooses theme3 which provides the sizes 34 and 44. preferredSize is | 134 | Now, he chooses theme3 which provides the sizes 34 and 44. preferredSize is | ||
133 | still 36, so the UI defaults to 34. Now the user changes manually to 44. This | 135 | still 36, so the UI defaults to 34. Now the user changes manually to 44. This | ||
134 | will also change preferredSize. */ | 136 | will also change preferredSize. */ | ||
135 | int m_preferredSize; | 137 | int m_preferredSize; | ||
Show All 14 Lines |
Why the empty line removal? The previous line is now stuck with the comment.