#include "VBluetoothDeviceInfo.h" // Qt #include #include // Project using namespace View; /*! * \brief VBluetoothDeviceInfo::VBluetoothDeviceInfo * Constructor for the VBluetoothDeviceInfo class * \param info - the device information */ VBluetoothDeviceInfo::VBluetoothDeviceInfo(const QBluetoothDeviceInfo &info) : device(info), connected(false) {} /*! * \brief VBluetoothDeviceInfo::getName * Gets the name of the device * \return QString - the name of the device */ QString VBluetoothDeviceInfo::getName() const { return device.name(); } /*! * \brief VBluetoothDeviceInfo::getAddress * Gets the bluetooth address * \return QString - the bluetooth address */ QString VBluetoothDeviceInfo::getAddress() const { return device.address().toString(); } /*! * \brief VBluetoothDeviceInfo::setConnected * Sets the bluetooth connection state */ void VBluetoothDeviceInfo::setConnected(const bool &conn) { if (conn != connected) { connected = conn; emit deviceChanged(); } } /*! * \brief VBluetoothDeviceInfo::isConnected * Gets the bluetooth connection state * \return bool - true if connected, false otherwise */ bool VBluetoothDeviceInfo::isConnected() const { return connected; }