Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QBluetoothRemoteDeviceDialogFilter class provides a filter on the devices that are displayed by a QBluetoothRemoteDeviceDialog. More...
#include <QBluetoothRemoteDeviceDialogFilter>
The QBluetoothRemoteDeviceDialogFilter class provides a filter on the devices that are displayed by a QBluetoothRemoteDeviceDialog.
This clss allows the programmer to control whether particular devices should be displayed in a QBluetoothRemoteDeviceDialog.
For example, this will create a QBluetoothRemoteDeviceDialog that only displays computers and phones:
QBluetoothRemoteDeviceDialogFilter filter; QSet<QBluetooth::DeviceMajor> majors; majors.insert(QBluetooth::Computer); majors.insert(QBluetooth::Phone); filter.setAcceptedDeviceMajors(majors); QBluetoothRemoteDeviceDialog dialog; dialog.setFilter(&filter);
By default the QBluetoothRemoteDeviceDialogFilter will accept all devices, including those with an invalid class of device information.
Note: The programmer should be careful when using device majors, device minors and service classes as a means of filtering devices, as some devices may not have the correct class of device information.
See also QBluetoothRemoteDeviceDialog.
Constructs a QBluetoothRemoteDeviceDialogFilter that will accept all devices. The title is set to "Default".
Constructs a QBluetoothRemoteDeviceDialogFilter with title, that will accept all devices.
Destroys the dialog filter.
Returns the device majors that are accepted by this filter. By default, this value is an empty set (i.e. the filter will accept devices with any device major).
See also setAcceptedDeviceMajors().
Returns the device majors that are accepted by this filter. By default, this value is QBluetooth::AllServiceClasses (i.e. the filter will accept devices with any service class).
See also setAcceptedServiceClasses().
Returns whether this filter allows the device device to be displayed in the associated device selector.
If the accepted service class is QBluetooth::AllServiceClasses, the default implementation will also accept devices that have invalid service class values.
Sets the filter to accept devices that match at least one of the device majors contained in deviceMajors. If a device does not match at least one of the specified device majors, it will not be displayed in the associated device selector.
For example, to create a filter that only accepts computers and phones:
QBluetoothRemoteDeviceDialogFilter filter; QSet<QBluetooth::DeviceMajor> majors; majors.insert(QBluetooth::Computer); majors.insert(QBluetooth::Phone); filter.setAcceptedDeviceMajors(majors);
If the filter should accept devices regardless of their device majors, pass an empty set to this method. (This is the default value.)
See also acceptedDeviceMajors().
Sets the filter to accept devices that match the given serviceClasses.
For example, to create a filter that only accepts devices with the ObjectTransfer and Telephony service classes:
QBluetoothRemoteDeviceDialogFilter filter; filter.setAcceptedServiceClasses(QBluetooth::ObjectTransfer | QBluetooth::Telephony);
If the filter should accept devices regardless of their service classes, pass QBluetooth::AllServiceClasses to this method. (This is the default value.)
See also acceptedServiceClasses().
Returns the title for this filter.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |