1/*
2 SPDX-FileCopyrightText: 2019 KDE Developers
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "kateconfigpage.h"
8
9#include <KFontRequester>
10#include <KUrlRequester>
11
12#include <QAbstractButton>
13#include <QAbstractSlider>
14#include <QComboBox>
15#include <QGroupBox>
16#include <QLineEdit>
17#include <QSpinBox>
18
19KateConfigPage::KateConfigPage(QWidget *parent, const char *)
20 : KTextEditor::ConfigPage(parent)
21{
22 connect(sender: this, signal: &KateConfigPage::changed, context: this, slot: &KateConfigPage::somethingHasChanged);
23}
24
25KateConfigPage::~KateConfigPage()
26{
27}
28
29void KateConfigPage::observeChanges(KateConfigPage *page) const
30{
31 connect(sender: page, signal: &KateConfigPage::changed, context: this, slot: &KateConfigPage::slotChanged);
32}
33
34void KateConfigPage::observeChanges(KUrlRequester *requester) const
35{
36 connect(sender: requester, signal: &KUrlRequester::textChanged, context: this, slot: &KateConfigPage::slotChanged);
37}
38
39void KateConfigPage::observeChanges(QAbstractButton *button) const
40{
41 connect(sender: button, signal: &QAbstractButton::toggled, context: this, slot: &KateConfigPage::slotChanged);
42}
43
44void KateConfigPage::observeChanges(QAbstractSlider *slider) const
45{
46 connect(sender: slider, signal: &QAbstractSlider::valueChanged, context: this, slot: &KateConfigPage::slotChanged);
47}
48
49void KateConfigPage::observeChanges(QSpinBox *spinBox) const
50{
51 connect(sender: spinBox, signal: &QSpinBox::textChanged, context: this, slot: &KateConfigPage::slotChanged);
52}
53
54void KateConfigPage::observeChanges(QDoubleSpinBox *spinBox) const
55{
56 connect(sender: spinBox, signal: &QDoubleSpinBox::textChanged, context: this, slot: &KateConfigPage::slotChanged);
57}
58
59void KateConfigPage::observeChanges(QComboBox *comboBox) const
60{
61 connect(sender: comboBox, signal: &QComboBox::currentIndexChanged, context: this, slot: &KateConfigPage::slotChanged);
62}
63
64void KateConfigPage::observeChanges(QGroupBox *groupBox) const
65{
66 connect(sender: groupBox, signal: &QGroupBox::toggled, context: this, slot: &KateConfigPage::slotChanged);
67}
68
69void KateConfigPage::observeChanges(QLineEdit *lineEdit) const
70{
71 connect(sender: lineEdit, signal: &QLineEdit::textChanged, context: this, slot: &KateConfigPage::slotChanged);
72}
73
74void KateConfigPage::observeChanges(KFontRequester *chooser) const
75{
76 connect(sender: chooser, signal: &KFontRequester::fontSelected, context: this, slot: &KateConfigPage::slotChanged);
77}
78
79void KateConfigPage::slotChanged()
80{
81 Q_EMIT changed();
82}
83
84void KateConfigPage::somethingHasChanged()
85{
86 m_changed = true;
87}
88

source code of ktexteditor/src/dialogs/kateconfigpage.cpp