Messagelib

optionseteditor.h
1/******************************************************************************
2 *
3 * SPDX-FileCopyrightText: 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 *
7 *******************************************************************************/
8
9#pragma once
10
11#include <QTabWidget>
12
13class QLineEdit;
14class KTextEdit;
15
16namespace MessageList
17{
18namespace Core
19{
20class OptionSet;
21} // namespace Core
22
23namespace Utils
24{
25/**
26 * The base class for the OptionSet editors. Provides common functionality.
27 */
29{
31
32public:
34 ~OptionSetEditor() override;
35 void setReadOnly(bool readOnly);
36
37protected:
38 /**
39 * Returns the editor for the name of the OptionSet.
40 * Derived classes are responsible of filling this UI element and reading back data from it.
41 */
42 QLineEdit *nameEdit() const;
43
44 /**
45 * Returns the editor for the description of the OptionSet.
46 * Derived classes are responsible of filling this UI element and reading back data from it.
47 */
49
50protected Q_SLOTS:
51 /**
52 * Handles editing of the name field.
53 * Pure virtual slot. Derived classes must provide an implementation.
54 */
55 virtual void slotNameEditTextEdited(const QString &newName) = 0;
56
57private:
58 QLineEdit *mNameEdit = nullptr; ///< The editor for the OptionSet name
59 KTextEdit *mDescriptionEdit = nullptr; ///< The editor for the OptionSet description
60};
61} // namespace Utils
62} // namespace MessageList
The base class for the OptionSet editors.
QLineEdit * nameEdit() const
Returns the editor for the name of the OptionSet.
virtual void slotNameEditTextEdited(const QString &newName)=0
Handles editing of the name field.
KTextEdit * descriptionEdit() const
Returns the editor for the description of the OptionSet.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.