Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationItem.qml
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 33 | ColumnLayout { | |||
---|---|---|---|---|---|
80 | property int thumbnailBottomPadding: 0 | 80 | property int thumbnailBottomPadding: 0 | ||
81 | 81 | | |||
82 | property alias timeout: notificationHeading.timeout | 82 | property alias timeout: notificationHeading.timeout | ||
83 | property alias remainingTime: notificationHeading.remainingTime | 83 | property alias remainingTime: notificationHeading.remainingTime | ||
84 | 84 | | |||
85 | readonly property bool menuOpen: bodyLabel.contextMenu !== null | 85 | readonly property bool menuOpen: bodyLabel.contextMenu !== null | ||
86 | || (thumbnailStripLoader.item && thumbnailStripLoader.item.menuOpen) | 86 | || (thumbnailStripLoader.item && thumbnailStripLoader.item.menuOpen) | ||
87 | || (jobLoader.item && jobLoader.item.menuOpen) | 87 | || (jobLoader.item && jobLoader.item.menuOpen) | ||
88 | readonly property bool dragging: thumbnailStripLoader.item && thumbnailStripLoader.item.dragging | 88 | readonly property bool dragging: (thumbnailStripLoader.item && thumbnailStripLoader.item.dragging) | ||
89 | || (jobLoader.item && jobLoader.item.dragging) | ||||
89 | 90 | | |||
90 | signal bodyClicked(var mouse) | 91 | signal bodyClicked(var mouse) | ||
91 | signal closeClicked | 92 | signal closeClicked | ||
92 | signal configureClicked | 93 | signal configureClicked | ||
93 | signal dismissClicked | 94 | signal dismissClicked | ||
94 | signal actionInvoked(string actionName) | 95 | signal actionInvoked(string actionName) | ||
95 | signal openUrl(string url) | 96 | signal openUrl(string url) | ||
96 | signal fileActionInvoked | 97 | signal fileActionInvoked | ||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | 242 | KQCAddons.QImageItem { | |||
242 | id: imageItem | 243 | id: imageItem | ||
243 | readonly property bool active: !null && nativeWidth > 0 | 244 | readonly property bool active: !null && nativeWidth > 0 | ||
244 | anchors.fill: parent | 245 | anchors.fill: parent | ||
245 | smooth: true | 246 | smooth: true | ||
246 | fillMode: KQCAddons.QImageItem.PreserveAspectFit | 247 | fillMode: KQCAddons.QImageItem.PreserveAspectFit | ||
247 | visible: active | 248 | visible: active | ||
248 | image: typeof notificationItem.icon === "object" ? notificationItem.icon : undefined | 249 | image: typeof notificationItem.icon === "object" ? notificationItem.icon : undefined | ||
249 | } | 250 | } | ||
251 | | ||||
252 | // JobItem reparents a file icon here for finished jobs with one total file | ||||
250 | } | 253 | } | ||
251 | } | 254 | } | ||
252 | 255 | | |||
253 | // Job progress reporting | 256 | // Job progress reporting | ||
254 | Loader { | 257 | Loader { | ||
255 | id: jobLoader | 258 | id: jobLoader | ||
256 | Layout.fillWidth: true | 259 | Layout.fillWidth: true | ||
257 | active: notificationItem.notificationType === NotificationManager.Notifications.JobType | 260 | active: notificationItem.notificationType === NotificationManager.Notifications.JobType | ||
258 | visible: active | 261 | visible: active | ||
259 | sourceComponent: JobItem { | 262 | sourceComponent: JobItem { | ||
263 | iconContainerItem: iconContainer | ||||
264 | | ||||
260 | jobState: notificationItem.jobState | 265 | jobState: notificationItem.jobState | ||
261 | jobError: notificationItem.jobError | 266 | jobError: notificationItem.jobError | ||
262 | percentage: notificationItem.percentage | 267 | percentage: notificationItem.percentage | ||
263 | suspendable: notificationItem.suspendable | 268 | suspendable: notificationItem.suspendable | ||
264 | killable: notificationItem.killable | 269 | killable: notificationItem.killable | ||
265 | 270 | | |||
266 | jobDetails: notificationItem.jobDetails | 271 | jobDetails: notificationItem.jobDetails | ||
267 | showDetails: notificationItem.showDetails | 272 | showDetails: notificationItem.showDetails | ||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |