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) --- sowatchui/configuredwatchletsmodel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sowatchui') diff --git a/sowatchui/configuredwatchletsmodel.cpp b/sowatchui/configuredwatchletsmodel.cpp index dd301b7..0bea11e 100644 --- a/sowatchui/configuredwatchletsmodel.cpp +++ b/sowatchui/configuredwatchletsmodel.cpp @@ -70,7 +70,7 @@ QVariant ConfiguredWatchletsModel::data(const QModelIndex &index, int role) cons case Qt::DisplayRole: return QVariant::fromValue(_info[id].name); case Qt::DecorationRole: - return QVariant::fromValue(_info[id].icon); + return QVariant::fromValue(_info[id].phoneIcon); case NameRole: return QVariant::fromValue(id); case ConfigQmlUrlRole: @@ -131,11 +131,13 @@ void ConfiguredWatchletsModel::reload() qDebug() << "Reloading watchlets"; + QString watchModel = _config->value("driver").toString(); + QStringList all = registry->allWatchlets(); foreach (const QString& s, all) { WatchletPluginInterface *plugin = registry->getWatchletPlugin(s); if (plugin) { - _info[s] = plugin->describeWatchlet(s); + _info[s] = plugin->describeWatchlet(s, watchModel); } else { WatchletPluginInterface::WatchletInfo info; info.name = s; @@ -149,7 +151,7 @@ void ConfiguredWatchletsModel::reload() if (_unadded) { qDebug() << "Listing unadded watchlets from" << all; foreach (const QString& s, all) { - if (!_info[s].hidden && !_enabled.contains(s)) { + if (_info[s].visible && !_enabled.contains(s)) { _list.append(s); } } -- cgit v1.2.3