Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/Notifications.qml
Show All 25 Lines | |||||
26 | 26 | | |||
27 | Column { | 27 | Column { | ||
28 | id: notificationsRoot | 28 | id: notificationsRoot | ||
29 | anchors { | 29 | anchors { | ||
30 | left: parent.left | 30 | left: parent.left | ||
31 | right: parent.right | 31 | right: parent.right | ||
32 | } | 32 | } | ||
33 | 33 | | |||
34 | property QtObject notificationPopup | | |||
35 | property alias count: notificationsRepeater.count | 34 | property alias count: notificationsRepeater.count | ||
35 | signal popupShown(var popup) | ||||
36 | 36 | | |||
37 | Component.onCompleted: { | 37 | Component.onCompleted: { | ||
38 | // Create the popup components and pass them to the C++ plugin | 38 | // Create the popup components and pass them to the C++ plugin | ||
39 | for (var i = 0; i < 3; i++) { | 39 | for (var i = 0; i < 3; i++) { | ||
40 | var popup = notificationPopupComponent.createObject(); | 40 | var popup = notificationPopupComponent.createObject(); | ||
41 | notificationPositioner.addNotificationPopup(popup); | 41 | notificationPositioner.addNotificationPopup(popup); | ||
42 | } | 42 | } | ||
43 | } | 43 | } | ||
▲ Show 20 Lines • Show All 165 Lines • ▼ Show 20 Line(s) | |||||
209 | 209 | | |||
210 | NotificationsHelper { | 210 | NotificationsHelper { | ||
211 | id: notificationPositioner | 211 | id: notificationPositioner | ||
212 | popupLocation: plasmoid.nativeInterface.screenPosition | 212 | popupLocation: plasmoid.nativeInterface.screenPosition | ||
213 | 213 | | |||
214 | Component.onCompleted: { | 214 | Component.onCompleted: { | ||
215 | notificationPositioner.setPlasmoidScreenGeometry(plasmoid.nativeInterface.availableScreenRect); | 215 | notificationPositioner.setPlasmoidScreenGeometry(plasmoid.nativeInterface.availableScreenRect); | ||
216 | } | 216 | } | ||
217 | onPopupShown: notificationsRoot.popupShown(popup) | ||||
217 | } | 218 | } | ||
218 | 219 | | |||
219 | Repeater { | 220 | Repeater { | ||
220 | id: notificationsRepeater | 221 | id: notificationsRepeater | ||
221 | model: notificationsModel | 222 | model: notificationsModel | ||
222 | delegate: NotificationDelegate {} | 223 | delegate: NotificationDelegate {} | ||
223 | } | 224 | } | ||
224 | } | 225 | } |