diff options
Diffstat (limited to 'sowatchd/watchhandler.h')
-rw-r--r-- | sowatchd/watchhandler.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sowatchd/watchhandler.h b/sowatchd/watchhandler.h new file mode 100644 index 0000000..3fa7c6b --- /dev/null +++ b/sowatchd/watchhandler.h @@ -0,0 +1,41 @@ +#ifndef WATCHHANDLER_H +#define WATCHHANDLER_H + +#include <QtCore/QObject> +#include <QtCore/QList> + +#include <sowatch.h> + +namespace sowatch +{ + +class WatchHandler : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString status READ status NOTIFY statusChanged) + +public: + explicit WatchHandler(ConfigKey *config, QObject *parent = 0); + + QString status() const; + +signals: + void statusChanged(); + +private slots: + void updateWatchlets(); + void updateProviders(); + void handleConfigSubkeyChanged(const QString& key); + +private: + ConfigKey *_config; + Watch *_watch; + WatchServer *_server; + QList<QString> _watchlet_order; + QMap<QString, Watchlet*> _watchlets; + QMap<QString, NotificationProvider*> _providers; +}; + +} + +#endif // WATCHHANDLER_H |