From 7692547fa0471175893b38fa5d6ed2faee460298 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 12 Jul 2018 16:07:54 +0200 Subject: Handle help via View.qml --- framework/qml/View.qml | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'framework/qml/View.qml') 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 import org.kube.framework 1.0 as Kube FocusScope { - id: container - - property int visibleViews: 2 - property int currentIndex: 0 - property int count: contentItems.length - default property alias contentItems: content.data + id: root + //Search property rect searchArea: null property string filter: "" property var searchObject: null function triggerSearch() { - root.searchObject = searchComponent.createObject(root) + searchObject = searchComponent.createObject(root) } function clearSearch() { - if (root.searchObject) { - root.searchObject.close() - root.searchObject = null + if (searchObject) { + searchObject.close() + searchObject = null } } + //Help + property Component helpViewComponent: null + function showHelp() { + if (helpViewComponent) { + helpViewComponent.createObject(root).open() + } + } + + //View columns + property int visibleViews: 2 + property int currentIndex: 0 + property int count: contentItems.length + default property alias contentItems: content.data + property bool __aborted: false //This signal will be emitted once all initial properties have been set and the view is ready to load @@ -97,8 +107,8 @@ FocusScope { Kube.IconButton { anchors { - top: container.top - left: container.left + top: root.top + left: root.left } z: 1 color: Kube.Colors.darkBackgroundColor -- cgit v1.2.3