summaryrefslogtreecommitdiffstats
path: root/framework/qml/View.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-18 09:02:22 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-19 11:02:44 +0200
commit925834d2f380dd85336f852795226e2ac6d8ec42 (patch)
tree60d19cd5146902556af6c3dd0fec5ec3c6428dbb /framework/qml/View.qml
parent36e16798b4063e9174b21e7f70a5acc868a7c931 (diff)
downloadkube-925834d2f380dd85336f852795226e2ac6d8ec42.tar.gz
kube-925834d2f380dd85336f852795226e2ac6d8ec42.zip
Introduced an aborted hook to safe the draft before going down.
Diffstat (limited to 'framework/qml/View.qml')
-rw-r--r--framework/qml/View.qml16
1 files changed, 16 insertions, 0 deletions
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 {
31 property int count: contentItems.length 31 property int count: contentItems.length
32 default property alias contentItems: content.data 32 default property alias contentItems: content.data
33 33
34 property bool __aborted: false
35
34 //This signal will be emitted once all initial properties have been set and the view is ready to load 36 //This signal will be emitted once all initial properties have been set and the view is ready to load
35 signal setup() 37 signal setup()
36 Controls2.StackView.onActivated: { 38 Controls2.StackView.onActivated: {
37 root.setup() 39 root.setup()
38 } 40 }
39 41
42 //This signal will be emitted before destruction if the view was not done
43 signal aborted()
44 onAborted: {
45 __aborted = true
46 }
47
48 //This signal will be emitted when the view is done
49 signal done()
50 onDone: {
51 if (!__aborted) {
52 Kube.Fabric.postMessage(Kube.Messages.componentDone, {})
53 }
54 }
55
40 onCurrentIndexChanged: showRelevantSplits() 56 onCurrentIndexChanged: showRelevantSplits()
41 Component.onCompleted: showRelevantSplits() 57 Component.onCompleted: showRelevantSplits()
42 58