From 8f014f0915c7bdc97573f953aa9a3ae25a5f953a Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 18 Feb 2016 09:11:16 +0100 Subject: Rockwork 1.0 --- rockwork/pebbles.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rockwork/pebbles.h') 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 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 m_pebbles; QDBusServiceWatcher *m_watcher; }; -- cgit v1.2.3