summaryrefslogtreecommitdiff
path: root/qmafwwatchlet/metawatch-digital.qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-27 04:51:30 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-27 04:51:30 +0200
commita644a7cc6749f8dd5ca20589ee6e59acc2892b3e (patch)
treeb995528dc14d1f58d9d7c958d1eaad855b2a2412 /qmafwwatchlet/metawatch-digital.qml
parent0822b88738e00625efd27ccca9119885272924d2 (diff)
downloadsowatch-a644a7cc6749f8dd5ca20589ee6e59acc2892b3e.tar.gz
sowatch-a644a7cc6749f8dd5ca20589ee6e59acc2892b3e.zip
new qmafw watchlet
Diffstat (limited to 'qmafwwatchlet/metawatch-digital.qml')
-rw-r--r--qmafwwatchlet/metawatch-digital.qml52
1 files changed, 52 insertions, 0 deletions
diff --git a/qmafwwatchlet/metawatch-digital.qml b/qmafwwatchlet/metawatch-digital.qml
new file mode 100644
index 0000000..0ec07cd
--- /dev/null
+++ b/qmafwwatchlet/metawatch-digital.qml
@@ -0,0 +1,52 @@
+import QtQuick 1.0
+
+Rectangle {
+ width: 96
+ height: 96
+
+ color: "white"
+
+ Image {
+ anchors.fill: parent
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ source: player.imageUrl
+ }
+
+ Rectangle {
+ x: 0
+ width: parent.width
+ height: 14
+ anchors.bottom: parent.bottom
+ color: "white"
+
+ Text {
+ anchors.fill: parent
+ text: player.title
+ color: "black"
+ }
+ }
+
+ Connections {
+ target: watch
+ onButtonPressed : {
+ switch(button) {
+ case 1:
+ player.volumeUp();
+ break;
+ case 2:
+ player.volumeDown();
+ break;
+ case 3:
+ player.playPause();
+ break;
+ case 4:
+ player.next();
+ break;
+ case 5:
+ player.previous();
+ break;
+ }
+ }
+ }
+}