deviceinfo.h Example File
lowenergyscanner/deviceinfo.h
#ifndef DEVICEINFO_H
#define DEVICEINFO_H
#include <QObject>
#include <qbluetoothdeviceinfo.h>
#include <qbluetoothaddress.h>
#include <QList>
#include "deviceinfo.h"
class DeviceInfo: public QObject
{
Q_OBJECT
Q_PROPERTY(QString deviceName READ getName NOTIFY deviceChanged)
Q_PROPERTY(QString deviceAddress READ getAddress NOTIFY deviceChanged)
public:
DeviceInfo();
DeviceInfo(const QBluetoothDeviceInfo &d);
QString getAddress() const;
QString getName() const;
QBluetoothDeviceInfo getDevice();
void setDevice(const QBluetoothDeviceInfo &dev);
Q_SIGNALS:
void deviceChanged();
private:
QBluetoothDeviceInfo device;
};
#endif // DEVICEINFO_H