Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorServiceUPower::UPowerDeviceModel Class Reference

#include <PhosphorServiceUPower/UPowerDeviceModel.h>

Inheritance diagram for PhosphorServiceUPower::UPowerDeviceModel:
[legend]

Public Types

enum  Roles {
  DeviceRole = Qt::UserRole + 1 , PercentageRole , StateRole , TypeRole ,
  IconNameRole , IsLaptopBatteryRole
}

Signals

void hostChanged ()
void countChanged ()

Public Member Functions

 UPowerDeviceModel (QObject *parent=nullptr)
 ~UPowerDeviceModel () override
UPowerHost * host () const
void setHost (UPowerHost *host)
int rowCount (const QModelIndex &parent={}) const override
QVariant data (const QModelIndex &index, int role) const override
QHash< int, QByteArray > roleNames () const override

Member Enumeration Documentation

◆ Roles

Enumerator
DeviceRole 
PercentageRole 
StateRole 
TypeRole 
IconNameRole 
IsLaptopBatteryRole 

Constructor & Destructor Documentation

◆ UPowerDeviceModel()

PhosphorServiceUPower::UPowerDeviceModel::UPowerDeviceModel ( QObject * parent = nullptr)
explicit

◆ ~UPowerDeviceModel()

PhosphorServiceUPower::UPowerDeviceModel::~UPowerDeviceModel ( )
override

Member Function Documentation

◆ countChanged

void PhosphorServiceUPower::UPowerDeviceModel::countChanged ( )
signal

◆ data()

QVariant PhosphorServiceUPower::UPowerDeviceModel::data ( const QModelIndex & index,
int role ) const
nodiscardoverride

◆ host()

UPowerHost * PhosphorServiceUPower::UPowerDeviceModel::host ( ) const
nodiscard

◆ hostChanged

void PhosphorServiceUPower::UPowerDeviceModel::hostChanged ( )
signal

◆ roleNames()

QHash< int, QByteArray > PhosphorServiceUPower::UPowerDeviceModel::roleNames ( ) const
nodiscardoverride

◆ rowCount()

int PhosphorServiceUPower::UPowerDeviceModel::rowCount ( const QModelIndex & parent = {}) const
nodiscardoverride

◆ setHost()

void PhosphorServiceUPower::UPowerDeviceModel::setHost ( UPowerHost * host)

The documentation for this class was generated from the following file: