summaryrefslogtreecommitdiff
path: root/metawatchwatchlets/metawatch-digital-notification.qml
diff options
context:
space:
mode:
Diffstat (limited to 'metawatchwatchlets/metawatch-digital-notification.qml')
-rw-r--r--metawatchwatchlets/metawatch-digital-notification.qml54
1 files changed, 44 insertions, 10 deletions
diff --git a/metawatchwatchlets/metawatch-digital-notification.qml b/metawatchwatchlets/metawatch-digital-notification.qml
index 6856bac..616185b 100644
--- a/metawatchwatchlets/metawatch-digital-notification.qml
+++ b/metawatchwatchlets/metawatch-digital-notification.qml
@@ -20,7 +20,7 @@ MWPage {
Column {
id: defaultContainer
- visible: false
+ visible: true
anchors.left: parent.left
anchors.leftMargin: 1
width: page.width - 3
@@ -37,6 +37,35 @@ MWPage {
}
Column {
+ id: callContainer
+ visible: false
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ anchors.left: parent.left
+ anchors.leftMargin: 1
+ width: page.width - 5
+ spacing: 2
+
+ Image {
+ source: "notification-phone.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ MWLabel {
+ text: curNotification ? curNotification.title : ""
+ font.pixelSize: 16
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ width: parent.width
+ }
+ MWLabel {
+ text: curNotification ? curNotification.body : ""
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ width: parent.width
+ }
+ }
+
+ Column {
id: emailContainer
visible: false
anchors.left: parent.left
@@ -83,19 +112,24 @@ MWPage {
states: [
State {
- when: curNotification && curNotification.type === Notification.EmailNotification
- PropertyChanges { target: emailContainer; visible: true; }
+ name: "CallNotification"
+ when: curNotification.type === Notification.CallNotification
+ PropertyChanges { target: defaultContainer; visible: false; }
+ PropertyChanges { target: callContainer; visible: true; }
},
State {
- when: curNotification && (
- curNotification.type === Notification.ImNotification ||
- curNotification.type === Notification.SmsNotification ||
- curNotification.type === Notification.MmsNotification)
- PropertyChanges { target: chatContainer; visible: true; }
+ name: "EmailNotification"
+ when: curNotification.type === Notification.EmailNotification
+ PropertyChanges { target: defaultContainer; visible: false; }
+ PropertyChanges { target: emailContainer; visible: true; }
},
State {
- when: curNotification // Any other notification type
- PropertyChanges { target: defaultContainer; visible: true; }
+ name: "ImNotification"
+ when: curNotification.type === Notification.ImNotification ||
+ curNotification.type === Notification.SmsNotification ||
+ curNotification.type === Notification.MmsNotification
+ PropertyChanges { target: defaultContainer; visible: false; }
+ PropertyChanges { target: chatContainer; visible: true; }
}
]