summaryrefslogtreecommitdiff
path: root/sowatchui
diff options
context:
space:
mode:
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];