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 2.5
0008 import QtQuick.Controls 2.15 as Controls
0009 import QtQuick.Layouts 1.15
0010 import org.kde.kirigami 2.14 as Kirigami
0011 import QtGraphicalEffects 1.12
0012 
0013 ApplicationsListPage {
0014     id: searchPage
0015     searchPage: true
0016 
0017     signal shown()
0018     Timer {
0019         interval: 0
0020         running: true
0021         onTriggered: {
0022             searchPage.shown()
0023         }
0024     }
0025     
0026     globalToolBarStyle: Kirigami.ApplicationHeaderStyle.ToolBar
0027     
0028     titleDelegate: Controls.Control {
0029         Layout.fillWidth: true
0030         leftPadding: 0
0031         rightPadding: 0
0032         topPadding: 0
0033         bottomPadding: 0
0034         
0035         z: 100
0036         
0037         contentItem: SearchField {
0038             id: searchField
0039             focus: !window.wideScreen
0040             visible: !window.wideScreen
0041             z: 100
0042             Component.onCompleted: forceActiveFocus()
0043 
0044             Connections {
0045                 ignoreUnknownSignals: true
0046                 target: searchPage
0047                 function onShown() {
0048                     searchField.forceActiveFocus()
0049                 }
0050             }
0051 
0052             onCurrentSearchTextChanged: {
0053                 searchPage.search = currentSearchText
0054             }
0055         }
0056     }
0057 
0058     topPadding: 0
0059 }