6#include <PhosphorServices/phosphorservices_export.h>
11#include <QAbstractListModel>
19 Q_PROPERTY(
int count READ rowCount NOTIFY countChanged)
23 DeviceRole = Qt::UserRole + 1,
38 [[nodiscard]]
int rowCount(const QModelIndex& parent = {})
const override;
39 [[nodiscard]] QVariant
data(
const QModelIndex& index,
int role)
const override;
40 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
58 QList<UPowerDevice*> m_rows;
Definition UPowerDeviceModel.h:16
QHash< int, QByteArray > roleNames() const override
Roles
Definition UPowerDeviceModel.h:22
@ PercentageRole
Definition UPowerDeviceModel.h:24
@ StateRole
Definition UPowerDeviceModel.h:25
@ IsLaptopBatteryRole
Definition UPowerDeviceModel.h:28
@ IconNameRole
Definition UPowerDeviceModel.h:27
@ TypeRole
Definition UPowerDeviceModel.h:26
QVariant data(const QModelIndex &index, int role) const override
Definition UPowerDevice.h:16
Definition UPowerHost.h:17
Definition DBusMenuModel.h:15