1 /* ============================================================ 2 * 3 * SPDX-FileCopyrightText: 2008-2011 Kare Sars <kare.sars@iki .fi> 4 * 5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 6 * 7 * ============================================================ */ 8 9 #ifndef KSANE_BUTTON_H 10 #define KSANE_BUTTON_H 11 12 #include "ksaneoptionwidget.h" 13 14 // Qt includes 15 #include <QPushButton> 16 #include <QGridLayout> 17 18 namespace KSaneIface 19 { 20 21 /** 22 *@author Kåre Särs 23 */ 24 25 /** 26 * A wrapper for a checkbox 27 */ 28 class KSaneButton : public KSaneOptionWidget 29 { 30 Q_OBJECT 31 32 public: 33 /** 34 * Create the checkbox. 35 * 36 * \param parent parent widget 37 * \param text is the text describing the checkbox. 38 */ 39 KSaneButton(QWidget *parent, const QString &text); 40 KSaneButton(QWidget *parent, KSaneOption *option); 41 ~KSaneButton() override; 42 43 Q_SIGNALS: 44 void clicked(const QVariant &value); 45 46 private: 47 void initButton(const QString &text); 48 QPushButton *m_button; 49 }; 50 51 } // NameSpace KSaneIface 52 53 #endif // KSANE_BUTTON_H 54