List model over a NetworkHost's devices. More...
#include <PhosphorServiceNetwork/NetworkDeviceModel.h>
Public Types | |
| enum | Roles { DeviceRole = Qt::UserRole + 1 , InterfaceNameRole , DeviceTypeRole , StateRole , ManagedRole } |
Signals | |
| void | hostChanged () |
| void | countChanged () |
Public Member Functions | |
| NetworkDeviceModel (QObject *parent=nullptr) | |
| ~NetworkDeviceModel () override | |
| NetworkHost * | host () const |
| void | setHost (NetworkHost *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 NetworkHost's devices.
Bind host, then drive a Repeater/ListView off the rows. The model owns a local row mirror so its begin/end-insert/remove transactions always straddle the actual mutation regardless of when the host emits deviceAdded/deviceRemoved.
|
explicit |
|
override |
|
signal |
|
nodiscardoverride |
|
nodiscard |
|
signal |
|
nodiscardoverride |
|
nodiscardoverride |
| void PhosphorServiceNetwork::NetworkDeviceModel::setHost | ( | NetworkHost * | host | ) |