Solid
Go to the documentation of this file.
25 #include <solid/ifaces/battery.h>
28 : DeviceInterface(*new BatteryPrivate(), backendObject)
30 connect(
backendObject, SIGNAL(chargePercentChanged(
int,QString)),
31 this, SIGNAL(chargePercentChanged(
int,QString)));
34 this, SIGNAL(capacityChanged(
int,QString)));
36 connect(
backendObject, SIGNAL(chargeStateChanged(
int,QString)),
37 this, SIGNAL(chargeStateChanged(
int,QString)));
39 connect(
backendObject, SIGNAL(plugStateChanged(
bool,QString)),
40 this, SIGNAL(plugStateChanged(
bool,QString)));
42 connect(
backendObject, SIGNAL(powerSupplyStateChanged(
bool,QString)),
43 this, SIGNAL(powerSupplyStateChanged(
bool,QString)));
84 return_SOLID_CALL(Ifaces::Battery *, d->backendObject(),
false, isRechargeable());
90 return_SOLID_CALL(Ifaces::Battery *, d->backendObject(), NoCharge, chargeState());
93 #include "battery.moc"
bool isPowerSupply() const
Indicates if this battery is powering the machine or from an attached deviced.
virtual ~Battery()
Destroys a Battery object.
ChargeState
This enum type defines charge state of a battery.
bool isRechargeable() const
Indicates if the battery is rechargeable.
BatteryType
This enum type defines the type of the device holding the battery.
QObject * backendObject() const
#define return_SOLID_CALL(Type, Object, Default, Method)
bool isPlugged() const
Indicates if this battery is plugged.
This device interface is available on batteries.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.