aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-02 17:14:47 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-02 17:14:47 -0800
commit713321665396ff17593f1871771eb1207f631289 (patch)
tree0d0251c478e96e5aa7371bd07053d5b7cb72b26c /qt-mobile
parent1f0b716021fa9e16f1a94159d7f4b353c4635308 (diff)
downloadsubsurface-713321665396ff17593f1871771eb1207f631289.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qml/main.qml15
1 files changed, 15 insertions, 0 deletions
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