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

#include <phosphor-services/include/PhosphorServices/UPowerDeviceModel.h>

Inheritance diagram for PhosphorServices::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
 
UPowerHosthost () 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()

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

◆ ~UPowerDeviceModel()

PhosphorServices::UPowerDeviceModel::~UPowerDeviceModel ( )
override

Member Function Documentation

◆ countChanged

void PhosphorServices::UPowerDeviceModel::countChanged ( )
signal

◆ data()

QVariant PhosphorServices::UPowerDeviceModel::data ( const QModelIndex &  index,
int  role 
) const
override

◆ host()

UPowerHost * PhosphorServices::UPowerDeviceModel::host ( ) const

◆ hostChanged

void PhosphorServices::UPowerDeviceModel::hostChanged ( )
signal

◆ roleNames()

QHash< int, QByteArray > PhosphorServices::UPowerDeviceModel::roleNames ( ) const
override

◆ rowCount()

int PhosphorServices::UPowerDeviceModel::rowCount ( const QModelIndex &  parent = {}) const
override

◆ setHost()

void PhosphorServices::UPowerDeviceModel::setHost ( UPowerHost host)

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