17#ifndef BATTERYMONITOR_H
18#define BATTERYMONITOR_H
22#include <QtDBus/QtDBus>
23#include <QDBusInterface>
24#include <QDBusConnection>
25#include <QDBusObjectPath>
28#define UPOWER_PROPERTIES "org.freedesktop.UPower.Device"
43class BatteryMonitor:
public QObject {
45 Q_PROPERTY(qint64 timeToFull READ timeToFull NOTIFY timeToFullChanged)
46 Q_PROPERTY(
bool charging READ charging NOTIFY chargingChanged)
47 Q_PROPERTY(
bool fullyCharged READ isFullyCharged NOTIFY fullyChargedChanged)
54 bool isFullyCharged();
57 Q_INVOKABLE uint state();
66 void propertiesChanged(QString
string, QVariantMap map, QStringList list);
69 void chargingChanged();
70 void timeToFullChanged();
71 void fullyChargedChanged();
74 QDBusInterface *m_iface;
75 QDBusObjectPath m_displayPath;