From aad1e8e930bade201aa9bb1db4568423394ced14 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Tue, 3 Jan 2012 21:28:12 +0100 Subject: adding icon & moving qmafwwatchlet qml out of qrc --- qmafwwatchlet/metawatch-digital.qml | 10 ++++++++++ qmafwwatchlet/qmafwwatchlet.cpp | 2 +- qmafwwatchlet/qmafwwatchlet.pro | 13 ++++++------- qmafwwatchlet/qmafwwatchlet.qrc | 5 ----- 4 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 qmafwwatchlet/qmafwwatchlet.qrc diff --git a/qmafwwatchlet/metawatch-digital.qml b/qmafwwatchlet/metawatch-digital.qml index 7ceda73..e5a6eb4 100644 --- a/qmafwwatchlet/metawatch-digital.qml +++ b/qmafwwatchlet/metawatch-digital.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import com.javispedro.sowatch.metawatch 1.0 Rectangle { width: 96 @@ -6,6 +7,15 @@ Rectangle { color: "white" + MWTitle { + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + visible: player.mediaArt.length == 0 + text: qsTr("Music") + icon.source: "icon.png" + } + Image { anchors.fill: parent fillMode: Image.PreserveAspectFit diff --git a/qmafwwatchlet/qmafwwatchlet.cpp b/qmafwwatchlet/qmafwwatchlet.cpp index d53d136..fb537a6 100644 --- a/qmafwwatchlet/qmafwwatchlet.cpp +++ b/qmafwwatchlet/qmafwwatchlet.cpp @@ -21,7 +21,7 @@ QMafwWatchlet::QMafwWatchlet(WatchServer* server) : connect(this, SIGNAL(deactivated()), _player, SLOT(deactivate())); rootContext()->setContextProperty("player", _player); - setSource(QUrl("qrc:/qmafwwatchlet/" + server->watch()->model() + ".qml")); + setSource(QUrl(SOWATCH_QML_DIR "/qmafwwatchlet/" + server->watch()->model() + ".qml")); } void QMafwWatchlet::handleRendererAdded(const QString &uuid) diff --git a/qmafwwatchlet/qmafwwatchlet.pro b/qmafwwatchlet/qmafwwatchlet.pro index c02e3f4..4a59ff5 100644 --- a/qmafwwatchlet/qmafwwatchlet.pro +++ b/qmafwwatchlet/qmafwwatchlet.pro @@ -13,22 +13,21 @@ HEADERS += qmafwwatchlet.h \ qmafwwatchletplugin.h \ qmafwwatchletplayer.h +qml_files.files = metawatch-digital.qml icon.png + LIBS += -L$$OUT_PWD/../libsowatch/ -lsowatch INCLUDEPATH += $$PWD/../libsowatch DEPENDPATH += $$PWD/../libsowatch +QML_IMPORT_PATH += $$PWD/../metawatch/qml unix:!symbian { !isEmpty(MEEGO_VERSION_MAJOR)|maemo5 { QMAKE_RPATHDIR += /opt/sowatch/lib target.path = /opt/sowatch/lib/watchlets + qml_files.path = /opt/sowatch/qml/$$TARGET } else { target.path = /usr/lib/sowatch/watchlets + qml_files.path = /usr/share/sowatch/qml/$$TARGET } - INSTALLS += target + INSTALLS += target qml_files } - -OTHER_FILES += \ - metawatch-digital.qml - -RESOURCES += \ - qmafwwatchlet.qrc diff --git a/qmafwwatchlet/qmafwwatchlet.qrc b/qmafwwatchlet/qmafwwatchlet.qrc deleted file mode 100644 index 6b228a2..0000000 --- a/qmafwwatchlet/qmafwwatchlet.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - metawatch-digital.qml - - -- cgit v1.2.3