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) --- qorgwatchlet/qorgwatchletplugin.cpp | 6 ++++-- qorgwatchlet/qorgwatchletplugin.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'qorgwatchlet') diff --git a/qorgwatchlet/qorgwatchletplugin.cpp b/qorgwatchlet/qorgwatchletplugin.cpp index 8416f0f..24db91f 100644 --- a/qorgwatchlet/qorgwatchletplugin.cpp +++ b/qorgwatchlet/qorgwatchletplugin.cpp @@ -24,12 +24,14 @@ QStringList QOrgWatchletPlugin::watchlets() return l; } -WatchletPluginInterface::WatchletInfo QOrgWatchletPlugin::describeWatchlet(const QString &id) +WatchletPluginInterface::WatchletInfo QOrgWatchletPlugin::describeWatchlet(const QString &id, const QString &watchModel) { WatchletInfo info; if (id != "com.javispedro.sowatch.qorg") return info; info.name = "Calendar"; - info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qorgwatchlet/icon.png"); + info.phoneIcon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qorgwatchlet/icon.png"); + info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/qorgwatchlet/" + watchModel + "-icon.png"); + info.visible = true; return info; } diff --git a/qorgwatchlet/qorgwatchletplugin.h b/qorgwatchlet/qorgwatchletplugin.h index 9f4d3d5..21c8f1f 100644 --- a/qorgwatchlet/qorgwatchletplugin.h +++ b/qorgwatchlet/qorgwatchletplugin.h @@ -16,7 +16,7 @@ public: ~QOrgWatchletPlugin(); QStringList watchlets(); - WatchletInfo describeWatchlet(const QString &id); + WatchletInfo describeWatchlet(const QString &id, const QString &watchModel); Watchlet* getWatchlet(const QString &id, ConfigKey *config, Watch *watch); }; -- cgit v1.2.3