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
11
DPOWER_BEGIN_NAMESPACE
12
13
struct
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
24
struct
Statistic
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
34
enum class
KbdSource
{
Internal
,
External
, Unknown };
35
36
enum class
PowerMode
{
Performance
,
Balance
,
PowerSave
, Unknown };
37
38
enum class
LidClosedAction
: qint32 { Suspend = 1, Hibernate,
TurnoffScreen
,
DoNothing
, Unknown };
39
40
enum class
PowerBtnAction
: qint32 {
41
Shutdown = 0,
42
Suspend,
43
Hibernate,
44
TurnoffScreen
,
45
DoNothing
,
46
Unknown
47
};
48
49
DPOWER_END_NAMESPACE
50
51
Q_DECLARE_METATYPE(DTK_POWER_NAMESPACE::History)
52
Q_DECLARE_METATYPE(DTK_POWER_NAMESPACE::Statistic)
Dtk::Power::PowerBtnAction
PowerBtnAction
按下电源键的行为
Definition
dpowertypes.h:40
Dtk::Power::KbdSource
KbdSource
键盘背光的调整来源
Definition
dpowertypes.h:34
Dtk::Power::KbdSource::Internal
@ Internal
Dtk::Power::KbdSource::External
@ External
Dtk::Power::LidClosedAction
LidClosedAction
关闭笔记本电脑盖子的行为
Definition
dpowertypes.h:38
Dtk::Power::LidClosedAction::TurnoffScreen
@ TurnoffScreen
Dtk::Power::LidClosedAction::DoNothing
@ DoNothing
Dtk::Power::PowerMode
PowerMode
键盘背光的调整来源
Definition
dpowertypes.h:36
Dtk::Power::PowerMode::PowerSave
@ PowerSave
Dtk::Power::PowerMode::Performance
@ Performance
Dtk::Power::PowerMode::Balance
@ Balance
Dtk::Power::History
Definition
dpowertypes.h:14
Dtk::Power::History::value
double value
Definition
dpowertypes.h:16
Dtk::Power::History::time
uint time
Definition
dpowertypes.h:15
Dtk::Power::History::state
uint state
Definition
dpowertypes.h:17
Dtk::Power::Statistic
Definition
dpowertypes.h:25
Dtk::Power::Statistic::accuracy
double accuracy
Definition
dpowertypes.h:27
Dtk::Power::Statistic::value
double value
Definition
dpowertypes.h:26
include
power
dpowertypes.h
文档生成时间:2024-01-06-08:07 +00
Doxygen Version
1.9.7
制作者:deepin doc doc go SIG
文档使用CC-BY-4.0共享