Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationPopup.qml
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 31 | PlasmaCore.Dialog { | |||
---|---|---|---|---|---|
71 | signal closeClicked | 71 | signal closeClicked | ||
72 | 72 | | |||
73 | signal defaultActionInvoked | 73 | signal defaultActionInvoked | ||
74 | signal actionInvoked(string actionName) | 74 | signal actionInvoked(string actionName) | ||
75 | signal openUrl(string url) | 75 | signal openUrl(string url) | ||
76 | signal fileActionInvoked | 76 | signal fileActionInvoked | ||
77 | 77 | | |||
78 | signal expired | 78 | signal expired | ||
79 | signal hoverEntered | ||||
80 | signal hoverExited | ||||
79 | 81 | | |||
80 | signal suspendJobClicked | 82 | signal suspendJobClicked | ||
81 | signal resumeJobClicked | 83 | signal resumeJobClicked | ||
82 | signal killJobClicked | 84 | signal killJobClicked | ||
83 | 85 | | |||
84 | property int defaultTimeout: 5000 | 86 | property int defaultTimeout: 5000 | ||
85 | readonly property int effectiveTimeout: { | 87 | readonly property int effectiveTimeout: { | ||
86 | if (timeout === -1) { | 88 | if (timeout === -1) { | ||
Show All 23 Lines | 110 | mainItem: MouseArea { | |||
110 | width: notificationPopup.popupWidth | 112 | width: notificationPopup.popupWidth | ||
111 | height: notificationItem.implicitHeight + notificationItem.y | 113 | height: notificationItem.implicitHeight + notificationItem.y | ||
112 | hoverEnabled: true | 114 | hoverEnabled: true | ||
113 | 115 | | |||
114 | cursorShape: hasDefaultAction ? Qt.PointingHandCursor : Qt.ArrowCursor | 116 | cursorShape: hasDefaultAction ? Qt.PointingHandCursor : Qt.ArrowCursor | ||
115 | acceptedButtons: hasDefaultAction ? Qt.LeftButton : Qt.NoButton | 117 | acceptedButtons: hasDefaultAction ? Qt.LeftButton : Qt.NoButton | ||
116 | 118 | | |||
117 | onClicked: notificationPopup.defaultActionInvoked() | 119 | onClicked: notificationPopup.defaultActionInvoked() | ||
120 | onEntered: notificationPopup.hoverEntered() | ||||
121 | onExited: notificationPopup.hoverExited() | ||||
118 | 122 | | |||
119 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | 123 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | ||
120 | LayoutMirroring.childrenInherit: true | 124 | LayoutMirroring.childrenInherit: true | ||
121 | 125 | | |||
122 | Timer { | 126 | Timer { | ||
123 | id: timer | 127 | id: timer | ||
124 | interval: notificationPopup.effectiveTimeout | 128 | interval: notificationPopup.effectiveTimeout | ||
125 | running: notificationPopup.visible && !area.containsMouse && interval > 0 | 129 | running: notificationPopup.visible && !area.containsMouse && interval > 0 | ||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |