| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef FORMSETTINGS_H |
| 4 | #define FORMSETTINGS_H |
| 5 | |
| 6 | #include "ui_formsettings.h" |
| 7 | |
| 8 | #include <QDialog> |
| 9 | |
| 10 | class Settings; |
| 11 | class SettingsPanel; |
| 12 | |
| 13 | class FormSettings : public QDialog { |
| 14 | Q_OBJECT |
| 15 | |
| 16 | public: |
| 17 | // Constructors and destructors. |
| 18 | explicit FormSettings(QWidget& parent); |
| 19 | virtual ~FormSettings(); |
| 20 | |
| 21 | public slots: |
| 22 | void reject(); |
| 23 | |
| 24 | private slots: |
| 25 | void openSettingsCategory(int category); |
| 26 | |
| 27 | // Saves settings into global configuration. |
| 28 | void saveSettings(); |
| 29 | void applySettings(); |
| 30 | void cancelSettings(); |
| 31 | |
| 32 | private: |
| 33 | void addSettingsPanel(SettingsPanel* panel); |
| 34 | |
| 35 | Ui::FormSettings m_ui; |
| 36 | QPushButton* m_btnApply; |
| 37 | QList<SettingsPanel*> m_panels; |
| 38 | Settings& m_settings; |
| 39 | }; |
| 40 | |
| 41 | #endif // FORMSETTINGS_H |