File indexing completed on 2024-05-05 12:22:16

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     Q_OBJECT
0025 
0026 public:
0027     explicit KateConfigPage(QWidget *parent = nullptr, const char *name = nullptr);
0028     ~KateConfigPage() override;
0029     virtual void reload() = 0;
0030 
0031 public:
0032     bool hasChanged()
0033     {
0034         return m_changed;
0035     }
0036 
0037     void observeChanges(KateConfigPage *page) const;
0038     void observeChanges(KUrlRequester *requester) const;
0039     void observeChanges(QAbstractButton *button) const;
0040     void observeChanges(QAbstractSlider *slider) const;
0041     void observeChanges(QSpinBox *spinBox) const;
0042     void observeChanges(QDoubleSpinBox *spinBox) const;
0043     void observeChanges(QComboBox *comboBox) const;
0044     void observeChanges(QGroupBox *groupBox) const;
0045     void observeChanges(QLineEdit *lineEdit) const;
0046     void observeChanges(KFontRequester *chooser) const;
0047 
0048 protected Q_SLOTS:
0049     void slotChanged();
0050 
0051 private Q_SLOTS:
0052     void somethingHasChanged();
0053 
0054 protected:
0055     bool m_changed = false;
0056 };
0057 
0058 #endif