summaryrefslogtreecommitdiff
path: root/watchlet.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-16 20:51:27 +0200
committerJavier <javier@pcjavier.(none)>2011-09-16 20:51:27 +0200
commitb6060852c4b317cd73043cdc82b652d187d952fd (patch)
treea5795eb33379e7172cd16962c131b8bac8db16da /watchlet.h
parentaa1c0fd3146b4ed055d181c99d52463afa6bedbb (diff)
downloadsowatch-b6060852c4b317cd73043cdc82b652d187d952fd.tar.gz
sowatch-b6060852c4b317cd73043cdc82b652d187d952fd.zip
Fixing some bugs in damage tracking on real N950
Diffstat (limited to 'watchlet.h')
-rw-r--r--watchlet.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/watchlet.h b/watchlet.h
index fd2c7f4..f018fa1 100644
--- a/watchlet.h
+++ b/watchlet.h
@@ -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;