summaryrefslogtreecommitdiff
path: root/sowatchui
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-10 00:45:24 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-10 00:45:24 +0200
commitd194a6112299cfe045c34e5cdb6adbbb81418d09 (patch)
tree4973f946b6701c8aea8bed73e5c4c6c978ce8e66 /sowatchui
parentb1ccb04d7dd2fb20def829be084474ed329d4988 (diff)
downloadsowatch-d194a6112299cfe045c34e5cdb6adbbb81418d09.tar.gz
sowatch-d194a6112299cfe045c34e5cdb6adbbb81418d09.zip
new watchhandler for watchlet/prov lifecycle mgmt
Diffstat (limited to 'sowatchui')
-rw-r--r--sowatchui/sowatchui.pro4
-rw-r--r--sowatchui/watchesmodel.cpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/sowatchui/sowatchui.pro b/sowatchui/sowatchui.pro
index 9caa163..c0589fc 100644
--- a/sowatchui/sowatchui.pro
+++ b/sowatchui/sowatchui.pro
@@ -10,9 +10,9 @@ DEPLOYMENTFOLDERS = qml_folder
# Install icon files also to resources directory
res_files.files += sowatch64.png sowatch80.png
!isEmpty(MEEGO_VERSION_MAJOR)|maemo5 {
- res_files.path = /opt/sowatch/share/metawatch
+ res_files.path = /opt/sowatch/share
} else {
- res_files.path = /usr/share/sowatch/metawatch
+ res_files.path = /usr/share/sowatch
}
INSTALLS += res_files
diff --git a/sowatchui/watchesmodel.cpp b/sowatchui/watchesmodel.cpp
index 0930715..302e484 100644
--- a/sowatchui/watchesmodel.cpp
+++ b/sowatchui/watchesmodel.cpp
@@ -12,6 +12,7 @@ WatchesModel::WatchesModel(QObject *parent) :
{
QHash<int, QByteArray> roles = roleNames();
roles[Qt::DisplayRole] = QByteArray("title");
+ roles[Qt::DecorationRole] = QByteArray("iconSource");
roles[Qt::StatusTipRole] = QByteArray("subtitle");
roles[EnabledRole] = QByteArray("enabled");
roles[ConfigKeyRole] = QByteArray("configKey");
@@ -44,6 +45,12 @@ QVariant WatchesModel::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::DisplayRole:
return config->value("name");
+ case Qt::DecorationRole:
+#if defined(QT_DEBUG)
+ return QVariant(QDir::current().absoluteFilePath(SOWATCH_RESOURCES_DIR "/sowatch64.png"));
+#else
+ return QVariant(SOWATCH_RESOURCES_DIR "/sowatch64.png");
+#endif
case Qt::StatusTipRole:
if (config->value("enable").toBool()) {
QString status = _status[id];