diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-04 01:24:41 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-04 01:24:41 +0200 |
commit | 8af1436e92c1a853b74bacc9ac0adf012fdbc4ca (patch) | |
tree | 55273b39332a99abd213b76d78d37bfb1c3447f7 /qorgwatchlet/qorgwatchletplugin.cpp | |
parent | 7897ec1596a4348cd926eff7c1d4f03616ed535c (diff) | |
download | sowatch-8af1436e92c1a853b74bacc9ac0adf012fdbc4ca.tar.gz sowatch-8af1436e92c1a853b74bacc9ac0adf012fdbc4ca.zip |
new calendar watchlet
Diffstat (limited to 'qorgwatchlet/qorgwatchletplugin.cpp')
-rw-r--r-- | qorgwatchlet/qorgwatchletplugin.cpp | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/qorgwatchlet/qorgwatchletplugin.cpp b/qorgwatchlet/qorgwatchletplugin.cpp index 2471d03..4b7bb47 100644 --- a/qorgwatchlet/qorgwatchletplugin.cpp +++ b/qorgwatchlet/qorgwatchletplugin.cpp @@ -1,38 +1,43 @@ -#include "qmsgwatchlet.h" -#include "qmsgwatchletplugin.h" +#include "qorgwatchlet.h" +#include "qorgwatchletplugin.h" + +#include <QtOrganizer/QOrganizerAbstractRequest> using namespace sowatch; +QTM_USE_NAMESPACE -QMsgWatchletPlugin::QMsgWatchletPlugin(QObject *parent) : +QOrgWatchletPlugin::QOrgWatchletPlugin(QObject *parent) : QObject(parent) { + // Workaround a weird QtOrganizer issue + qRegisterMetaType<QOrganizerAbstractRequest::State>("QOrganizerAbstractRequest::State"); } -QMsgWatchletPlugin::~QMsgWatchletPlugin() +QOrgWatchletPlugin::~QOrgWatchletPlugin() { } -QStringList QMsgWatchletPlugin::watchlets() +QStringList QOrgWatchletPlugin::watchlets() { QStringList l; - l << "com.javispedro.sowatch.qmsg"; + l << "com.javispedro.sowatch.qorg"; return l; } -WatchletPluginInterface::WatchletInfo QMsgWatchletPlugin::describeWatchlet(const QString &id) +WatchletPluginInterface::WatchletInfo QOrgWatchletPlugin::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"); + if (id != "com.javispedro.sowatch.qorg") return info; + info.name = "Calendar"; + info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qorgwatchlet/icon.png"); return info; } -Watchlet* QMsgWatchletPlugin::getWatchlet(const QString &id, ConfigKey *config, WatchServer *server) +Watchlet* QOrgWatchletPlugin::getWatchlet(const QString &id, ConfigKey *config, WatchServer *server) { Q_UNUSED(config); - if (id != "com.javispedro.sowatch.qmsg") return 0; - return new QMsgWatchlet(server); + if (id != "com.javispedro.sowatch.qorg") return 0; + return new QOrgWatchlet(server); } -Q_EXPORT_PLUGIN2(qmsgwatchlet, QMsgWatchletPlugin) +Q_EXPORT_PLUGIN2(qmsgwatchlet, QOrgWatchletPlugin) |