1 | /* |
2 | SPDX-FileCopyrightText: 2019 KDE Developers |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef KATE_CONFIG_PAGE_H |
8 | #define KATE_CONFIG_PAGE_H |
9 | |
10 | #include <ktexteditor/configpage.h> |
11 | |
12 | class KFontRequester; |
13 | class KUrlRequester; |
14 | class QAbstractButton; |
15 | class QAbstractSlider; |
16 | class QSpinBox; |
17 | class QComboBox; |
18 | class QGroupBox; |
19 | class QLineEdit; |
20 | class QDoubleSpinBox; |
21 | |
22 | class KateConfigPage : public KTextEditor::ConfigPage |
23 | { |
24 | public: |
25 | explicit KateConfigPage(QWidget *parent = nullptr, const char *name = nullptr); |
26 | ~KateConfigPage() override; |
27 | virtual void reload() = 0; |
28 | |
29 | public: |
30 | bool hasChanged() |
31 | { |
32 | return m_changed; |
33 | } |
34 | |
35 | void observeChanges(KateConfigPage *page) const; |
36 | void observeChanges(KUrlRequester *requester) const; |
37 | void observeChanges(QAbstractButton *button) const; |
38 | void observeChanges(QAbstractSlider *slider) const; |
39 | void observeChanges(QSpinBox *spinBox) const; |
40 | void observeChanges(QDoubleSpinBox *spinBox) const; |
41 | void observeChanges(QComboBox *comboBox) const; |
42 | void observeChanges(QGroupBox *groupBox) const; |
43 | void observeChanges(QLineEdit *lineEdit) const; |
44 | void observeChanges(KFontRequester *chooser) const; |
45 | |
46 | protected: |
47 | void slotChanged(); |
48 | |
49 | private: |
50 | void somethingHasChanged(); |
51 | |
52 | protected: |
53 | bool m_changed = false; |
54 | }; |
55 | |
56 | #endif |
57 | |