File indexing completed on 2024-04-28 04:32:21
0001 /* 0002 * SPDX-FileCopyrightText: 2007-2010 Kare Sars <kare dot sars at iki dot fi> 0003 * SPDX-FileCopyrightText: 2009 Grzegorz Kurtyka <grzegorz dot kurtyka at gmail dot com> 0004 * SPDX-FileCopyrightText: 2014 Gregor Mitsch : port to KDE5 frameworks 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KSANE_DEVICE_DIALOG_H 0010 #define KSANE_DEVICE_DIALOG_H 0011 0012 #include <QGroupBox> 0013 #include <QStringList> 0014 #include <QButtonGroup> 0015 #include <QToolTip> 0016 #include <QRadioButton> 0017 #include <QCheckBox> 0018 #include <QPushButton> 0019 #include <QBoxLayout> 0020 #include <QDialog> 0021 0022 #include <KSaneCore/Interface> 0023 0024 namespace KSaneIface 0025 { 0026 0027 class KSaneDeviceDialog : public QDialog 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 KSaneDeviceDialog(QWidget *parent = nullptr); 0033 ~KSaneDeviceDialog() override; 0034 0035 QString getSelectedName() const; 0036 void setDefault(const QString &); 0037 0038 public Q_SLOTS: 0039 void updateDevicesList(const QList<KSaneCore::DeviceInformation*> &list); 0040 void reloadDevicesList(); 0041 0042 Q_SIGNALS: 0043 void requestReloadList(const KSaneCore::Interface::DeviceType type); 0044 0045 private Q_SLOTS: 0046 void setAvailable(bool avail); 0047 0048 0049 private: 0050 QString m_defaultBackend; 0051 QString m_selectedDevice; 0052 QWidget *m_btnContainer; 0053 QGroupBox *m_gbDevices; 0054 QButtonGroup *m_btnGroupDevices; 0055 QVBoxLayout *m_btnLayout; 0056 QPushButton *m_btnReloadDevices; 0057 QPushButton *m_btnOk; 0058 }; 0059 0060 } 0061 0062 #endif 0063