KTextEditor

kateconfigpage.cpp
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(this, &KateConfigPage::changed, this, &KateConfigPage::somethingHasChanged);
23}
24
25KateConfigPage::~KateConfigPage()
26{
27}
28
29void KateConfigPage::observeChanges(KateConfigPage *page) const
30{
31 connect(page, &KateConfigPage::changed, this, &KateConfigPage::slotChanged);
32}
33
34void KateConfigPage::observeChanges(KUrlRequester *requester) const
35{
36 connect(requester, &KUrlRequester::textChanged, this, &KateConfigPage::slotChanged);
37}
38
39void KateConfigPage::observeChanges(QAbstractButton *button) const
40{
41 connect(button, &QAbstractButton::toggled, this, &KateConfigPage::slotChanged);
42}
43
44void KateConfigPage::observeChanges(QAbstractSlider *slider) const
45{
46 connect(slider, &QAbstractSlider::valueChanged, this, &KateConfigPage::slotChanged);
47}
48
49void KateConfigPage::observeChanges(QSpinBox *spinBox) const
50{
51 connect(spinBox, &QSpinBox::textChanged, this, &KateConfigPage::slotChanged);
52}
53
54void KateConfigPage::observeChanges(QDoubleSpinBox *spinBox) const
55{
56 connect(spinBox, &QDoubleSpinBox::textChanged, this, &KateConfigPage::slotChanged);
57}
58
59void KateConfigPage::observeChanges(QComboBox *comboBox) const
60{
61 connect(comboBox, &QComboBox::currentIndexChanged, this, &KateConfigPage::slotChanged);
62}
63
64void KateConfigPage::observeChanges(QGroupBox *groupBox) const
65{
66 connect(groupBox, &QGroupBox::toggled, this, &KateConfigPage::slotChanged);
67}
68
69void KateConfigPage::observeChanges(QLineEdit *lineEdit) const
70{
71 connect(lineEdit, &QLineEdit::textChanged, this, &KateConfigPage::slotChanged);
72}
73
74void KateConfigPage::observeChanges(KFontRequester *chooser) const
75{
76 connect(chooser, &KFontRequester::fontSelected, this, &KateConfigPage::slotChanged);
77}
78
79void KateConfigPage::slotChanged()
80{
82}
83
84void KateConfigPage::somethingHasChanged()
85{
86 m_changed = true;
87}
void fontSelected(const QFont &font)
void changed()
Emit this signal whenever a config option changed.
void textChanged(const QString &)
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
void toggled(bool checked)
void valueChanged(int value)
void currentIndexChanged(int index)
void textChanged(const QString &text)
void toggled(bool on)
void textChanged(const QString &text)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void textChanged(const QString &text)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.