-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdbusproperty.h
32 lines (28 loc) · 872 Bytes
/
dbusproperty.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef DBUSPROPERTY_H
#define DBUSPROPERTY_H
#include <QObject>
#include <QVariant>
// Simple wrapper round a single DBus property
// mostly because Qt bindings are not good at this
class DBusProperty : public QObject
{
Q_OBJECT
public:
explicit DBusProperty(const QString &service,
const QString &path,
const QString &interface,
const QString &property,
QObject *parent = nullptr);
QVariant value() const;
Q_SIGNALS:
void valueChanged(const QVariant &value);
private Q_SLOTS:
void onFdoPropertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalidated);
private:
QString m_service;
QString m_path;
QString m_interface;
QString m_property;
QVariant m_value;
};
#endif // DBUSPROPERTY_H