36 lines
764 B
C
36 lines
764 B
C
|
#ifndef DEVICEINFO_H
|
||
|
#define DEVICEINFO_H
|
||
|
|
||
|
#include <QString>
|
||
|
#include <QObject>
|
||
|
#include <qbluetoothdeviceinfo.h>
|
||
|
#include <qbluetoothaddress.h>
|
||
|
#include <qbluetoothuuid.h>
|
||
|
|
||
|
class QBluetoothLeUartDevice: public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
Q_PROPERTY(QString name READ getName NOTIFY deviceChanged)
|
||
|
Q_PROPERTY(QString address READ getAddress NOTIFY deviceChanged)
|
||
|
|
||
|
public:
|
||
|
QBluetoothLeUartDevice(QBluetoothDeviceInfo device, QObject *parent = nullptr);
|
||
|
|
||
|
friend class QBluetoothLeUart;
|
||
|
|
||
|
QString getName();
|
||
|
QString getAddress();
|
||
|
|
||
|
protected:
|
||
|
QBluetoothDeviceInfo getDevice();
|
||
|
|
||
|
private:
|
||
|
void setDevice(QBluetoothDeviceInfo device);
|
||
|
QBluetoothDeviceInfo bluetoothDeviceInfo;
|
||
|
|
||
|
signals:
|
||
|
void deviceChanged();
|
||
|
};
|
||
|
|
||
|
#endif // DEVICEINFO_H
|