summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/lowenergyscanner/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/device.h')
-rw-r--r--examples/bluetooth/lowenergyscanner/device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/bluetooth/lowenergyscanner/device.h b/examples/bluetooth/lowenergyscanner/device.h
index f15c4c95..97a52b26 100644
--- a/examples/bluetooth/lowenergyscanner/device.h
+++ b/examples/bluetooth/lowenergyscanner/device.h
@@ -65,6 +65,7 @@ class Device: public QObject
Q_PROPERTY(QVariant servicesList READ getServices NOTIFY servicesUpdated)
Q_PROPERTY(QVariant characteristicList READ getCharacteristics NOTIFY characteristicsUpdated)
Q_PROPERTY(QString update READ getUpdate NOTIFY updateChanged)
+ Q_PROPERTY(bool useRandomAddress READ isRandomAddress WRITE setRandomAddress NOTIFY randomAddressChanged)
Q_PROPERTY(bool state READ state NOTIFY stateChanged)
public:
Device();
@@ -75,6 +76,9 @@ public:
QString getUpdate();
bool state();
+ bool isRandomAddress() const;
+ void setRandomAddress(bool newValue);
+
public slots:
void startDeviceDiscovery();
void scanServices(const QString &address);
@@ -105,6 +109,7 @@ Q_SIGNALS:
void updateChanged();
void stateChanged();
void disconnected();
+ void randomAddressChanged();
private:
void setUpdate(QString message);
@@ -117,6 +122,7 @@ private:
bool connected;
QLowEnergyController *controller;
bool m_deviceScanState;
+ bool randomAddress;
};
#endif // DEVICE_H