From 4ad9e1874af29864ca8531e5ba033b85d6616639 Mon Sep 17 00:00:00 2001
From: "Javier S. Pedro" <maemo@javispedro.com>
Date: Fri, 10 Aug 2012 17:49:45 +0200
Subject: cleanup and bump version to 0.4

---
 qmapwatchlet/qmapwatchlet.cpp       |  1 -
 qmapwatchlet/qmapwatchletplugin.cpp | 15 ++++++++++++---
 qmapwatchlet/qmapwatchletplugin.h   |  3 ++-
 3 files changed, 14 insertions(+), 5 deletions(-)

(limited to 'qmapwatchlet')

diff --git a/qmapwatchlet/qmapwatchlet.cpp b/qmapwatchlet/qmapwatchlet.cpp
index 5c8109b..6f39641 100644
--- a/qmapwatchlet/qmapwatchlet.cpp
+++ b/qmapwatchlet/qmapwatchlet.cpp
@@ -5,7 +5,6 @@ using namespace sowatch;
 QMapWatchlet::QMapWatchlet(WatchServer* server) :
 	DeclarativeWatchlet(server, "com.javispedro.sowatch.qmap")
 {
-
 	setSource(QUrl(SOWATCH_QML_DIR "/qmapwatchlet/" + server->watch()->model() + ".qml"));
 }
 
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);
 }
 
diff --git a/qmapwatchlet/qmapwatchletplugin.h b/qmapwatchlet/qmapwatchletplugin.h
index e594209..04ff348 100644
--- a/qmapwatchlet/qmapwatchletplugin.h
+++ b/qmapwatchlet/qmapwatchletplugin.h
@@ -16,7 +16,8 @@ public:
 	~QMapWatchletPlugin();
 
 	QStringList watchlets();
-	Watchlet* getWatchlet(const QString& driver, QSettings& settings, WatchServer* server);
+	WatchletInfo describeWatchlet(const QString &id);
+	Watchlet* getWatchlet(const QString &id, ConfigKey *config, WatchServer *server);
 };
 
 }
-- 
cgit v1.2.3