Warning, /plasma/discover/discover/qml/SearchPage.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2017 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
0003  *
0004  *   SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 import QtQuick
0008 import QtQuick.Controls as QQC2
0009 import QtQuick.Layouts
0010 import org.kde.kirigami as Kirigami
0011 
0012 ApplicationsListPage {
0013     id: root
0014 
0015     signal shown()
0016 
0017     searchPage: true
0018 
0019     Timer {
0020         interval: 0
0021         running: true
0022         onTriggered: {
0023             root.shown()
0024         }
0025     }
0026 
0027     topPadding: 0
0028 
0029     globalToolBarStyle: Kirigami.ApplicationHeaderStyle.ToolBar
0030 
0031     titleDelegate: SearchField {
0032         id: searchField
0033 
0034         Layout.fillWidth: true
0035 
0036         focus: !window.wideScreen
0037         visible: !window.wideScreen
0038 
0039         Component.onCompleted: forceActiveFocus()
0040 
0041         Connections {
0042             target: root
0043             function onShown() {
0044                 searchField.forceActiveFocus()
0045             }
0046         }
0047 
0048         onCurrentSearchTextChanged: {
0049             root.search = currentSearchText
0050         }
0051     }
0052 }