DtkSystemSettings
1.0.3
dtk library for systemsettings.
|
电源设备管理类, 用于管理电源设备, 包括电源设备的创建, 电源设备的属性获取, 电源设备的状态获取等 更多...
#include <dpowermanager.h>
Public 槽 | |
DExpected< QStringList > | devices () const |
枚举电源设备, 将此计算机上的电源设备以QStringList的方式列举 更多... | |
DExpected< QString > | criticalAction () const |
获取当电源严重不足的情况下, 电脑采取的操作 更多... | |
DExpected< void > | refresh () |
刷新设备列表 | |
Public 成员函数 | |
DPowerManager (QObject *parent=nullptr) | |
bool | lidIsClosed () const |
笔记本盖子关闭(或者二合一设备关上皮套)通过霍尔传感器读取相关数值 更多... | |
bool | lidIsPresent () const |
笔记本盖子传感器是否有效 更多... | |
bool | hasBattery () const |
系统是否具有电池 更多... | |
bool | onBattery () const |
系统是否使用电池电源运行 更多... | |
bool | supportKbdBacklight () const |
获取设备是否支持系统级调整键盘背光 更多... | |
QString | daemonVersion () const |
守护程序版本 更多... | |
QSharedPointer< DPowerDevice > | displayDevice () const |
当前显示的电源设备(这是一个表示要在桌面环境中显示的状态图标的复合设备, docker栏显示的电源图标指向的电源设备) 更多... | |
QSharedPointer< DPowerDevice > | findDeviceByName (const QString &name) const |
通过设备名创建设备对象 更多... | |
QSharedPointer< DKbdBacklight > | kbdBacklight () const |
创建键盘背光设备对象 更多... | |
属性 | |
bool | lidIsClosed |
bool | lidIsPresent |
bool | hasBattery |
bool | onBattery |
bool | supportKbdBacklight |
QString | daemonVersion |
电源设备管理类, 用于管理电源设备, 包括电源设备的创建, 电源设备的属性获取, 电源设备的状态获取等
|
slot |
获取当电源严重不足的情况下, 电脑采取的操作
QString DPowerManager::daemonVersion | ( | ) | const |
守护程序版本
|
slot |
枚举电源设备, 将此计算机上的电源设备以QStringList的方式列举
QSharedPointer< DPowerDevice > DPowerManager::displayDevice | ( | ) | const |
当前显示的电源设备(这是一个表示要在桌面环境中显示的状态图标的复合设备, docker栏显示的电源图标指向的电源设备)
QSharedPointer< DPowerDevice > DPowerManager::findDeviceByName | ( | const QString & | name | ) | const |
通过设备名创建设备对象
[in] | name | 传入设备名, 设备名获取见 DPowerManager::devices() const |
bool DPowerManager::hasBattery | ( | ) | const |
系统是否具有电池
QSharedPointer< DKbdBacklight > DPowerManager::kbdBacklight | ( | ) | const |
创建键盘背光设备对象
bool DPowerManager::lidIsClosed | ( | ) | const |
笔记本盖子关闭(或者二合一设备关上皮套)通过霍尔传感器读取相关数值
bool DPowerManager::lidIsPresent | ( | ) | const |
笔记本盖子传感器是否有效
bool DPowerManager::onBattery | ( | ) | const |
系统是否使用电池电源运行
bool DPowerManager::supportKbdBacklight | ( | ) | const |
获取设备是否支持系统级调整键盘背光