Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/SettingsDialog/SettingsDialog.h
Show All 14 Lines | |||||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef SETTINGSDIALOG_H | 20 | #ifndef SETTINGSDIALOG_H | ||
21 | #define SETTINGSDIALOG_H | 21 | #define SETTINGSDIALOG_H | ||
22 | 22 | | |||
23 | #include <QSet> | 23 | #include <KConfigDialog> | ||
24 | #include <KPageDialog> | | |||
25 | 24 | | |||
26 | class KPageWidgetItem; | 25 | class ShortcutsOptionsPage; | ||
27 | 26 | | |||
28 | class SettingsDialog : public KPageDialog | 27 | class SettingsDialog : public KConfigDialog | ||
29 | { | 28 | { | ||
30 | Q_OBJECT | 29 | Q_OBJECT | ||
31 | 30 | | |||
32 | public: | 31 | public: | ||
33 | 32 | | |||
34 | explicit SettingsDialog(QWidget *parent = nullptr); | 33 | explicit SettingsDialog(QWidget *parent = nullptr); | ||
35 | 34 | | |||
36 | public Q_SLOTS: | | |||
37 | | ||||
38 | void accept() override; | | |||
39 | | ||||
40 | private Q_SLOTS: | | |||
41 | | ||||
42 | void initPages(); | | |||
43 | void onPageChanged(KPageWidgetItem *current, KPageWidgetItem *before); | | |||
44 | | ||||
45 | private: | 35 | private: | ||
46 | 36 | | |||
47 | QSet<KPageWidgetItem *> mPages; | 37 | bool hasChanged() override; | ||
38 | bool isDefault() override; | ||||
39 | void updateSettings() override; | ||||
40 | void updateWidgets() override; | ||||
41 | void updateWidgetsDefault() override; | ||||
42 | | ||||
43 | ShortcutsOptionsPage* mShortcutsPage; | ||||
48 | }; | 44 | }; | ||
49 | 45 | | |||
50 | #endif // SETTINGSDIALOG_H | 46 | #endif // SETTINGSDIALOG_H |