From 727e3f05df471548e590958168c52c474ab44e06 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 6 Jul 2018 22:47:19 +0200 Subject: A view search overlay --- framework/qml/View.qml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'framework/qml/View.qml') 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 { property int count: contentItems.length default property alias contentItems: content.data + property rect searchArea: null + property string filter: "" + property var searchObject: null + function triggerSearch() { + root.searchObject = searchComponent.createObject(root) + } + function clearSearch() { + if (root.searchObject) { + root.searchObject.close() + root.searchObject = null + } + } + property bool __aborted: false //This signal will be emitted once all initial properties have been set and the view is ready to load @@ -104,4 +117,16 @@ FocusScope { id: content anchors.fill: parent } + + Component { + id: searchComponent + Kube.SearchPopup { + searchArea: root.searchArea + onFilterChanged: { + root.filter = filter + } + } + + } + } -- cgit v1.2.3