diff options
Diffstat (limited to 'framework/qml/View.qml')
-rw-r--r-- | framework/qml/View.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/framework/qml/View.qml b/framework/qml/View.qml index 9daa76a8..88cc3f10 100644 --- a/framework/qml/View.qml +++ b/framework/qml/View.qml | |||
@@ -31,6 +31,19 @@ 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 rect searchArea: null | ||
35 | property string filter: "" | ||
36 | property var searchObject: null | ||
37 | function triggerSearch() { | ||
38 | root.searchObject = searchComponent.createObject(root) | ||
39 | } | ||
40 | function clearSearch() { | ||
41 | if (root.searchObject) { | ||
42 | root.searchObject.close() | ||
43 | root.searchObject = null | ||
44 | } | ||
45 | } | ||
46 | |||
34 | property bool __aborted: false | 47 | property bool __aborted: false |
35 | 48 | ||
36 | //This signal will be emitted once all initial properties have been set and the view is ready to load | 49 | //This signal will be emitted once all initial properties have been set and the view is ready to load |
@@ -104,4 +117,16 @@ FocusScope { | |||
104 | id: content | 117 | id: content |
105 | anchors.fill: parent | 118 | anchors.fill: parent |
106 | } | 119 | } |
120 | |||
121 | Component { | ||
122 | id: searchComponent | ||
123 | Kube.SearchPopup { | ||
124 | searchArea: root.searchArea | ||
125 | onFilterChanged: { | ||
126 | root.filter = filter | ||
127 | } | ||
128 | } | ||
129 | |||
130 | } | ||
131 | |||
107 | } | 132 | } |