File indexing completed on 2024-04-21 03:57:23

0001 /*
0002     SPDX-FileCopyrightText: 2019 KDE Developers
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KATE_CONFIG_PAGE_H
0008 #define KATE_CONFIG_PAGE_H
0009 
0010 #include <ktexteditor/configpage.h>
0011 
0012 class KFontRequester;
0013 class KUrlRequester;
0014 class QAbstractButton;
0015 class QAbstractSlider;
0016 class QSpinBox;
0017 class QComboBox;
0018 class QGroupBox;
0019 class QLineEdit;
0020 class QDoubleSpinBox;
0021 
0022 class KateConfigPage : public KTextEditor::ConfigPage
0023 {
0024 public:
0025     explicit KateConfigPage(QWidget *parent = nullptr, const char *name = nullptr);
0026     ~KateConfigPage() override;
0027     virtual void reload() = 0;
0028 
0029 public:
0030     bool hasChanged()
0031     {
0032         return m_changed;
0033     }
0034 
0035     void observeChanges(KateConfigPage *page) const;
0036     void observeChanges(KUrlRequester *requester) const;
0037     void observeChanges(QAbstractButton *button) const;
0038     void observeChanges(QAbstractSlider *slider) const;
0039     void observeChanges(QSpinBox *spinBox) const;
0040     void observeChanges(QDoubleSpinBox *spinBox) const;
0041     void observeChanges(QComboBox *comboBox) const;
0042     void observeChanges(QGroupBox *groupBox) const;
0043     void observeChanges(QLineEdit *lineEdit) const;
0044     void observeChanges(KFontRequester *chooser) const;
0045 
0046 protected:
0047     void slotChanged();
0048 
0049 private:
0050     void somethingHasChanged();
0051 
0052 protected:
0053     bool m_changed = false;
0054 };
0055 
0056 #endif