List model over a BluetoothHost's adapters. More...
#include <PhosphorServiceBluetooth/BluetoothAdapterModel.h>
Public Types | |
| enum | Roles { AdapterRole = Qt::UserRole + 1 , AddressRole , NameRole , AliasRole , PoweredRole , DiscoverableRole , PairableRole , DiscoveringRole } |
Signals | |
| void | hostChanged () |
| void | countChanged () |
Public Member Functions | |
| BluetoothAdapterModel (QObject *parent=nullptr) | |
| ~BluetoothAdapterModel () override | |
| BluetoothHost * | host () const |
| void | setHost (BluetoothHost *host) |
| 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 adapters.
Bind host, 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 regardless of when the host emits adapterAdded/adapterRemoved.
|
explicit |
|
override |
|
signal |
|
nodiscardoverride |
|
nodiscard |
|
signal |
|
nodiscardoverride |
|
nodiscardoverride |
| void PhosphorServiceBluetooth::BluetoothAdapterModel::setHost | ( | BluetoothHost * | host | ) |