summaryrefslogtreecommitdiff
path: root/notificationswatchlet/metawatch-digital.qml
diff options
context:
space:
mode:
Diffstat (limited to 'notificationswatchlet/metawatch-digital.qml')
-rw-r--r--notificationswatchlet/metawatch-digital.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/notificationswatchlet/metawatch-digital.qml b/notificationswatchlet/metawatch-digital.qml
new file mode 100644
index 0000000..4a69a0d
--- /dev/null
+++ b/notificationswatchlet/metawatch-digital.qml
@@ -0,0 +1,39 @@
+import QtQuick 1.0
+import QtMobility.location 1.2
+
+Rectangle {
+ width: 96
+ height: 96
+
+ color: "white"
+
+ ListView {
+ id: notifs
+ anchors.fill: parent
+ model: watch.notifications
+ delegate: Column {
+ Text { text: model.modelData.title }
+ Text { text: model.modelData.body }
+ }
+ visible: count > 0;
+ }
+ Text {
+ anchors.fill: parent
+ text: "No notifications"
+ visible: notifs.count == 0;
+ }
+
+ Connections {
+ target: watch
+ onButtonPressed : {
+ switch(button) {
+ case 1:
+ notifs.decrementCurrentIndex();
+ break;
+ case 2:
+ notifs.incrementCurrentIndex();
+ break;
+ }
+ }
+ }
+}