summaryrefslogtreecommitdiff
path: root/qorgwatchlet/qorgwatchletplugin.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-03 21:15:59 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-03 21:15:59 +0200
commit7897ec1596a4348cd926eff7c1d4f03616ed535c (patch)
treec21374cfcf613198dd52e39e89be982a10263fc8 /qorgwatchlet/qorgwatchletplugin.cpp
parent9e061170b3834845910749c55eda63f03d982bbf (diff)
downloadsowatch-7897ec1596a4348cd926eff7c1d4f03616ed535c.tar.gz
sowatch-7897ec1596a4348cd926eff7c1d4f03616ed535c.zip
preparing new qorgwatchlet
Diffstat (limited to 'qorgwatchlet/qorgwatchletplugin.cpp')
-rw-r--r--qorgwatchlet/qorgwatchletplugin.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/qorgwatchlet/qorgwatchletplugin.cpp b/qorgwatchlet/qorgwatchletplugin.cpp
new file mode 100644
index 0000000..2471d03
--- /dev/null
+++ b/qorgwatchlet/qorgwatchletplugin.cpp
@@ -0,0 +1,38 @@
+#include "qmsgwatchlet.h"
+#include "qmsgwatchletplugin.h"
+
+using namespace sowatch;
+
+QMsgWatchletPlugin::QMsgWatchletPlugin(QObject *parent) :
+ QObject(parent)
+{
+}
+
+QMsgWatchletPlugin::~QMsgWatchletPlugin()
+{
+}
+
+QStringList QMsgWatchletPlugin::watchlets()
+{
+ QStringList l;
+ l << "com.javispedro.sowatch.qmsg";
+ return l;
+}
+
+WatchletPluginInterface::WatchletInfo QMsgWatchletPlugin::describeWatchlet(const QString &id)
+{
+ WatchletInfo info;
+ if (id != "com.javispedro.sowatch.qmsg") return info;
+ info.name = "Inbox";
+ info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qmsgwatchlet/icon.png");
+ return info;
+}
+
+Watchlet* QMsgWatchletPlugin::getWatchlet(const QString &id, ConfigKey *config, WatchServer *server)
+{
+ Q_UNUSED(config);
+ if (id != "com.javispedro.sowatch.qmsg") return 0;
+ return new QMsgWatchlet(server);
+}
+
+Q_EXPORT_PLUGIN2(qmsgwatchlet, QMsgWatchletPlugin)