diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-16 20:51:27 +0200 |
---|---|---|
committer | Javier <javier@pcjavier.(none)> | 2011-09-16 20:51:27 +0200 |
commit | b6060852c4b317cd73043cdc82b652d187d952fd (patch) | |
tree | a5795eb33379e7172cd16962c131b8bac8db16da /watchlet.h | |
parent | aa1c0fd3146b4ed055d181c99d52463afa6bedbb (diff) | |
download | sowatch-b6060852c4b317cd73043cdc82b652d187d952fd.tar.gz sowatch-b6060852c4b317cd73043cdc82b652d187d952fd.zip |
Fixing some bugs in damage tracking on real N950
Diffstat (limited to 'watchlet.h')
-rw-r--r-- | watchlet.h | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -12,7 +12,8 @@ class WatchServer; class Watchlet : public QObject { Q_OBJECT - Q_PROPERTY(QString id READ id) + Q_PROPERTY(QString id READ id CONSTANT) + Q_PROPERTY(bool isActive READ isActive NOTIFY activeChanged) public: explicit Watchlet(WatchServer *server, const QString& id); @@ -20,14 +21,22 @@ public: WatchServer* server(); Watch* watch(); - QString id(); + Q_INVOKABLE QString id() const; + Q_INVOKABLE bool isActive() const; + +signals: + void activeChanged(); + void activated(); + void deactivated(); protected: - virtual void activate() = 0; - virtual void deactivate() = 0; + virtual void activate(); + virtual void deactivate(); + + const QString _id; + bool _active; private: - QString _id; WatchServer* _server; friend class WatchServer; |