-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqbattstats.h
55 lines (48 loc) · 1.15 KB
/
qbattstats.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef QBATTSTATS_H
#define QBATTSTATS_H
#include <QString>
#include "qbattpsu.h"
#include "qbattsysfsmethod.h"
#include "qbattdbusmethod.h"
typedef enum {
METHOD_SYSFS,
METHOD_DBUS
} tMethod;
class QBattStats
{
public:
QBattStats();
~QBattStats();
public:
void updatePowerSupplyInfo();
int getBatteryCapacity();
QString getBatteryCapacityLevel();
int getBatteryChargeFull();
int getBatteryChargeFullDesign();
int getBatteryChargeNow();
int getBatteryCurrentNow();
int getBatteryCycleCount();
int getBatteryEnergyFull();
int getBatteryEnergyFullDesign();
int getBatteryEnergyNow();
QString getBatteryManufacturer();
QString getBatteryModelName();
int getBatteryPowerNow();
int getBatteryPresent();
QString getBatterySerialNumber();
QString getBatteryStatus();
QString getBatteryTechnology();
QString getBatteryType();
int getBatteryVoltageMinDesign();
int getBatteryVoltageNow();
int getACOnline();
QString getACType();
QString getTimeLeft();
private:
QBattSysFSMethod *sysfs_method;
QBattDBusMethod *dbus_method;
tMethod method;
private:
psuinfo_t psu;
};
#endif // QBATTSTATS_H