Hospital Analyser  1.0
deviceinfo.h
1 #ifndef DEVICEINFO_H
2 #define DEVICEINFO_H
3 
4 #include <QObject>
5 #include <QString>
6 #include <QtBluetooth/QBluetoothDeviceInfo>
7 
11 class DeviceInfo: public QObject
12 {
13  Q_OBJECT
14  Q_PROPERTY(QString deviceName READ getName NOTIFY deviceChanged)
15  Q_PROPERTY(QString deviceAddress READ getAddress NOTIFY deviceChanged)
16 
17 public:
18  DeviceInfo(const QBluetoothDeviceInfo &info);
19 
20  void setDevice(const QBluetoothDeviceInfo &device);
21  QString getName() const;
22  QString getAddress() const;
23  QBluetoothDeviceInfo getDevice() const;
24 
25 signals:
29  void deviceChanged();
30 
31 private:
32  QBluetoothDeviceInfo deviceInfo;
33 };
34 
35 #endif // DEVICEINFO_H
void setDevice(const QBluetoothDeviceInfo &device)
DeviceInfo::setDevice Sets just found device as class variable to be able to get its address and name...
Definition: deviceinfo.cpp:39
void deviceChanged()
deviceChanged
QString getAddress() const
DeviceInfo::getAddress Manages deviceName property and provides device address to UI...
Definition: deviceinfo.cpp:17
QString getName() const
DeviceInfo::getName Manges deviceName property and provides device name to UI.
Definition: deviceinfo.cpp:26
QBluetoothDeviceInfo getDevice() const
DeviceInfo::getDevice Getter of private variable.
Definition: deviceinfo.cpp:49
DeviceInfo(const QBluetoothDeviceInfo &info)
DeviceInfo::DeviceInfo Class constructor.
Definition: deviceinfo.cpp:9
The DeviceInfo class Provides information about discovered slave device.
Definition: deviceinfo.h:11