From 925834d2f380dd85336f852795226e2ac6d8ec42 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 18 Apr 2018 09:02:22 +0200 Subject: Introduced an aborted hook to safe the draft before going down. --- framework/qml/View.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'framework') diff --git a/framework/qml/View.qml b/framework/qml/View.qml index b0c108fc..f4a34701 100644 --- a/framework/qml/View.qml +++ b/framework/qml/View.qml @@ -31,12 +31,28 @@ FocusScope { property int count: contentItems.length default property alias contentItems: content.data + property bool __aborted: false + //This signal will be emitted once all initial properties have been set and the view is ready to load signal setup() Controls2.StackView.onActivated: { root.setup() } + //This signal will be emitted before destruction if the view was not done + signal aborted() + onAborted: { + __aborted = true + } + + //This signal will be emitted when the view is done + signal done() + onDone: { + if (!__aborted) { + Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) + } + } + onCurrentIndexChanged: showRelevantSplits() Component.onCompleted: showRelevantSplits() -- cgit v1.2.3