summaryrefslogtreecommitdiff
path: root/qmapwatchlet/qmapwatchletplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmapwatchlet/qmapwatchletplugin.cpp')
-rw-r--r--qmapwatchlet/qmapwatchletplugin.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/qmapwatchlet/qmapwatchletplugin.cpp b/qmapwatchlet/qmapwatchletplugin.cpp
index 5b72482..e8e1c43 100644
--- a/qmapwatchlet/qmapwatchletplugin.cpp
+++ b/qmapwatchlet/qmapwatchletplugin.cpp
@@ -19,10 +19,19 @@ QStringList QMapWatchletPlugin::watchlets()
return l;
}
-Watchlet* QMapWatchletPlugin::getWatchlet(const QString& driver, QSettings& settings, WatchServer *server)
+WatchletPluginInterface::WatchletInfo QMapWatchletPlugin::describeWatchlet(const QString &id)
{
- Q_UNUSED(driver);
- Q_UNUSED(settings);
+ WatchletInfo info;
+ if (id != "com.javispedro.sowatch.qmap") return info;
+ info.name = "Moving map";
+ info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qmapwatchlet/icon.png");
+ return info;
+}
+
+Watchlet* QMapWatchletPlugin::getWatchlet(const QString &id, ConfigKey *config, WatchServer *server)
+{
+ Q_UNUSED(config);
+ if (id != "com.javispedro.sowatch.qmap") return 0;
return new QMapWatchlet(server);
}