9#ifndef SOLID_BACKENDS_UPOWER_BATTERY_H
10#define SOLID_BACKENDS_UPOWER_BATTERY_H
12#include "upowerdeviceinterface.h"
13#include <solid/devices/ifaces/battery.h>
27 Battery(UPowerDevice *device);
30 bool isPresent()
const override;
34 int chargePercent()
const override;
36 int capacity()
const override;
38 int cycleCount()
const override;
40 bool isRechargeable()
const override;
42 bool isPowerSupply()
const override;
46 qlonglong timeToEmpty()
const override;
48 qlonglong timeToFull()
const override;
52 double energy()
const override;
54 double energyFull()
const override;
56 double energyFullDesign()
const override;
58 double energyRate()
const override;
60 double voltage()
const override;
62 double temperature()
const override;
64 QString serial()
const override;
66 qlonglong remainingTime()
const override;
69 void presentStateChanged(
bool newState,
const QString &udi)
override;
70 void chargePercentChanged(
int value,
const QString &udi =
QString())
override;
71 void capacityChanged(
int value,
const QString &udi)
override;
72 void cycleCountChanged(
int value,
const QString &udi)
override;
73 void powerSupplyStateChanged(
bool newState,
const QString &udi)
override;
74 void chargeStateChanged(
int newState,
const QString &udi =
QString())
override;
75 void timeToEmptyChanged(qlonglong time,
const QString &udi)
override;
76 void timeToFullChanged(qlonglong time,
const QString &udi)
override;
77 void energyChanged(
double energy,
const QString &udi)
override;
78 void energyFullChanged(
double energyFull,
const QString &udi)
override;
79 void energyFullDesignChanged(
double energyFullDesign,
const QString &udi)
override;
80 void energyRateChanged(
double energyRate,
const QString &udi)
override;
81 void voltageChanged(
double voltage,
const QString &udi)
override;
82 void temperatureChanged(
double temperature,
const QString &udi)
override;
83 void remainingTimeChanged(qlonglong time,
const QString &udi)
override;
94 int m_cycleCount = -1;
97 qlonglong m_timeToEmpty;
98 qlonglong m_timeToFull;
101 double m_energyFullDesign;
104 double m_temperature;
BatteryType
This enum type defines the type of the device holding the battery.
Technology
Technology used in the battery.
ChargeState
This enum type defines charge state of a battery.
This device interface is available on batteries.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:23 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.