summaryrefslogtreecommitdiff
path: root/qmafwwatchlet/qmafwwatchletplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmafwwatchlet/qmafwwatchletplugin.cpp')
-rw-r--r--qmafwwatchlet/qmafwwatchletplugin.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/qmafwwatchlet/qmafwwatchletplugin.cpp b/qmafwwatchlet/qmafwwatchletplugin.cpp
index 09984b4..713c199 100644
--- a/qmafwwatchlet/qmafwwatchletplugin.cpp
+++ b/qmafwwatchlet/qmafwwatchletplugin.cpp
@@ -19,10 +19,19 @@ QStringList QMafwWatchletPlugin::watchlets()
return l;
}
-Watchlet* QMafwWatchletPlugin::getWatchlet(const QString& driver, QSettings& settings, WatchServer *server)
+WatchletPluginInterface::WatchletInfo QMafwWatchletPlugin::describeWatchlet(const QString &id)
{
- Q_UNUSED(driver);
- Q_UNUSED(settings);
+ WatchletInfo info;
+ if (id != "com.javispedro.sowatch.qmafw") return info;
+ info.name = "Music player";
+ info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qmafwwatchlet/icon.png");
+ return info;
+}
+
+Watchlet* QMafwWatchletPlugin::getWatchlet(const QString &id, ConfigKey *config, WatchServer *server)
+{
+ Q_UNUSED(config);
+ if (id != "com.javispedro.sowatch.qmafw") return 0;
return new QMafwWatchlet(server);
}