KSane

labeledentry.h
1/*
2 * SPDX-FileCopyrightText: 2007-2011 Kare Sars <kare.sars@iki .fi>
3 * SPDX-FileCopyrightText: 2014 Gregor Mitsch : port to KDE5 frameworks
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7
8#ifndef LABELED_ENTRY_H
9#define LABELED_ENTRY_H
10
11#include "ksaneoptionwidget.h"
12
13/**
14 *@author Kåre Särs
15 */
16
17class QPushButton;
18class QLineEdit;
19
20namespace KSaneIface
21{
22
23/**
24 * A text entry field with a set and reset button
25 */
27{
29
30public:
31
32 /**
33 * Create the entry.
34 *
35 * \param parent parent widget
36 * \param text is the text describing the entry.
37 */
38 LabeledEntry(QWidget *parent, const QString &text);
40 ~LabeledEntry() override;
41 void setText(const QString &text);
42
43private Q_SLOTS:
44
45 void setClicked();
46 void resetClicked();
47 void setValue(const QVariant &value);
48
50
51 void entryEdited(const QString &text);
52
53private:
54 void initEntry();
55
56 QLineEdit *m_entry;
57 QPushButton *m_set;
58 QPushButton *m_reset;
59 QString m_eText;
60};
61
62} // NameSpace KSaneIface
63
64#endif // LABELED_ENTRY_H
Base class for option widgets.
A text entry field with a set and reset button.
LabeledEntry(QWidget *parent, const QString &text)
Create the entry.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:19:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.