File indexing completed on 2024-10-13 10:44:54

0001 /*
0002  * This file is part of the KDE project
0003  *
0004  * SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.0-or-later
0007  */
0008 
0009 #ifndef PAIRINGPAGE_H
0010 #define PAIRINGPAGE_H
0011 
0012 #include "ui_pairing.h"
0013 
0014 #include <QWizardPage>
0015 
0016 #include <BluezQt/Device>
0017 #include <BluezQt/Request>
0018 
0019 class BlueWizard;
0020 
0021 class PairingPage : public QWizardPage, Ui::Pairing
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit PairingPage(BlueWizard *parent = nullptr);
0027 
0028     int nextId() const override;
0029     void initializePage() override;
0030 
0031 public Q_SLOTS:
0032     void pairingFinished(BluezQt::PendingCall *call);
0033     void pinRequested(const QString &pin);
0034     void confirmationRequested(const QString &passkey, const BluezQt::Request<> &req);
0035     void matchesClicked();
0036     void notMatchClicked();
0037     void cancelClicked();
0038 
0039 private:
0040     QList<QWizard::WizardButton> wizardButtonsLayout() const;
0041 
0042     BlueWizard *const m_wizard;
0043     BluezQt::DevicePtr m_device;
0044     BluezQt::Request<> m_req;
0045     bool m_success = false;
0046 };
0047 
0048 #endif // PAIRINGPAGE_H