File indexing completed on 2024-10-06 04:55:07
0001 /* 0002 SPDX-FileCopyrightText: 2010 UFO Coders <info@ufocoders.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QObject> 0010 #include <QWizard> 0011 0012 #include <BluezQt/Manager> 0013 0014 class WizardAgent; 0015 0016 class BlueWizard : public QWizard 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit BlueWizard(); 0022 0023 BluezQt::DevicePtr device() const; 0024 void setDevice(BluezQt::DevicePtr device); 0025 0026 WizardAgent *agent() const; 0027 BluezQt::Manager *manager() const; 0028 0029 enum { 0030 Discover, 0031 Pairing, 0032 Success, 0033 Fail, 0034 Connect, 0035 }; 0036 0037 private Q_SLOTS: 0038 void initJobResult(BluezQt::InitManagerJob *job); 0039 void operationalChanged(bool operational); 0040 0041 private: 0042 void done(int result) override; 0043 0044 BluezQt::Manager *m_manager = nullptr; 0045 WizardAgent *const m_agent; 0046 0047 BluezQt::DevicePtr m_device; 0048 };