aboutsummaryrefslogtreecommitdiffstats
path: root/imports_system/system/models/notification/NotificationModel.qml
diff options
context:
space:
mode:
authorAlexandra Betouni <ABetouni@luxoft.com>2019-07-25 12:11:15 +0200
committerAlexandra Betouni <ABetouni@luxoft.com>2019-09-19 10:18:53 +0000
commit5a5eafb3b8a9053489b821e957b9135ee9713ae7 (patch)
tree29c327147f410e91240e20e425552753ca80dd62 /imports_system/system/models/notification/NotificationModel.qml
parent77280945b99228a2936bc333eac797b22a775720 (diff)
[cursormanagement] initial integration
Neptune has now support for cursor using cursor management plugin from https://codereview.qt-project.org/admin/repos/qt-labs/cursormanagement Also a fallback solution is implemented in order to don't break the UI if the cursor management plugin is not available. Known issues: No cursor inside all downloaded apps No cursor in color selector No cursor in tuner's manual slider No cursor in slider widget Task-number: AUTOSUITE-1156 Change-Id: I31b0ace8b1ebdc4e6bbd356840373092f757493e Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
Diffstat (limited to 'imports_system/system/models/notification/NotificationModel.qml')
-rw-r--r--imports_system/system/models/notification/NotificationModel.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/imports_system/system/models/notification/NotificationModel.qml b/imports_system/system/models/notification/NotificationModel.qml
index 97964cd7..244d3a4e 100644
--- a/imports_system/system/models/notification/NotificationModel.qml
+++ b/imports_system/system/models/notification/NotificationModel.qml
@@ -42,6 +42,7 @@ QtObject {
signal notificationAdded()
signal notificationRemoved()
signal notificationClosed()
+ signal notificationsCleared()
readonly property Connections notificationManagerConnection: Connections {
target: root.model
@@ -54,6 +55,15 @@ QtObject {
}
}
+ function showNotification() {
+ root.notificationToastVisible = true;
+ }
+
+ function closeNotification() {
+ root.notificationToastVisible = false;
+ root.notificationClosed();
+ }
+
function buttonClicked(id) {
NotificationManager.triggerNotificationAction(id, "");
root.notificationClosed();
@@ -67,5 +77,6 @@ QtObject {
while (root.count > 0) {
removeNotification(NotificationManager.get(0).id);
}
+ root.notificationsCleared();
}
}