30 lines
637 B
C++
30 lines
637 B
C++
#ifndef DEVICEINFO_H
|
|
#define DEVICEINFO_H
|
|
|
|
#include <QString>
|
|
#include <QObject>
|
|
#include <QBluetoothDeviceInfo>
|
|
|
|
class DeviceInfo: public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QString deviceName READ getName NOTIFY deviceChanged)
|
|
Q_PROPERTY(QString deviceAddress READ getAddress NOTIFY deviceChanged)
|
|
|
|
public:
|
|
DeviceInfo(const QBluetoothDeviceInfo &device);
|
|
|
|
void setDevice(const QBluetoothDeviceInfo &device);
|
|
QString getName() const;
|
|
QString getAddress() const;
|
|
QBluetoothDeviceInfo getDevice() const;
|
|
|
|
signals:
|
|
void deviceChanged();
|
|
|
|
private:
|
|
QBluetoothDeviceInfo m_device;
|
|
};
|
|
|
|
#endif // DEVICEINFO_H
|