summaryrefslogtreecommitdiff
path: root/sysinfowatchlet
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-10 16:06:14 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-10 16:06:14 +0200
commit39fa663cd08bd2b7d46ed170d49ac794c531c42e (patch)
tree92131388053eadbfca4b8917ab1e1f87ffe30fdd /sysinfowatchlet
parentb9082fda48bb026fc4e6148efeba9aabf608373a (diff)
downloadsowatch-39fa663cd08bd2b7d46ed170d49ac794c531c42e.tar.gz
sowatch-39fa663cd08bd2b7d46ed170d49ac794c531c42e.zip
watchlet edit UI
Diffstat (limited to 'sysinfowatchlet')
-rw-r--r--sysinfowatchlet/sysinfoplugin.cpp13
-rw-r--r--sysinfowatchlet/sysinfoplugin.h3
2 files changed, 13 insertions, 3 deletions
diff --git a/sysinfowatchlet/sysinfoplugin.cpp b/sysinfowatchlet/sysinfoplugin.cpp
index f24b23e..3e56307 100644
--- a/sysinfowatchlet/sysinfoplugin.cpp
+++ b/sysinfowatchlet/sysinfoplugin.cpp
@@ -19,9 +19,18 @@ QStringList SysInfoPlugin::watchlets()
return l;
}
-Watchlet* SysInfoPlugin::getWatchlet(const QString& driver, ConfigKey *settings, WatchServer *server)
+SysInfoPlugin::WatchletInfo SysInfoPlugin::describeWatchlet(const QString &id)
{
- Q_UNUSED(driver);
+ WatchletInfo info;
+ if (id != "com.javispedro.sowatch.sysinfo") return info;
+ info.name = "Phone info";
+ info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/sysinfowatchlet/icon.png");
+ return info;
+}
+
+Watchlet* SysInfoPlugin::getWatchlet(const QString& id, ConfigKey *settings, WatchServer *server)
+{
+ Q_UNUSED(id);
Q_UNUSED(settings);
return new SysInfoWatchlet(server);
}
diff --git a/sysinfowatchlet/sysinfoplugin.h b/sysinfowatchlet/sysinfoplugin.h
index b341614..8b37a1c 100644
--- a/sysinfowatchlet/sysinfoplugin.h
+++ b/sysinfowatchlet/sysinfoplugin.h
@@ -16,7 +16,8 @@ public:
~SysInfoPlugin();
QStringList watchlets();
- Watchlet* getWatchlet(const QString& driver, ConfigKey *settings, WatchServer* server);
+ WatchletInfo describeWatchlet(const QString &id);
+ Watchlet* getWatchlet(const QString &id, ConfigKey *settings, WatchServer *server);
};
}