summaryrefslogtreecommitdiff
path: root/libsowatch/watchletplugininterface.h
blob: ed904679d5c9fde09e1b784c642535da2e2765a7 (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
39
40
41
42
43
#ifndef SOWATCH_WATCHLETPLUGININTERFACE_H
#define SOWATCH_WATCHLETPLUGININTERFACE_H

#include <QtPlugin>
#include <QtCore/QSettings>
#include <QtCore/QStringList>
#include <QtCore/QUrl>
#include "sowatch_global.h"

namespace sowatch
{

class ConfigKey;
class Watchlet;
class Watch;

class SOWATCH_EXPORT WatchletPluginInterface
{
public:
	virtual ~WatchletPluginInterface();

	struct WatchletInfo {
		QString name;
		QUrl icon;
		bool hidden;
		QUrl configQmlUrl;

		inline WatchletInfo() :
		    hidden(false)
		{
		}
	};

	virtual QStringList watchlets() = 0;
	virtual WatchletInfo describeWatchlet(const QString& id) = 0;
	virtual Watchlet* getWatchlet(const QString& id, ConfigKey *settings, Watch *watch) = 0;
};

}

Q_DECLARE_INTERFACE(sowatch::WatchletPluginInterface, "com.javispedro.sowatch.WatchletPluginInterface")

#endif // SOWATCH_WATCHLETPLUGININTERFACE_H