List model over a BrightnessHost's devices. More...
#include <PhosphorServiceBrightness/BrightnessDeviceModel.h>
Public Types | |
| enum | Roles { DeviceRole = Qt::UserRole + 1 , IdRole , NameRole , KindRole , BrightnessRole , MaxBrightnessRole , PercentageRole } |
Signals | |
| void | hostChanged () |
| void | countChanged () |
Public Member Functions | |
| BrightnessDeviceModel (QObject *parent=nullptr) | |
| ~BrightnessDeviceModel () override | |
| BrightnessHost * | host () const |
| void | setHost (BrightnessHost *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 BrightnessHost's devices.
Bind host, then drive a Repeater/ListView off the rows. Sysfs devices are present at bind time; external displays (DDC/CI) arrive asynchronously, so the model tracks the host's deviceAdded / deviceRemoved with insert/remove transactions, and forwards per-device brightness / percentage changes as dataChanged.
|
explicit |
|
override |
|
signal |
|
nodiscardoverride |
|
nodiscard |
|
signal |
|
nodiscardoverride |
|
nodiscardoverride |
| void PhosphorServiceBrightness::BrightnessDeviceModel::setHost | ( | BrightnessHost * | host | ) |