From 713321665396ff17593f1871771eb1207f631289 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 2 Mar 2016 17:14:47 -0800 Subject: QML UI: show notification when cloud is accessed And hide the notification either after 5 seconds or once we are done. This requires an extension to the Kirigami components that isn't upstream, yet. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/main.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index d57d01bbb..07caa4189 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -13,6 +13,21 @@ MobileComponents.ApplicationWindow { title: qsTr("Subsurface-mobile") property bool fullscreen: true property int oldStatus: -1 + property alias sharedNotificationComponent: detailsWindow.notificationComponent + property alias accessingCloud: manager.accessingCloud + property QtObject notification: null + onAccessingCloudChanged: { + if (accessingCloud) { + notification = sharedNotificationComponent.createObject(rootItem); + notification.showNotification("Accessing Subsurface Cloud Storage", 5000); + } else { + if (notification) { + notification.hideNotification(); + } + } + + sharedNotificationComponent.show + } FontMetrics { id: fontMetrics -- cgit v1.2.3-70-g09d2