Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/configdialog.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 45 | public Q_SLOTS: | |||
---|---|---|---|---|---|
57 | /** | 57 | /** | ||
58 | * Add a new config page. | 58 | * Add a new config page. | ||
59 | * @param before the page before which the new page will be inserted. | 59 | * @param before the page before which the new page will be inserted. | ||
60 | * @param page the new page to add | 60 | * @param page the new page to add | ||
61 | */ | 61 | */ | ||
62 | void insertConfigPage(ConfigPage* before, ConfigPage* page); | 62 | void insertConfigPage(ConfigPage* before, ConfigPage* page); | ||
63 | 63 | | |||
64 | /** | 64 | /** | ||
65 | * Add a new sub config page | 65 | * Add a new sub config page. New page will be placed before child page which name() is "bigger" | ||
66 | * @param parentPage the parent page | 66 | * (QString::localeAwareCompare()) than new one to keep ascending order. | ||
67 | * @param page the page to add | 67 | * @param parentPage The parent page | ||
68 | * @param page The page to add | ||||
68 | */ | 69 | */ | ||
69 | void appendSubConfigPage(ConfigPage* parentPage, ConfigPage* page); | 70 | void appendSubConfigPage(ConfigPage* parentPage, ConfigPage* page); | ||
mwolff: this should probably be sorted as well, no? | |||||
70 | 71 | | |||
71 | Q_SIGNALS: | 72 | Q_SIGNALS: | ||
72 | void configSaved(ConfigPage* page); | 73 | void configSaved(ConfigPage* page); | ||
73 | 74 | | |||
74 | protected: | 75 | protected: | ||
75 | void closeEvent(QCloseEvent* event) override; | 76 | void closeEvent(QCloseEvent* event) override; | ||
76 | 77 | | |||
77 | private: | 78 | private: | ||
78 | KPageWidgetItem* itemForPage(ConfigPage* page) const; | 79 | KPageWidgetItem* itemForPage(ConfigPage* page) const; | ||
79 | int checkForUnsavedChanges(KPageWidgetItem* current, KPageWidgetItem* before); | 80 | int checkForUnsavedChanges(KPageWidgetItem* current, KPageWidgetItem* before); | ||
81 | void insertConfigPage(KPageWidgetItem* beforeItem, ConfigPage* page); | ||||
80 | void applyChanges(ConfigPage* page); | 82 | void applyChanges(ConfigPage* page); | ||
81 | void removePagesForPlugin(IPlugin* plugin); | 83 | void removePagesForPlugin(IPlugin* plugin); | ||
82 | void addConfigPageInternal(KPageWidgetItem* item, ConfigPage* page); | 84 | void addConfigPageInternal(KPageWidgetItem* item, ConfigPage* page); | ||
83 | void onPageChanged(); | 85 | void onPageChanged(); | ||
84 | 86 | | |||
85 | private: | 87 | private: | ||
86 | // we have to use QPointer since KPageDialog::removePage() also removes all child pages | 88 | // we have to use QPointer since KPageDialog::removePage() also removes all child pages | ||
87 | QVector<QPointer<KPageWidgetItem>> m_pages; | 89 | QVector<QPointer<KPageWidgetItem>> m_pages; | ||
88 | bool m_currentPageHasChanges = false; | 90 | bool m_currentPageHasChanges = false; | ||
89 | bool m_currentlyApplyingChanges = false; | 91 | bool m_currentlyApplyingChanges = false; | ||
90 | }; | 92 | }; | ||
91 | 93 | | |||
92 | } | 94 | } | ||
93 | 95 | | |||
94 | #endif // KDEVPLATFORM_CONFIGDIALOG_H | 96 | #endif // KDEVPLATFORM_CONFIGDIALOG_H |
this should probably be sorted as well, no?