diff options
Diffstat (limited to 'libsowatch/watchlet.h')
-rw-r--r-- | libsowatch/watchlet.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libsowatch/watchlet.h b/libsowatch/watchlet.h index 66ec874..09d2a9c 100644 --- a/libsowatch/watchlet.h +++ b/libsowatch/watchlet.h @@ -9,6 +9,7 @@ namespace sowatch class Watch; class WatchServer; +class NotificationsModel; class SOWATCH_EXPORT Watchlet : public QObject { @@ -17,34 +18,33 @@ class SOWATCH_EXPORT Watchlet : public QObject Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) public: - Watchlet(WatchServer *server, const QString& id); + Watchlet(Watch *watch, const QString& id); ~Watchlet(); - WatchServer* server(); - Watch* watch(); - - const WatchServer* server() const; const Watch* watch() const; + Watch* watch(); QString id() const; bool isActive() const; + // To be called by the WatchServer + virtual void activate(); + virtual void deactivate(); + + // Some properties + virtual void setNotificationsModel(NotificationsModel *model); + signals: void activeChanged(); void activated(); void deactivated(); protected: - virtual void activate(); - virtual void deactivate(); - const QString _id; bool _active; private: - WatchServer* _server; - -friend class WatchServer; + Watch* _watch; }; } |