From 7897ec1596a4348cd926eff7c1d4f03616ed535c Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 3 May 2013 21:15:59 +0200 Subject: preparing new qorgwatchlet --- qorgwatchlet/qorgwatchletplugin.cpp | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 qorgwatchlet/qorgwatchletplugin.cpp (limited to 'qorgwatchlet/qorgwatchletplugin.cpp') 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) -- cgit v1.2.3