Index: sources/view/VBluetoothDeviceInfo.h =================================================================== diff -u -r0470ff6f209ff0c5089f8f0849b6da04f60f8f41 -r5696b8db4628ee3143d93952c5dbdf511fa985b1 --- sources/view/VBluetoothDeviceInfo.h (.../VBluetoothDeviceInfo.h) (revision 0470ff6f209ff0c5089f8f0849b6da04f60f8f41) +++ sources/view/VBluetoothDeviceInfo.h (.../VBluetoothDeviceInfo.h) (revision 5696b8db4628ee3143d93952c5dbdf511fa985b1) @@ -15,22 +15,29 @@ Q_OBJECT Q_PROPERTY(QString name READ getName NOTIFY deviceChanged) Q_PROPERTY(QString address READ getAddress NOTIFY deviceChanged) + Q_PROPERTY(bool connected READ isConnected NOTIFY deviceChanged) public: VBluetoothDeviceInfo(const QBluetoothDeviceInfo &device); - - void setDevice(const QBluetoothDeviceInfo &device); QString getName() const; QString getAddress() const; - QBluetoothDeviceInfo getDevice() const; + bool isConnected() const; + void setConnected(const bool &conn); signals: void deviceChanged(); private: + + bool operator==(const VBluetoothDeviceInfo &d1) { + if (getAddress() != d1.getAddress()) + return false; + return true; + } + QBluetoothDeviceInfo device; + bool connected; }; - } #endif // VBLUETOOTHDEVICEINFO_H