diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-21 10:38:12 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-21 10:38:12 +0200 |
commit | 7b89fa842e450c3219d6ae9dee983d80babc5b19 (patch) | |
tree | 6525caac9cc84d1523486d891d0bd3e4f02b6394 /framework/qml/View.qml | |
parent | 86f2da09bd3edd33a293cab0feb147340bff8f63 (diff) | |
download | kube-7b89fa842e450c3219d6ae9dee983d80babc5b19.tar.gz kube-7b89fa842e450c3219d6ae9dee983d80babc5b19.zip |
A refresh signal that can be used to fetch data.
This will be automatically triggered when the user selects a view,
and whenever f5 is pressed.
Diffstat (limited to 'framework/qml/View.qml')
-rw-r--r-- | framework/qml/View.qml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/qml/View.qml b/framework/qml/View.qml index 64524999..5df76cb6 100644 --- a/framework/qml/View.qml +++ b/framework/qml/View.qml | |||
@@ -64,10 +64,14 @@ FocusScope { | |||
64 | 64 | ||
65 | property bool __aborted: false | 65 | property bool __aborted: false |
66 | 66 | ||
67 | //This signal will be emitted to refresh the views contents. Fetch data in here. | ||
68 | signal refresh() | ||
69 | |||
67 | //This signal will be emitted once all initial properties have been set and the view is ready to load | 70 | //This signal will be emitted once all initial properties have been set and the view is ready to load |
68 | signal setup() | 71 | signal setup() |
69 | StackView.onActivated: { | 72 | StackView.onActivated: { |
70 | root.setup() | 73 | root.setup() |
74 | root.refresh() | ||
71 | } | 75 | } |
72 | 76 | ||
73 | StackView.onDeactivated: { | 77 | StackView.onDeactivated: { |