summaryrefslogtreecommitdiff
path: root/liveviewwatchlets/liveviewwatchletsplugin.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-07-07 13:50:28 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-07-07 13:50:28 +0200
commitf61dfc6557303a8bba5301927f42e5b2a7ffcac6 (patch)
treefdba31b412015684d46c7a3cb070b8a57ff37ef4 /liveviewwatchlets/liveviewwatchletsplugin.cpp
parent92475d094cfddf7dd3036f5f1a9d6845a83ee350 (diff)
downloadsowatch-f61dfc6557303a8bba5301927f42e5b2a7ffcac6.tar.gz
sowatch-f61dfc6557303a8bba5301927f42e5b2a7ffcac6.zip
add some notification support to liveview
Diffstat (limited to 'liveviewwatchlets/liveviewwatchletsplugin.cpp')
-rw-r--r--liveviewwatchlets/liveviewwatchletsplugin.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/liveviewwatchlets/liveviewwatchletsplugin.cpp b/liveviewwatchlets/liveviewwatchletsplugin.cpp
new file mode 100644
index 0000000..cf93ec5
--- /dev/null
+++ b/liveviewwatchlets/liveviewwatchletsplugin.cpp
@@ -0,0 +1,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)