Detailed Description
The QBluetoothLocalDeviceManager class provides access to local Bluetooth devices.
The purpose of the QBluetoothLocalDeviceManager is to enumerate all local Bluetooth adapters on the system. This class can also notify the user when a Bluetooth adapter has been added or removed. The values returned by devices() can be used to construct QBluetoothLocalDevice objects that refer to the particular local device.
On Linux, each Bluetooth device on the system has a Bluetooth device name and an address associated with it. The Bluetooth device name is of the form hciXX where XX is a number between 0 and 31.
Use deviceRemoved() and deviceAdded() signals to subscribe to device removed and device added events, respectively. Use defaultDeviceChanged() signal to get notification of the default device change.
See also QBluetoothLocalDevice.
Member Function Documentation
QBluetoothLocalDeviceManager::QBluetoothLocalDeviceManager ( QObject * parent = 0 )
Constructs the device manager for local Bluetooth devices. The parent parameter specifies the parent.
QBluetoothLocalDeviceManager::~QBluetoothLocalDeviceManager ()
Destroys the device manager.
QString QBluetoothLocalDeviceManager::defaultDevice ()
Returns a device name of the default Bluetooth adapter. This is typically 'hci0'. Returns a null string if no device is installed.
The QBluetoothLocalDevice default constructor can be used to construct an instance of the default local device.
See also QBluetoothLocalDevice::QBluetoothLocalDevice(), devices(), and defaultDeviceChanged().
void QBluetoothLocalDeviceManager::defaultDeviceChanged ( const QString & device ) [signal]
This signal is emitted whenever the default device has changed. The device parameter contains the representation of the new default device.
See also QBluetoothLocalDevice and defaultDevice().
void QBluetoothLocalDeviceManager::deviceAdded ( const QString & device ) [signal]
This signal is emitted whenever a new device has been added to the system. The device parameter contains the representation of the device which can be passed to the QBluetoothLocalDevice constructor.
See also QBluetoothLocalDevice and devices().
void QBluetoothLocalDeviceManager::deviceRemoved ( const QString & device ) [signal]
This signal is emitted whenever a device has been removed from the system. The device parameter contains the representation of the device which was removed.
See also QBluetoothLocalDevice and devices().
QStringList QBluetoothLocalDeviceManager::devices ()
Returns a list of all Bluetooth devices found on the system. The list typically consists of hci0, hci1, ..., hciN, depending on the number of devices.
See also defaultDevice().