diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-29 11:56:13 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-29 12:00:27 -0700 |
commit | 1ab6b50a34a0127b1802b0439b9317d0245b6769 (patch) | |
tree | 292f9f2ce232048ba0d346db069f958f9e6a15ae /mobile-widgets/qmlmanager.h | |
parent | 9bea9fcdb701bfd3bb21ed850248e09bb9127b68 (diff) | |
download | subsurface-1ab6b50a34a0127b1802b0439b9317d0245b6769.tar.gz |
QML UI: start BT discovery
So far all this does is list all the BT devices that it finds
(and I worry if this will have negative battery implications
on a mobile device), but this should allow us to connect to
a standard BT dive computer (but that will of course require
more code to pick the right device).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.h')
-rw-r--r-- | mobile-widgets/qmlmanager.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index db170704b..16085dc44 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -7,6 +7,10 @@ #include <QNetworkAccessManager> #include <QScreen> #include <QElapsedTimer> +#if BT_SUPPORT +#include <QBluetoothLocalDevice> +#include <QBluetoothDeviceDiscoveryAgent> +#endif #include "core/gpslocation.h" #include "qt-models/divelistmodel.h" @@ -114,6 +118,9 @@ public: bool showPin() const; void setShowPin(bool enable); Q_INVOKABLE QStringList getDCListFromVendor(const QString& vendor); +#if BT_SUPPORT + void btDeviceDiscovered(const QBluetoothDeviceInfo &device); +#endif public slots: void applicationStateChanged(Qt::ApplicationState state); @@ -196,6 +203,10 @@ private: bool checkDepth(DiveObjectHelper *myDive, struct dive *d, QString depth); bool currentGitLocalOnly; bool m_showPin; +#if BT_SUPPORT + QBluetoothLocalDevice localBtDevice; + QBluetoothDeviceDiscoveryAgent *discoveryAgent; +#endif signals: void cloudUserNameChanged(); |