Changeset View
Changeset View
Standalone View
Standalone View
app/SettingsBase.h
Show All 35 Lines | |||||
36 | #include <KXmlGuiWindow> | 36 | #include <KXmlGuiWindow> | ||
37 | #include <KAboutApplicationDialog> | 37 | #include <KAboutApplicationDialog> | ||
38 | 38 | | |||
39 | class SettingsBase : public KXmlGuiWindow | 39 | class SettingsBase : public KXmlGuiWindow | ||
40 | { | 40 | { | ||
41 | Q_OBJECT | 41 | Q_OBJECT | ||
42 | 42 | | |||
43 | public: | 43 | public: | ||
44 | explicit SettingsBase(QWidget * parent = nullptr); | 44 | explicit SettingsBase(BaseMode::ApplicationMode mode, QWidget * parent = nullptr); | ||
45 | ~SettingsBase() override; | 45 | ~SettingsBase() override; | ||
46 | bool isInfoCenterMode() const; | ||||
46 | bool queryClose() override; | 47 | bool queryClose() override; | ||
47 | 48 | | |||
davidedmundson: why not an arg in the ctor then? | |||||
48 | protected: | 49 | protected: | ||
49 | QSize sizeHint() const override; | 50 | QSize sizeHint() const override; | ||
50 | 51 | | |||
51 | private Q_SLOTS: | 52 | private Q_SLOTS: | ||
52 | void initApplication(); | 53 | void initApplication(); | ||
53 | void initToolBar(); | 54 | void initToolBar(); | ||
54 | void initHelpMenu(); | 55 | void initHelpMenu(); | ||
55 | void initConfig(); | 56 | void initConfig(); | ||
Show All 27 Lines | 67 | private: | |||
83 | // The configuration | 84 | // The configuration | ||
84 | KConfigDialog * configDialog = nullptr; | 85 | KConfigDialog * configDialog = nullptr; | ||
85 | Ui::ConfigDialog configWidget; | 86 | Ui::ConfigDialog configWidget; | ||
86 | QButtonGroup viewSelection; | 87 | QButtonGroup viewSelection; | ||
87 | // The control module | 88 | // The control module | ||
88 | QStackedWidget * stackedWidget = nullptr; | 89 | QStackedWidget * stackedWidget = nullptr; | ||
89 | // The module list | 90 | // The module list | ||
90 | MenuItem * rootModule = nullptr; | 91 | MenuItem * rootModule = nullptr; | ||
92 | MenuItem * homeModule = nullptr; | ||||
91 | MenuItem * lostFound = nullptr; | 93 | MenuItem * lostFound = nullptr; | ||
davidedmundson: what happens to lost and found modules | |||||
92 | KService::List categories; | 94 | KService::List categories; | ||
93 | KService::List modules; | 95 | KService::List modules; | ||
94 | // The about dialog | 96 | // The about dialog | ||
95 | KAboutApplicationDialog * aboutDialog = nullptr; | 97 | KAboutApplicationDialog * aboutDialog = nullptr; | ||
98 | BaseMode::ApplicationMode m_mode = BaseMode::SystemSettings; | ||||
broulik: I would prefer this to be an enum | |||||
96 | }; | 99 | }; | ||
97 | #endif | 100 | #endif |
why not an arg in the ctor then?