From aa1c0fd3146b4ed055d181c99d52463afa6bedbb Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 16 Sep 2011 17:47:24 +0200 Subject: Initial import --- watchserver.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 watchserver.h (limited to 'watchserver.h') diff --git a/watchserver.h b/watchserver.h new file mode 100644 index 0000000..78454d4 --- /dev/null +++ b/watchserver.h @@ -0,0 +1,46 @@ +#ifndef WATCHSERVER_H +#define WATCHSERVER_H + +#include +#include + +namespace sowatch +{ + +class Watch; +class Watchlet; + +class WatchServer : public QObject +{ + Q_OBJECT + Q_PROPERTY(Watch* watch READ watch) +public: + explicit WatchServer(Watch* watch, QObject* parent = 0); + + Watch* watch(); + + void runWatchlet(const QString& id); + void closeWatchlet(); + +signals: + +public slots: + +protected: + Watch* _watch; + Watchlet* _currentWatchlet; + + QMap watchlets; + + void registerWatchlet(Watchlet *watchlet); + +protected slots: + void watchConnected(); + void watchDisconnected(); + +friend class Watchlet; +}; + +} + +#endif // WATCHSERVER_H -- cgit v1.2.3