QBluetoothLeUart/qbluetoothleuartdevice.h

36 lines
764 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;
QString getName();
QString getAddress();
protected:
QBluetoothDeviceInfo getDevice();
private:
void setDevice(QBluetoothDeviceInfo device);
QBluetoothDeviceInfo bluetoothDeviceInfo;
signals:
void deviceChanged();
};
#endif // DEVICEINFO_H