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>
This commit is contained in:
Dirk Hohndel 2016-03-02 17:14:47 -08:00
parent 1f0b716021
commit 7133216653

View file

@ -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