QBluetoothLeUart/qbluetoothleuartdevice.h

36 lines
788 B
C
Raw Normal View History

2020-10-08 20:01:21 +02:00
#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;
2020-10-09 00:03:51 +02:00
Q_INVOKABLE QString getName();
Q_INVOKABLE QString getAddress();
2020-10-08 20:01:21 +02:00
protected:
QBluetoothDeviceInfo getDevice();
private:
void setDevice(QBluetoothDeviceInfo device);
QBluetoothDeviceInfo bluetoothDeviceInfo;
signals:
void deviceChanged();
};
#endif // DEVICEINFO_H