|
DtkSystemSettings
dtk library for systemsettings.
|
电源策略设置类 更多...
#include <dpowersettings.h>


Public 槽 | |
| DExpected< void > | reset () |
| 重置设置 | |
信号 | |
| void | cpuGovernorChanged (const QString &value) |
| cpu电源策略发生改变 | |
| void | powerModeChanged (const PowerMode &mode) |
| 平台电源策略发生改变 | |
| void | autoPowerSavingOnBatteryChanged (const bool enabled) |
| 使用电池时自动省电模式设置发生改变 | |
| void | autoPowerSavingWhenBatteryLowChanged (const bool enabled) |
| 在使用电池时且电池电量低开启自动节能模式设置发生改变 | |
| void | powerSavingBrightnessDropPercentChanged (const quint32 value) |
| 省电模式下屏幕亮度改变百分比发生改变 | |
| void | batteryLidClosedActionChanged (const LidClosedAction &value) |
| 使用电池时关闭盖子的行为发生改变 | |
| void | batteryLockDelayChanged (const qint32 value) |
| void | batteryPressPowerBtnActionChanged (const PowerBtnAction &value) |
| 使用电池时按压电源按钮的行为发生改变 | |
| void | batteryScreenBlackDelayChanged (const qint32 value) |
| void | batteryScreensaverDelayChanged (const qint32 value) |
| void | batterySleepDelayChanged (const qint32 value) |
| void | linePowerLidClosedActionChanged (const LidClosedAction &value) |
| void | linePowerLockDelayChanged (const qint32 value) |
| void | linePowerPressPowerBtnActionChanged (const PowerBtnAction &value) |
| void | linePowerScreenBlackDelayChanged (const qint32 value) |
| void | linePowerScreensaverDelayChanged (const qint32 value) |
| void | linePowerSleepDelayChanged (const qint32 value) |
| void | lowPowerAutoSleepThresholdChanged (const qint32 value) |
| void | lowPowerNotifyEnableChanged (const bool value) |
| void | lowPowerNotifyThresholdChanged (const qint32 value) |
| void | screenBlackLockChanged (const bool value) |
| void | sleepLockChanged (const bool value) |
| void | powerSavingModeEnabledChanged (const bool value) |
| void | powerSavingModeBrightnessDataChanged (const QString &value) |
| void | cpuBoostChanged (const bool value) |
Public 成员函数 | |
| DPowerSettings (QObject *parent=nullptr) | |
| 构造函数 | |
| QString | cpuGovernor () const |
| 获取当前cpu电源策略 | |
| PowerMode | powerMode () const |
| 获取当前系统电源策略 | |
| void | setPowerMode (const PowerMode &mode) |
| 设置当前系统电源策略 | |
| bool | autoPowerSavingOnBattery () const |
| 是否开启在使用电池的时候开启自动节能模式, 断开ac电源之后自动调整电源模式到节能 | |
| void | setAutoPowerSavingOnBattery (const bool enabled) |
| 设置开启在使用电池的时候开启自动节能模式, 断开ac电源之后自动调整电源模式到节能 | |
| bool | autoPowerSavingWhenBatteryLow () const |
| 是否开启在使用电池且电量低的时候开启自动节能模式, 电池电量低将自动调整电源模式到节能 | |
| void | setAutoPowerSavingWhenBatteryLow (const bool enabled) |
| 设置开启在使用电池且电量低的时候开启自动节能模式, 电池电量低将自动调整电源模式到节能 | |
| quint32 | powerSavingBrightnessDropPercent () const |
| void | setPowerSavingBrightnessDropPercent (const quint32 value) |
| LidClosedAction | batteryLidClosedAction () const |
| 获取使用电池时笔记本盖子关闭时的行为 | |
| void | setBatteryLidClosedAction (const LidClosedAction &value) |
| 设置使用电池时笔记本盖子关闭行为 | |
| qint32 | batteryLockDelay () const |
| 使用电池的时锁屏延时 | |
| void | setBatteryLockDelay (const qint32 value) |
| 设置使用电池时锁屏延时 | |
| PowerBtnAction | batteryPressPowerBtnAction () const |
| 使用电池时电源按钮被按下的行为 | |
| void | setBatteryPressPowerBtnAction (const PowerBtnAction &value) |
| 设置使用电池时电源按钮按下的行为 | |
| qint32 | batteryScreenBlackDelay () const |
| 使用电池时关闭屏幕延时 | |
| void | setBatteryScreenBlackDelay (const qint32 value) |
| 设置使用电池时关闭屏幕延时 | |
| qint32 | batteryScreensaverDelay () const |
| 使用电池时屏幕变暗省电的延时 | |
| void | setBatteryScreensaverDelay (const qint32 value) |
| 设置使用电池时屏幕变暗省电延时 | |
| qint32 | batterySleepDelay () const |
| 使用电池时休眠延时 | |
| void | setBatterySleepDelay (const qint32 value) |
| 设置使用电池时休眠延时 | |
| LidClosedAction | linePowerLidClosedAction () const |
| 获取使用电源时笔记本盖子关闭时的行为 | |
| void | setLinePowerLidClosedAction (const LidClosedAction &value) |
| 设置使用电源时笔记本盖子关闭行为 | |
| qint32 | linePowerLockDelay () const |
| 使用电源的时锁屏延时 | |
| void | setLinePowerLockDelay (const qint32 value) |
| 设置使用电源时锁屏延时 | |
| PowerBtnAction | linePowerPressPowerBtnAction () const |
| 使用电源时电源按钮被按下的行为 | |
| void | setLinePowerPressPowerBtnAction (const PowerBtnAction &value) |
| 设置使用电源时电源按钮按下的行为 | |
| qint32 | linePowerScreenBlackDelay () const |
| 使用电源时关闭屏幕延时 | |
| void | setLinePowerScreenBlackDelay (const qint32 value) |
| 设置使用电源时关闭屏幕延时 | |
| qint32 | linePowerScreensaverDelay () const |
| 使用电源时屏幕变暗省电的延时 | |
| void | setLinePowerScreensaverDelay (const qint32 value) |
| 设置使用电源时屏幕变暗省电延时 | |
| qint32 | linePowerSleepDelay () const |
| 使用电源时休眠延时 | |
| void | setLinePowerSleepDelay (const qint32 value) |
| 设置使用电源时休眠延时 | |
| qint32 | lowPowerAutoSleepThreshold () const |
| 返回低电量自动睡眠阈值 | |
| void | setLowPowerAutoSleepThreshold (const qint32 value) |
| 设置低电量自动睡眠阈值 | |
| bool | lowPowerNotifyEnable () const |
| 是否打开低电量通知 | |
| void | setLowPowerNotifyEnable (const bool value) |
| 设置打开低电量通知 | |
| qint32 | lowPowerNotifyThreshold () const |
| 低电量通知的阈值:阈值:每百分之25为一个单位 | |
| void | setLowPowerNotifyThreshold (const qint32 value) |
| 设置低电量通知的阈值:阈值:每百分之25为一个单位 | |
| bool | screenBlackLock () const |
| 屏幕关闭是否锁屏 | |
| void | setScreenBlackLock (const bool value) |
| 设置关闭屏幕并锁屏 | |
| bool | sleepLock () const |
| 睡眠是否锁屏 | |
| void | setSleepLock (const bool value) |
| 设置睡眠是否锁屏 | |
属性 | |
| QString | cpuGovernor |
| PowerMode | powerMode |
| bool | autoPowerSavingOnBattery |
| bool | autoPowerSavingWhenBatteryLow |
| quint32 | powerSavingBrightnessDropPercent |
| LidClosedAction | batteryLidClosedAction |
| qint32 | batteryLockDelay |
| PowerBtnAction | batteryPressPowerBtnAction |
| qint32 | batteryScreenBlackDelay |
| qint32 | batteryScreensaverDelay |
| qint32 | batterySleepDelay |
| LidClosedAction | linePowerLidClosedAction |
| qint32 | linePowerLockDelay |
| PowerBtnAction | linePowerPressPowerBtnAction |
| qint32 | linePowerScreenBlackDelay |
| qint32 | linePowerScreensaverDelay |
| qint32 | linePowerSleepDelay |
| qint32 | lowPowerAutoSleepThreshold |
| bool | lowPowerNotifyEnable |
| qint32 | lowPowerNotifyThreshold |
| bool | screenBlackLock |
| bool | sleepLock |
电源策略设置类
| bool DPowerSettings::autoPowerSavingOnBattery | ( | ) | const |
是否开启在使用电池的时候开启自动节能模式, 断开ac电源之后自动调整电源模式到节能
|
signal |
使用电池时自动省电模式设置发生改变
| [in] | enabled | 开启或者关闭 |
| bool DPowerSettings::autoPowerSavingWhenBatteryLow | ( | ) | const |
是否开启在使用电池且电量低的时候开启自动节能模式, 电池电量低将自动调整电源模式到节能
|
signal |
在使用电池时且电池电量低开启自动节能模式设置发生改变
| [in] | enabled | 开启或者关闭 |
| qint32 DPowerSettings::batteryLidClosedAction | ( | ) | const |
获取使用电池时笔记本盖子关闭时的行为
| powerActionshutdown | powerActionsuspend powerActionHibernate powerActionTurnoffscreen powerActionDoNothing |
|
signal |
使用电池时关闭盖子的行为发生改变
| [in] | value | 关闭盖子的行为 |
| qint32 DPowerSettings::batteryLockDelay | ( | ) | const |
使用电池的时锁屏延时
|
signal |
| qint32 DPowerSettings::batteryPressPowerBtnAction | ( | ) | const |
使用电池时电源按钮被按下的行为
|
signal |
使用电池时按压电源按钮的行为发生改变
| [in] | value | 电源行为 |
| qint32 DPowerSettings::batteryScreenBlackDelay | ( | ) | const |
使用电池时关闭屏幕延时
|
signal |
| qint32 DPowerSettings::batteryScreensaverDelay | ( | ) | const |
使用电池时屏幕变暗省电的延时
|
signal |
| qint32 DPowerSettings::batterySleepDelay | ( | ) | const |
使用电池时休眠延时
|
signal |
| QString DPowerSettings::cpuGovernor | ( | ) | const |
获取当前cpu电源策略
|
signal |
cpu电源策略发生改变
| [in] | value | cpu电源策略 |
| qint32 DPowerSettings::linePowerLidClosedAction | ( | ) | const |
获取使用电源时笔记本盖子关闭时的行为
| powerActionshutdown | powerActionsuspend powerActionHibernate powerActionTurnoffscreen powerActionDoNothing |
|
signal |
| qint32 DPowerSettings::linePowerLockDelay | ( | ) | const |
使用电源的时锁屏延时
|
signal |
| qint32 DPowerSettings::linePowerPressPowerBtnAction | ( | ) | const |
使用电源时电源按钮被按下的行为
|
signal |
| qint32 DPowerSettings::linePowerScreenBlackDelay | ( | ) | const |
使用电源时关闭屏幕延时
|
signal |
| qint32 DPowerSettings::linePowerScreensaverDelay | ( | ) | const |
使用电源时屏幕变暗省电的延时
|
signal |
| qint32 DPowerSettings::linePowerSleepDelay | ( | ) | const |
使用电源时休眠延时
|
signal |
| qint32 DPowerSettings::lowPowerAutoSleepThreshold | ( | ) | const |
返回低电量自动睡眠阈值
|
signal |
| bool DPowerSettings::lowPowerNotifyEnable | ( | ) | const |
是否打开低电量通知
|
signal |
|
signal |
| PowerMode DPowerSettings::powerMode | ( | ) | const |
获取当前系统电源策略
|
signal |
平台电源策略发生改变
|
signal |
省电模式下屏幕亮度改变百分比发生改变
| [in] | value | 百分比 |
|
signal |
|
signal |
|
signal |
| void DPowerSettings::setAutoPowerSavingOnBattery | ( | const bool | enabled | ) |
设置开启在使用电池的时候开启自动节能模式, 断开ac电源之后自动调整电源模式到节能
| [in] | enabled | 布尔值,默认为enabled |
| void DPowerSettings::setAutoPowerSavingWhenBatteryLow | ( | const bool | enabled | ) |
设置开启在使用电池且电量低的时候开启自动节能模式, 电池电量低将自动调整电源模式到节能
| [in] | enabled | 布尔值,默认为enabled |
| void DPowerSettings::setBatteryLidClosedAction | ( | const LidClosedAction & | value | ) |
设置使用电池时笔记本盖子关闭行为
| [in] | value | 传入一个int值, 依次为以下枚举: powerActionshutdown powerActionsuspend powerActionHibernate powerActionTurnoffscreen powerActionDoNothing |
| void DPowerSettings::setBatteryScreenBlackDelay | ( | const qint32 | value | ) |
设置使用电池时关闭屏幕延时
| [in] | value | 延时时间 |
| void DPowerSettings::setBatteryScreensaverDelay | ( | const qint32 | value | ) |
设置使用电池时屏幕变暗省电延时
| [in] | value | 延时时间 |
| void DPowerSettings::setBatterySleepDelay | ( | const qint32 | value | ) |
设置使用电池时休眠延时
| [in] | value | 延时时间 |
| void DPowerSettings::setLinePowerLidClosedAction | ( | const LidClosedAction & | value | ) |
设置使用电源时笔记本盖子关闭行为
| [in] | value | 传入一个int值, 依次为以下枚举: powerActionshutdown powerActionsuspend powerActionHibernate powerActionTurnoffscreen powerActionDoNothing |
| void DPowerSettings::setLinePowerScreenBlackDelay | ( | const qint32 | value | ) |
设置使用电源时关闭屏幕延时
| [in] | value | 延时时间 |
| void DPowerSettings::setLinePowerScreensaverDelay | ( | const qint32 | value | ) |
设置使用电源时屏幕变暗省电延时
| [in] | value | 延时时间 |
| void DPowerSettings::setLinePowerSleepDelay | ( | const qint32 | value | ) |
设置使用电源时休眠延时
| [in] | value | 延时时间 |
| void DPowerSettings::setLowPowerAutoSleepThreshold | ( | const qint32 | value | ) |
设置低电量自动睡眠阈值
| [in] | value | 极限电量 |
| void DPowerSettings::setLowPowerNotifyEnable | ( | const bool | value | ) |
设置打开低电量通知
| [in] | value | 布尔值 |
| QString DPowerSettings::setPowerMode | ( | const PowerMode & | mode | ) |
设置当前系统电源策略
| [in] | mode | 电源策略:performance(性能优先) balance(平衡) powersave(节能) |
|
signal |