@@ -33,8 +33,7 @@ Item {
33 Notification {
33 Notification {
34 id: mockNotificationDefault
34 id: mockNotificationDefault
35 type: Notification.PlaceHolder
35 type: Notification.PlaceHolder
36− nid: 1 //mockModel.getNextId()
36+ nid: 1
38 summary: ""
37 summary: ""
@@ -47,18 +46,11 @@ Item {
47 dynamicRoles: true
46 dynamicRoles: true
49 signal actionInvoked(string actionId)
48 signal actionInvoked(string actionId)
50− property var internalId: 0
52− function getNextId() {
50+ function getRaw(id) {
56− function getRaw(nid) {
57− print ("Looking for:", nid)
58 for (var i = 0; i < mockModel.count; i++) {
51 for (var i = 0; i < mockModel.count; i++) {
59− if (nid === mockModel.get(i).nid) {
52+ if (id === mockModel.get(i).nid) {
60− print ("Found something...", i)
61− return mockModel.get(i).notification
53+ return mockModel.get(i)
@@ -72,7 +64,7 @@ Item {
72 Notification {
64 Notification {
73 id: mock2over1SnapDecisionNotification
65 id: mock2over1SnapDecisionNotification
74 type: Notification.SnapDecision
66 type: Notification.SnapDecision
75− nid: 2 //mockModel.getNextId()
67+ nid: 2
76 hints: {"x-canonical-private-affirmative-tint": "true"}
68 hints: {"x-canonical-private-affirmative-tint": "true"}
77 summary: "Theatre at Ferria Stadium"
69 summary: "Theatre at Ferria Stadium"
78 body: "at Ferria Stadium in Bilbao, Spain\n07578545317"
70 body: "at Ferria Stadium in Bilbao, Spain\n07578545317"
@@ -85,12 +77,20 @@ Item {
86 function add2over1SnapDecisionNotification() {
78 function add2over1SnapDecisionNotification() {
87 mockModel.append(mock2over1SnapDecisionNotification)
79 mockModel.append(mock2over1SnapDecisionNotification)
81+ // trying out/debugging stuff
82+ mockModel.getRaw(2).close()
83+ print("summary:", mock2over1SnapDecisionNotification.summary)
84+ print("summary:", mockModel.getRaw(2).summary)
85+ print("summary:", mockModel.get(1).summary)
86+ mock2over1SnapDecisionNotification.close()
87+ mock2over1SnapDecisionNotification.invokeAction("ok_id")
90 Notification {
90 Notification {
91 id: mockEphemeralNotification
91 id: mockEphemeralNotification
92 type: Notification.Ephemeral
92 type: Notification.Ephemeral
93− nid: 3 //mockModel.getNextId()
93+ nid: 3
94 summary: "Cole Raby"
94 summary: "Cole Raby"
95 body: "I did not expect it to be that late."
95 body: "I did not expect it to be that late."
96 icon: "../graphics/avatars/amanda.png"
96 icon: "../graphics/avatars/amanda.png"
@@ -105,7 +105,7 @@ Item {
105 Notification {
105 Notification {
106 id: mockEphemeralNonShapedIconNotification
106 id: mockEphemeralNonShapedIconNotification
107 type: Notification.Ephemeral
107 type: Notification.Ephemeral
108− nid: 4 //mockModel.getNextId()
108+ nid: 4
109 hints: {"x-canonical-non-shaped-icon": "true"}
109 hints: {"x-canonical-non-shaped-icon": "true"}
110 summary: "Contacts"
110 summary: "Contacts"
111 body: "Synchronised contacts-database with cloud-storage."
111 body: "Synchronised contacts-database with cloud-storage."
@@ -121,7 +121,7 @@ Item {
121 Notification {
121 Notification {
122 id: mockEphemeralIconSummaryNotification
122 id: mockEphemeralIconSummaryNotification
123 type: Notification.Ephemeral
123 type: Notification.Ephemeral
124− nid: 5 //mockModel.getNextId()
124+ nid: 5
125 hints: {"x-canonical-non-shaped-icon": "false"}
125 hints: {"x-canonical-non-shaped-icon": "false"}
126 summary: "Photo upload completed"
126 summary: "Photo upload completed"
@@ -137,7 +137,7 @@ Item {
137 Notification {
137 Notification {
138 id: mockInteractiveNotification
138 id: mockInteractiveNotification
139 type: Notification.Interactive
139 type: Notification.Interactive
140− nid: 6 //mockModel.getNextId()
140+ nid: 6
141 summary: "Interactive notification"
141 summary: "Interactive notification"
142 body: "This is a notification that can be clicked"
142 body: "This is a notification that can be clicked"
143 icon: "../graphics/avatars/anna_olsson.png"
143 icon: "../graphics/avatars/anna_olsson.png"
@@ -152,7 +152,7 @@ Item {
152 Notification {
152 Notification {
153 id: mockConfirmationNotification
153 id: mockConfirmationNotification
154 type: Notification.Confirmation
154 type: Notification.Confirmation
155− nid: 7 //mockModel.getNextId()
155+ nid: 7
156 hints: {"x-canonical-non-shaped-icon": "true"}
156 hints: {"x-canonical-non-shaped-icon": "true"}
157 summary: "Confirmation notification"
157 summary: "Confirmation notification"
@@ -169,7 +169,7 @@ Item {
169 Notification {
169 Notification {
170 id: mock2ndConfirmationNotification
170 id: mock2ndConfirmationNotification
171 type: Notification.Confirmation
171 type: Notification.Confirmation
172− nid: 8 //mockModel.getNextId()
172+ nid: 8
173 hints: {"x-canonical-non-shaped-icon": "true",
173 hints: {"x-canonical-non-shaped-icon": "true",
174 "x-canonical-value-bar-tint": "true"}
174 "x-canonical-value-bar-tint": "true"}
175 summary: "Confirmation notification"
175 summary: "Confirmation notification"
@@ -295,7 +295,7 @@ Item {
296 tag: "2-over-1 Snap Decision with button-tint",
296 tag: "2-over-1 Snap Decision with button-tint",
297 type: Notification.SnapDecision,
297 type: Notification.SnapDecision,
298− //nid: mockModel.getNextId(),
298+ nid: 2,
299 hints: {"x-canonical-private-affirmative-tint": "true"},
299 hints: {"x-canonical-private-affirmative-tint": "true"},
300 summary: "Theatre at Ferria Stadium",
300 summary: "Theatre at Ferria Stadium",
301 body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
301 body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
@@ -321,7 +321,7 @@ Item {
322 tag: "Ephemeral notification - icon-summary layout",
322 tag: "Ephemeral notification - icon-summary layout",
323 type: Notification.Ephemeral,
323 type: Notification.Ephemeral,
324− //nid: mockModel.getNextId(),
324+ nid: 3,
325 hints: {},
325 hints: {},
326 summary: "Photo upload completed",
326 summary: "Photo upload completed",
327 body: "",
327 body: "",
@@ -345,7 +345,7 @@ Item {
346 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
346 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
347 type: Notification.Ephemeral,
347 type: Notification.Ephemeral,
348− //nid: mockModel.getNextId(),
348+ nid: 4,
349 hints: {"x-canonical-private-affirmative-tint": "false",
349 hints: {"x-canonical-private-affirmative-tint": "false",
350 "sound-file": "dummy.ogg",
350 "sound-file": "dummy.ogg",
351 "suppress-sound": "true"},
351 "suppress-sound": "true"},
@@ -372,7 +372,7 @@ Item {
373 tag: "Interactive notification",
373 tag: "Interactive notification",
374 type: Notification.Interactive,
374 type: Notification.Interactive,
375− //nid: mockModel.getNextId(),
375+ nid: 5,
376 hints: {"x-canonical-private-affirmative-tint": "false",
376 hints: {"x-canonical-private-affirmative-tint": "false",
377 "sound-file": "dummy.ogg"},
377 "sound-file": "dummy.ogg"},
378 summary: "Interactive notification",
378 summary: "Interactive notification",
@@ -397,7 +397,7 @@ Item {
398 tag: "Snap Decision without secondary icon and no button-tint",
398 tag: "Snap Decision without secondary icon and no button-tint",
399 type: Notification.SnapDecision,
399 type: Notification.SnapDecision,
400− //nid: mockModel.getNextId(),
400+ nid: 6,
401 hints: {"x-canonical-private-affirmative-tint": "false",
401 hints: {"x-canonical-private-affirmative-tint": "false",
402 "sound-file": "dummy.ogg"},
402 "sound-file": "dummy.ogg"},
403 summary: "Bro Coly",
403 summary: "Bro Coly",
@@ -423,7 +423,7 @@ Item {
424 tag: "Ephemeral notification",
424 tag: "Ephemeral notification",
425 type: Notification.Ephemeral,
425 type: Notification.Ephemeral,
426− //nid: mockModel.getNextId(),
426+ nid: 7,
427 hints: {"x-canonical-private-affirmative-tint": "false",
427 hints: {"x-canonical-private-affirmative-tint": "false",
428 "sound-file": "dummy.ogg"},
428 "sound-file": "dummy.ogg"},
429 summary: "Cole Raby",
429 summary: "Cole Raby",
@@ -448,7 +448,7 @@ Item {
449 tag: "Ephemeral notification with non-shaped icon",
449 tag: "Ephemeral notification with non-shaped icon",
450 type: Notification.Ephemeral,
450 type: Notification.Ephemeral,
451− //nid: mockModel.getNextId(),
451+ nid: 8,
452 hints: {"x-canonical-private-affirmative-tint": "false",
452 hints: {"x-canonical-private-affirmative-tint": "false",
453 "x-canonical-non-shaped-icon": "true"},
453 "x-canonical-non-shaped-icon": "true"},
454 summary: "Contacts",
454 summary: "Contacts",
@@ -473,7 +473,7 @@ Item {
474 tag: "Confirmation notification with value",
474 tag: "Confirmation notification with value",
475 type: Notification.Confirmation,
475 type: Notification.Confirmation,
476− //nid: mockModel.getNextId(),
476+ nid: 9,
477 hints: {"x-canonical-non-shaped-icon": "true"},
477 hints: {"x-canonical-non-shaped-icon": "true"},
478 summary: "",
478 summary: "",
479 body: "",
479 body: "",
@@ -497,7 +497,7 @@ Item {
498 tag: "Confirmation notification with value, label and tint",
498 tag: "Confirmation notification with value, label and tint",
499 type: Notification.Confirmation,
499 type: Notification.Confirmation,
500− //nid: mockModel.getNextId(),
500+ nid: 10,
501 hints: {"x-canonical-non-shaped-icon": "true",
501 hints: {"x-canonical-non-shaped-icon": "true",
502 "x-canonical-value-bar-tint" : "true"},
502 "x-canonical-value-bar-tint" : "true"},
503 summary: "",
503 summary: "",