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 bool isRechargeable()
const override;
40 bool isPowerSupply()
const override;
44 qlonglong timeToEmpty()
const override;
46 qlonglong timeToFull()
const override;
50 double energy()
const override;
52 double energyFull()
const override;
54 double energyFullDesign()
const override;
56 double energyRate()
const override;
58 double voltage()
const override;
60 double temperature()
const override;
62 QString serial()
const override;
64 qlonglong remainingTime()
const override;
67 void presentStateChanged(
bool newState,
const QString &udi)
override;
68 void chargePercentChanged(
int value,
const QString &udi =
QString())
override;
69 void capacityChanged(
int value,
const QString &udi)
override;
70 void powerSupplyStateChanged(
bool newState,
const QString &udi)
override;
71 void chargeStateChanged(
int newState,
const QString &udi =
QString())
override;
72 void timeToEmptyChanged(qlonglong time,
const QString &udi)
override;
73 void timeToFullChanged(qlonglong time,
const QString &udi)
override;
74 void energyChanged(
double energy,
const QString &udi)
override;
75 void energyFullChanged(
double energyFull,
const QString &udi)
override;
76 void energyFullDesignChanged(
double energyFullDesign,
const QString &udi)
override;
77 void energyRateChanged(
double energyRate,
const QString &udi)
override;
78 void voltageChanged(
double voltage,
const QString &udi)
override;
79 void temperatureChanged(
double temperature,
const QString &udi)
override;
80 void remainingTimeChanged(qlonglong time,
const QString &udi)
override;
93 qlonglong m_timeToEmpty;
94 qlonglong m_timeToFull;
97 double m_energyFullDesign;
100 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.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:08:14 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.