diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2016-02-18 09:11:16 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2016-02-18 09:11:16 +0100 |
| commit | 8f014f0915c7bdc97573f953aa9a3ae25a5f953a (patch) | |
| tree | 3a7802c954ba9374dc83f91038a885fc2ddf4118 /rockwork/pebbles.h | |
| parent | c177b720be89b9bae5b643caa9e84c132ec8f869 (diff) | |
Rockwork 1.0
Diffstat (limited to 'rockwork/pebbles.h')
| -rw-r--r-- | rockwork/pebbles.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rockwork/pebbles.h b/rockwork/pebbles.h index 0fef3bb..67e4440 100644 --- a/rockwork/pebbles.h +++ b/rockwork/pebbles.h @@ -12,8 +12,8 @@ class QDBusInterface; class Pebbles : public QAbstractListModel { Q_OBJECT + Q_PROPERTY(bool connectedToService READ connectedToService NOTIFY connectedToServiceChanged) Q_PROPERTY(QString version READ version) - Q_PROPERTY(int count READ rowCount NOTIFY countChanged) public: enum Roles { @@ -29,6 +29,7 @@ public: QVariant data(const QModelIndex &index, int role) const override; QHash<int, QByteArray> roleNames() const override; + bool connectedToService(); QString version() const; Q_INVOKABLE Pebble *get(int index) const; @@ -36,6 +37,7 @@ public: signals: + void connectedToServiceChanged(); void countChanged(); private slots: @@ -48,7 +50,7 @@ private: static bool sortPebbles(Pebble *a, Pebble *b); private: - QDBusInterface *m_iface; + bool m_connectedToService = false; QList<Pebble*> m_pebbles; QDBusServiceWatcher *m_watcher; }; |
