blob: cf93ec535992c23d5aae6f97f0c70134e3087aa7 (
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
44
|
#include "liveviewnotificationwatchlet.h"
#include "liveviewwatchletsplugin.h"
using namespace sowatch;
LiveViewWatchletsPlugin::LiveViewWatchletsPlugin(QObject *parent) :
QObject(parent)
{
}
LiveViewWatchletsPlugin::~LiveViewWatchletsPlugin()
{
}
QStringList LiveViewWatchletsPlugin::watchlets()
{
QStringList l;
l << LiveViewNotificationWatchlet::myId;
return l;
}
WatchletPluginInterface::WatchletInfo LiveViewWatchletsPlugin::describeWatchlet(const QString &id, const QString& watchModel)
{
WatchletInfo info;
if (id == LiveViewNotificationWatchlet::myId) {
if (watchModel == "metawatch-digital") {
info.name = "MetaWatch Notification Watchlet";
// Keep non visible
}
}
return info;
}
Watchlet* LiveViewWatchletsPlugin::getWatchlet(const QString& id, ConfigKey *settings, Watch *watch)
{
Q_UNUSED(settings);
if (id == LiveViewNotificationWatchlet::myId) {
return new LiveViewNotificationWatchlet(watch);
} else {
return 0;
}
}
Q_EXPORT_PLUGIN2(liveviewwatchlets, LiveViewWatchletsPlugin)
|