KSane

ksaneoptionwidget.h
1/*
2 * SPDX-FileCopyrightText: 2011 Kare Sars <kare.sars@iki.fi>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#ifndef KSANE_OPTION_WIDGET_H
8#define KSANE_OPTION_WIDGET_H
9
10// Qt includes
11#include <QWidget>
12#include <QLabel>
13#include <QGridLayout>
14
15#include <KSaneCore/Option>
16
17namespace KSaneIface
18{
19
20/**
21 *@author Kåre Särs
22 */
23
24/**
25 * Base class for option widgets
26 */
28{
30
31public:
32 /**
33 * Create the Widget.
34 * \param parent parent widget
35 * \param labelText text.
36 */
37 KSaneOptionWidget(QWidget *parent, const QString &labelText);
38
40 ~KSaneOptionWidget() override;
41
42 void setLabelText(const QString &text);
43
44 int labelWidthHint();
45 void setLabelWidth(int labelWidth);
46
47protected Q_SLOTS:
48 void updateVisibility();
49
50protected:
51 void initWidget();
52
53 QLabel *m_label;
54 QGridLayout *m_layout;
55 KSaneCore::Option *m_option = nullptr;
56};
57
58} // NameSpace KSaneIface
59
60#endif // KSANE_OPTION_WIDGET_H
Base class for option widgets.
KSaneOptionWidget(QWidget *parent, const QString &labelText)
Create the Widget.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.