Warning, /plasma/discover/discover/qml/DiscoverPage.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.15 0008 import org.kde.kirigami 2.14 as Kirigami 0009 0010 Kirigami.ScrollablePage 0011 { 0012 id: root 0013 0014 Kirigami.Theme.colorSet: Kirigami.Theme.View 0015 Kirigami.Theme.inherit: false 0016 0017 readonly property var s1: Shortcut { 0018 sequences: [ StandardKey.MoveToNextPage ] 0019 enabled: root.isCurrentPage 0020 onActivated: { 0021 root.flickable.contentY = Math.min(root.flickable.contentHeight - root.flickable.height, 0022 root.flickable.contentY + root.flickable.height); 0023 } 0024 } 0025 0026 readonly property var s2: Shortcut { 0027 sequences: [ StandardKey.MoveToPreviousPage ] 0028 enabled: root.isCurrentPage 0029 onActivated: { 0030 root.flickable.contentY = Math.max(0, root.flickable.contentY - root.flickable.height); 0031 } 0032 } 0033 0034 readonly property var sClose: Shortcut { 0035 sequences: [ StandardKey.Cancel ] 0036 enabled: root.isCurrentPage && applicationWindow().pageStack.depth>1 0037 onActivated: { 0038 applicationWindow().pageStack.pop() 0039 } 0040 } 0041 0042 readonly property var sRefresh: Shortcut { 0043 sequences: [ StandardKey.Refresh ] 0044 enabled: root.isCurrentPage && root.supportsRefreshing 0045 onActivated: { 0046 if (root.supportsRefreshing) 0047 root.refreshing = true 0048 } 0049 } 0050 0051 readonly property var readableCharacters: /\w+/ 0052 Keys.onPressed: { 0053 if(event.text.length > 0 && event.modifiers === Qt.NoModifier && event.text.match(readableCharacters)) { 0054 window.globalDrawer.suggestSearchText(event.text) 0055 } 0056 } 0057 }