From 80c58c124caf17f670d8efc120f5ae4bfd9aa09f Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Tue, 14 May 2013 01:13:41 +0200 Subject: added liveview watchlet menu (API break) --- sysinfowatchlet/sysinfoplugin.cpp | 6 ++++-- sysinfowatchlet/sysinfoplugin.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sysinfowatchlet') diff --git a/sysinfowatchlet/sysinfoplugin.cpp b/sysinfowatchlet/sysinfoplugin.cpp index c87e864..9254940 100644 --- a/sysinfowatchlet/sysinfoplugin.cpp +++ b/sysinfowatchlet/sysinfoplugin.cpp @@ -19,12 +19,14 @@ QStringList SysInfoPlugin::watchlets() return l; } -SysInfoPlugin::WatchletInfo SysInfoPlugin::describeWatchlet(const QString &id) +SysInfoPlugin::WatchletInfo SysInfoPlugin::describeWatchlet(const QString &id, const QString &watchModel) { WatchletInfo info; if (id != "com.javispedro.sowatch.sysinfo") return info; info.name = "Phone info"; - info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/sysinfowatchlet/icon.png"); + info.phoneIcon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/sysinfowatchlet/icon.png"); + info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/sysinfowatchlet/" + watchModel + "-icon.png"); + info.visible = true; return info; } diff --git a/sysinfowatchlet/sysinfoplugin.h b/sysinfowatchlet/sysinfoplugin.h index e22e00b..6a22ad6 100644 --- a/sysinfowatchlet/sysinfoplugin.h +++ b/sysinfowatchlet/sysinfoplugin.h @@ -16,7 +16,7 @@ public: ~SysInfoPlugin(); QStringList watchlets(); - WatchletInfo describeWatchlet(const QString &id); + WatchletInfo describeWatchlet(const QString &id, const QString &watchModel); Watchlet* getWatchlet(const QString &id, ConfigKey *settings, Watch *watch); }; -- cgit v1.2.3