summaryrefslogtreecommitdiff
path: root/sowatchui/configuredwatchletsmodel.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-14 01:13:41 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-14 01:13:41 +0200
commit80c58c124caf17f670d8efc120f5ae4bfd9aa09f (patch)
treec6d036f06437e54f80afd65e1a700a018cab994b /sowatchui/configuredwatchletsmodel.cpp
parentc3392e5d539e87f4720b3d107aaefffdc9579f4d (diff)
downloadsowatch-80c58c124caf17f670d8efc120f5ae4bfd9aa09f.tar.gz
sowatch-80c58c124caf17f670d8efc120f5ae4bfd9aa09f.zip
added liveview watchlet menu (API break)
Diffstat (limited to 'sowatchui/configuredwatchletsmodel.cpp')
-rw-r--r--sowatchui/configuredwatchletsmodel.cpp8
1 files changed, 5 insertions, 3 deletions
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);
}
}