diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/qml/View.qml | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/framework/qml/View.qml b/framework/qml/View.qml index 88cc3f10..29798f35 100644 --- a/framework/qml/View.qml +++ b/framework/qml/View.qml | |||
@@ -24,26 +24,36 @@ import QtQuick.Layouts 1.1 | |||
24 | import org.kube.framework 1.0 as Kube | 24 | import org.kube.framework 1.0 as Kube |
25 | 25 | ||
26 | FocusScope { | 26 | FocusScope { |
27 | id: container | 27 | id: root |
28 | |||
29 | property int visibleViews: 2 | ||
30 | property int currentIndex: 0 | ||
31 | property int count: contentItems.length | ||
32 | default property alias contentItems: content.data | ||
33 | 28 | ||
29 | //Search | ||
34 | property rect searchArea: null | 30 | property rect searchArea: null |
35 | property string filter: "" | 31 | property string filter: "" |
36 | property var searchObject: null | 32 | property var searchObject: null |
37 | function triggerSearch() { | 33 | function triggerSearch() { |
38 | root.searchObject = searchComponent.createObject(root) | 34 | searchObject = searchComponent.createObject(root) |
39 | } | 35 | } |
40 | function clearSearch() { | 36 | function clearSearch() { |
41 | if (root.searchObject) { | 37 | if (searchObject) { |
42 | root.searchObject.close() | 38 | searchObject.close() |
43 | root.searchObject = null | 39 | searchObject = null |
44 | } | 40 | } |
45 | } | 41 | } |
46 | 42 | ||
43 | //Help | ||
44 | property Component helpViewComponent: null | ||
45 | function showHelp() { | ||
46 | if (helpViewComponent) { | ||
47 | helpViewComponent.createObject(root).open() | ||
48 | } | ||
49 | } | ||
50 | |||
51 | //View columns | ||
52 | property int visibleViews: 2 | ||
53 | property int currentIndex: 0 | ||
54 | property int count: contentItems.length | ||
55 | default property alias contentItems: content.data | ||
56 | |||
47 | property bool __aborted: false | 57 | property bool __aborted: false |
48 | 58 | ||
49 | //This signal will be emitted once all initial properties have been set and the view is ready to load | 59 | //This signal will be emitted once all initial properties have been set and the view is ready to load |
@@ -97,8 +107,8 @@ FocusScope { | |||
97 | 107 | ||
98 | Kube.IconButton { | 108 | Kube.IconButton { |
99 | anchors { | 109 | anchors { |
100 | top: container.top | 110 | top: root.top |
101 | left: container.left | 111 | left: root.left |
102 | } | 112 | } |
103 | z: 1 | 113 | z: 1 |
104 | color: Kube.Colors.darkBackgroundColor | 114 | color: Kube.Colors.darkBackgroundColor |