#include <battery.h>
|
virtual void | capacityChanged (int value, const QString &udi)=0 |
|
virtual void | chargePercentChanged (int value, const QString &udi)=0 |
|
virtual void | chargeStateChanged (int newState, const QString &udi=QString())=0 |
|
virtual void | energyChanged (double energy, const QString &udi)=0 |
|
virtual void | energyFullChanged (double energy, const QString &udi)=0 |
|
virtual void | energyFullDesignChanged (double energy, const QString &udi)=0 |
|
virtual void | energyRateChanged (double energyRate, const QString &udi)=0 |
|
virtual void | powerSupplyStateChanged (bool newState, const QString &udi)=0 |
|
virtual void | presentStateChanged (bool newState, const QString &udi)=0 |
|
virtual void | remainingTimeChanged (qlonglong time, const QString &udi)=0 |
|
virtual void | temperatureChanged (double temperature, const QString &udi)=0 |
|
virtual void | timeToEmptyChanged (qlonglong time, const QString &udi)=0 |
|
virtual void | timeToFullChanged (qlonglong time, const QString &udi)=0 |
|
virtual void | voltageChanged (double voltage, const QString &udi)=0 |
|
This device interface is available on batteries.
Definition at line 22 of file ifaces/battery.h.
◆ ~Battery()
Solid::Ifaces::Battery::~Battery |
( |
| ) |
|
|
override |
◆ capacity()
virtual int Solid::Ifaces::Battery::capacity |
( |
| ) |
const |
|
pure virtual |
Retrieves the battery capacity normalised to percent, meaning how much energy can it hold compared to what it is designed to.
The capacity of the battery will reduce with age. A capacity value less than 75% is usually a sign that you should renew your battery.
- Since
- 4.11
- Returns
- the battery capacity normalised to percent
◆ capacityChanged()
virtual void Solid::Ifaces::Battery::capacityChanged |
( |
int | value, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the capacity of this battery has changed.
- Parameters
-
value | the new capacity of the battery |
udi | the UDI of the battery with the new capacity |
- Since
- 4.11
◆ chargePercent()
virtual int Solid::Ifaces::Battery::chargePercent |
( |
| ) |
const |
|
pure virtual |
Retrieves the current charge level of the battery normalised to percent.
- Returns
- the current charge level normalised to percent
◆ chargePercentChanged()
virtual void Solid::Ifaces::Battery::chargePercentChanged |
( |
int | value, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the charge percent value of this battery has changed.
- Parameters
-
value | the new charge percent value of the battery |
udi | the UDI of the battery with the new charge percent |
◆ chargeState()
Retrieves the current charge state of the battery.
It can be in a stable state (no charge), charging or discharging.
- Returns
- the current battery charge state
- See also
- Solid::Battery::ChargeState
◆ chargeStateChanged()
virtual void Solid::Ifaces::Battery::chargeStateChanged |
( |
int | newState, |
|
|
const QString & | udi = QString() ) |
|
protectedpure virtual |
This signal is emitted when the charge state of this battery has changed.
- Parameters
-
- See also
- Solid::Battery::ChargeState
- Parameters
-
udi | the UDI of the battery with the new charge state |
◆ energy()
virtual double Solid::Ifaces::Battery::energy |
( |
| ) |
const |
|
pure virtual |
Amount of energy (measured in Wh) currently available in the power source.
- Returns
- amount of battery energy in Wh
◆ energyChanged()
virtual void Solid::Ifaces::Battery::energyChanged |
( |
double | energy, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the energy value of this battery has changed.
- Parameters
-
energy | the new energy value of the battery |
udi | the UDI of the battery with the new energy value |
◆ energyFull()
virtual double Solid::Ifaces::Battery::energyFull |
( |
| ) |
const |
|
pure virtual |
Amount of energy (measured in Wh) the battery has when it is full.
- Returns
- amount of battery energy when full in Wh
- Since
- 5.7
◆ energyFullChanged()
virtual void Solid::Ifaces::Battery::energyFullChanged |
( |
double | energy, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the energy full value of this battery has changed.
- Parameters
-
energy | the new energy full value of the battery |
udi | the UDI of the battery with the new energy full value |
◆ energyFullDesign()
virtual double Solid::Ifaces::Battery::energyFullDesign |
( |
| ) |
const |
|
pure virtual |
Amount of energy (measured in Wh) the battery should have by design hen it is full.
- Returns
- amount of battery energy when full by design in Wh
- Since
- 5.7
◆ energyFullDesignChanged()
virtual void Solid::Ifaces::Battery::energyFullDesignChanged |
( |
double | energy, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the energy full design value of this battery has changed.
- Parameters
-
energy | the new energy full design value of the battery |
udi | the UDI of the battery with the new energy full design value |
◆ energyRate()
virtual double Solid::Ifaces::Battery::energyRate |
( |
| ) |
const |
|
pure virtual |
Amount of energy being drained from the source, measured in W.
If positive, the source is being discharged, if negative it's being charged.
- Returns
- battery rate in Watts
◆ energyRateChanged()
virtual void Solid::Ifaces::Battery::energyRateChanged |
( |
double | energyRate, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the energy rate value of this battery has changed.
If positive, the source is being discharged, if negative it's being charged.
- Parameters
-
energyRate | the new energy rate value of the battery |
udi | the UDI of the battery with the new charge percent |
◆ isPowerSupply()
virtual bool Solid::Ifaces::Battery::isPowerSupply |
( |
| ) |
const |
|
pure virtual |
Indicates if the battery is powering the machine.
- Returns
- true if the battery is powersupply, false otherwise
◆ isPresent()
virtual bool Solid::Ifaces::Battery::isPresent |
( |
| ) |
const |
|
pure virtual |
Indicates if this battery is currently present in its bay.
- Returns
- true if the battery is present, false otherwise
◆ isRechargeable()
virtual bool Solid::Ifaces::Battery::isRechargeable |
( |
| ) |
const |
|
pure virtual |
Indicates if the battery is rechargeable.
- Returns
- true if the battery is rechargeable, false otherwise (one time usage)
◆ powerSupplyStateChanged()
virtual void Solid::Ifaces::Battery::powerSupplyStateChanged |
( |
bool | newState, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the power supply state of the battery changes.
- Parameters
-
newState | the new power supply state, type is boolean |
udi | the UDI of the battery with the new power supply state |
- Since
- 4.11
◆ presentStateChanged()
virtual void Solid::Ifaces::Battery::presentStateChanged |
( |
bool | newState, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted if the battery gets plugged in/out of the battery bay.
- Parameters
-
newState | the new plugging state of the battery, type is boolean |
udi | the UDI of the battery with thew new plugging state |
◆ remainingTime()
virtual qlonglong Solid::Ifaces::Battery::remainingTime |
( |
| ) |
const |
|
pure virtual |
Retrieves the current estimated remaining time of the system batteries.
- Returns
- the current global estimated remaining time in seconds
- Since
- 5.8
◆ remainingTimeChanged()
virtual void Solid::Ifaces::Battery::remainingTimeChanged |
( |
qlonglong | time, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the estimated battery remaining time changes.
- Parameters
-
time | the new remaining time |
udi | the UDI of the battery with the new remaining time |
- Since
- 5.8
◆ serial()
virtual QString Solid::Ifaces::Battery::serial |
( |
| ) |
const |
|
pure virtual |
The serial number of the battery.
- Returns
- the serial number of the battery
- Since
- 5.0
◆ technology()
◆ temperature()
virtual double Solid::Ifaces::Battery::temperature |
( |
| ) |
const |
|
pure virtual |
The temperature of the battery in degrees Celsius.
- Returns
- the battery temperature in degrees Celsius
- Since
- 5.0
◆ temperatureChanged()
virtual void Solid::Ifaces::Battery::temperatureChanged |
( |
double | temperature, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the battery temperature has changed.
- Parameters
-
temperature | the new temperature of the battery in degrees Celsius |
udi | the UDI of the battery with the new temperature |
- Since
- 5.0
◆ timeToEmpty()
virtual qlonglong Solid::Ifaces::Battery::timeToEmpty |
( |
| ) |
const |
|
pure virtual |
Time (in seconds) until the battery is empty.
- Returns
- time until the battery is empty
- Since
- 5.0
◆ timeToEmptyChanged()
virtual void Solid::Ifaces::Battery::timeToEmptyChanged |
( |
qlonglong | time, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the time until the battery is empty has changed.
- Parameters
-
time | the new remaining time |
udi | the UDI of the battery with the new remaining time |
- Since
- 5.0
◆ timeToFull()
virtual qlonglong Solid::Ifaces::Battery::timeToFull |
( |
| ) |
const |
|
pure virtual |
Time (in seconds) until the battery is full.
- Returns
- time until the battery is full
- Since
- 5.0
◆ timeToFullChanged()
virtual void Solid::Ifaces::Battery::timeToFullChanged |
( |
qlonglong | time, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the time until the battery is full has changed.
- Parameters
-
time | the new remaining time |
udi | the UDI of the battery with the new remaining time |
- Since
- 5.0
◆ type()
◆ voltage()
virtual double Solid::Ifaces::Battery::voltage |
( |
| ) |
const |
|
pure virtual |
Voltage in the Cell or being recorded by the meter.
- Returns
- voltage in Volts
◆ voltageChanged()
virtual void Solid::Ifaces::Battery::voltageChanged |
( |
double | voltage, |
|
|
const QString & | udi ) |
|
protectedpure virtual |
This signal is emitted when the voltage in the cell has changed.
- Parameters
-
voltage | the new voltage of the cell |
udi | the UDI of the battery with the new voltage |
- Since
- 5.0
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:22 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.