19#ifndef BATTERYMONITOR_H
20#define BATTERYMONITOR_H
24#include <QtDBus/QtDBus>
25#include <QDBusInterface>
26#include <QDBusConnection>
27#include <QDBusObjectPath>
30#define UPOWER_PROPERTIES "org.freedesktop.UPower.Device"
45class BatteryMonitor:
public QObject {
47 Q_PROPERTY(qint64 timeToFull READ timeToFull NOTIFY timeToFullChanged)
48 Q_PROPERTY(
bool charging READ charging NOTIFY chargingChanged)
49 Q_PROPERTY(
bool fullyCharged READ isFullyCharged NOTIFY fullyChargedChanged)
56 bool isFullyCharged();
59 Q_INVOKABLE uint state();
68 void propertiesChanged(QString
string, QVariantMap map, QStringList list);
71 void chargingChanged();
72 void timeToFullChanged();
73 void fullyChargedChanged();
76 QDBusInterface *m_iface;
77 QDBusObjectPath m_displayPath;