summaryrefslogtreecommitdiffstats
path: root/framework/qml/View.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-06 22:47:19 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-12 16:08:21 +0200
commit727e3f05df471548e590958168c52c474ab44e06 (patch)
treede80b6c523956795f3678aa474c67f6236aa541a /framework/qml/View.qml
parent395f85b92f461923619fcf713f8029311630a8f2 (diff)
downloadkube-727e3f05df471548e590958168c52c474ab44e06.tar.gz
kube-727e3f05df471548e590958168c52c474ab44e06.zip
A view search overlay
Diffstat (limited to 'framework/qml/View.qml')
-rw-r--r--framework/qml/View.qml25
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}