List model over a BluetoothHost's devices, optionally scoped to a single adapter. More...
#include <PhosphorServiceBluetooth/BluetoothDeviceModel.h>
Public Types | |
| enum | Roles { DeviceRole = Qt::UserRole + 1 , AddressRole , NameRole , AliasRole , IconRole , PairedRole , TrustedRole , BlockedRole , ConnectedRole , RssiRole , AdapterRole , UuidsRole } |
Signals | |
| void | hostChanged () |
| void | adapterChanged () |
| void | countChanged () |
Public Member Functions | |
| BluetoothDeviceModel (QObject *parent=nullptr) | |
| ~BluetoothDeviceModel () override | |
| BluetoothHost * | host () const |
| void | setHost (BluetoothHost *host) |
| BluetoothAdapter * | adapter () const |
| Adapter filter. | |
| void | setAdapter (BluetoothAdapter *adapter) |
| int | rowCount (const QModelIndex &parent={}) const override |
| QVariant | data (const QModelIndex &index, int role) const override |
| QHash< int, QByteArray > | roleNames () const override |
List model over a BluetoothHost's devices, optionally scoped to a single adapter.
Bind host, optionally set adapter to show only that adapter's devices (leave null for all), then drive a Repeater/ListView off the rows. The model keeps a local row mirror so its begin/end-insert/remove transactions always straddle the actual mutation.
|
explicit |
|
override |
|
nodiscard |
Adapter filter.
Null shows every device across all adapters; non-null shows only devices whose adapter path matches it.
|
signal |
|
signal |
|
nodiscardoverride |
|
nodiscard |
|
signal |
|
nodiscardoverride |
|
nodiscardoverride |
| void PhosphorServiceBluetooth::BluetoothDeviceModel::setAdapter | ( | BluetoothAdapter * | adapter | ) |
| void PhosphorServiceBluetooth::BluetoothDeviceModel::setHost | ( | BluetoothHost * | host | ) |