DtkSystemSettings
dtk library for systemsettings.
载入中...
搜索中...
未找到
dpowertypes.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#pragma once
6
7#include "dtkpower_global.h"
8
9#include <qobject.h>
10
11DPOWER_BEGIN_NAMESPACE
12
13struct History
14{
15 uint time;
16 double value;
17 uint state;
18 friend bool operator==(const History &lhs, const History &rhs)
19 {
20 return lhs.time == rhs.time && lhs.value == rhs.value && lhs.state == rhs.state;
21 }
22};
23
25{
26 double value;
27 double accuracy;
28 friend bool operator==(const Statistic &lhs, const Statistic &rhs)
29 {
30 return lhs.value == rhs.value && lhs.accuracy == rhs.accuracy;
31 }
32};
33
34enum class KbdSource { Internal, External, Unknown };
35
36enum class PowerMode { Performance, Balance, PowerSave, Unknown };
37
38enum class LidClosedAction : qint32 { Suspend = 1, Hibernate, TurnoffScreen, DoNothing, Unknown };
39
40enum class PowerBtnAction : qint32 {
41 Shutdown = 0,
42 Suspend,
43 Hibernate,
46 Unknown
47};
48
49DPOWER_END_NAMESPACE
50
51Q_DECLARE_METATYPE(DTK_POWER_NAMESPACE::History)
52Q_DECLARE_METATYPE(DTK_POWER_NAMESPACE::Statistic)
PowerBtnAction
按下电源键的行为
Definition dpowertypes.h:40
KbdSource
键盘背光的调整来源
Definition dpowertypes.h:34
LidClosedAction
关闭笔记本电脑盖子的行为
Definition dpowertypes.h:38
PowerMode
键盘背光的调整来源
Definition dpowertypes.h:36
Definition dpowertypes.h:14
double value
Definition dpowertypes.h:16
uint time
Definition dpowertypes.h:15
uint state
Definition dpowertypes.h:17
Definition dpowertypes.h:25
double accuracy
Definition dpowertypes.h:27
double value
Definition dpowertypes.h:26