-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevice.h
More file actions
33 lines (25 loc) · 744 Bytes
/
device.h
File metadata and controls
33 lines (25 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef DEVICE_H
#define DEVICE_H
#include <QString>
#include <QObject>
#include <QBluetoothAddress>
#include <QBluetoothDeviceInfo>
class Device: public QObject
{
Q_OBJECT
Q_PROPERTY(QString deviceName READ getName NOTIFY deviceChanged)
Q_PROPERTY(bool isPaired READ isPaired WRITE setIsPaired NOTIFY deviceChanged)
Q_PROPERTY(QBluetoothAddress deviceAddress READ getAddress NOTIFY deviceChanged)
public:
Device(const QBluetoothDeviceInfo &device);
bool isPaired() const;
void setIsPaired(const bool &paired);
QString getName() const;
QBluetoothAddress getAddress() const;
signals:
void deviceChanged();
private:
QBluetoothDeviceInfo mDevice;
bool mIsDevicePaired;
};
#endif // DEVICE_H