summaryrefslogtreecommitdiff
path: root/watchlet.h
blob: fd2c7f4b799c43f44dd7cad5243e7f734976c638 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef WATCHLET_H
#define WATCHLET_H

#include <QtCore/QObject>

namespace sowatch
{

class Watch;
class WatchServer;

class Watchlet : public QObject
{
    Q_OBJECT
	Q_PROPERTY(QString id READ id)

public:
	explicit Watchlet(WatchServer *server, const QString& id);

	WatchServer* server();
	Watch* watch();

	QString id();

protected:
	virtual void activate() = 0;
	virtual void deactivate() = 0;

private:
	QString _id;
	WatchServer* _server;

friend class WatchServer;
};

}

#endif // WATCHLET_H