1#ifndef BATTERYMONITOR_H
2#define BATTERYMONITOR_H
6#include <QtDBus/QtDBus>
7#include <QDBusInterface>
8#include <QDBusConnection>
9#include <QDBusObjectPath>
12#define UPOWER_PROPERTIES "org.freedesktop.UPower.Device"
27class BatteryMonitor:
public QObject {
29 Q_PROPERTY(qint64 timeToFull READ timeToFull NOTIFY timeToFullChanged)
30 Q_PROPERTY(
bool charging READ charging NOTIFY chargingChanged)
31 Q_PROPERTY(
bool fullyCharged READ isFullyCharged NOTIFY fullyChargedChanged)
38 bool isFullyCharged();
41 Q_INVOKABLE uint state();
50 void propertiesChanged(QString
string, QVariantMap map, QStringList list);
53 void chargingChanged();
54 void timeToFullChanged();
55 void fullyChargedChanged();
58 QDBusInterface *m_iface;
59 QDBusObjectPath m_displayPath;