File indexing completed on 2024-04-28 16:43:19
0001 /* 0002 * SPDX-FileCopyrightText: 2010 Alejandro Fiestas Olivares <alex@eyeos.org> 0003 * SPDX-FileCopyrightText: 2010 Eduardo Robles Elvira <edulix@gmail.com> 0004 * SPDX-FileCopyrightText: 2010 UFO Coders <info@ufocoders.com> 0005 * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com> 0006 * 0007 * SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef REQUESTPIN_H 0011 #define REQUESTPIN_H 0012 0013 #include <QObject> 0014 0015 #include <BluezQt/Device> 0016 0017 namespace Ui 0018 { 0019 class DialogWidget; 0020 } 0021 0022 class KNotification; 0023 0024 class RequestPin : public QObject 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit RequestPin(BluezQt::DevicePtr device, bool numeric = false, QObject *parent = nullptr); 0030 0031 Q_SIGNALS: 0032 void done(const QString &result); 0033 0034 private Q_SLOTS: 0035 void introducePin(); 0036 void quit(); 0037 0038 void checkPin(const QString &pin); 0039 void dialogFinished(int result); 0040 0041 private: 0042 Ui::DialogWidget *m_dialogWidget = nullptr; 0043 KNotification *m_notification = nullptr; 0044 BluezQt::DevicePtr m_device; 0045 bool m_numeric; 0046 }; 0047 0048 #endif // REQUESTPIN_H