Warning, /network/angelfish/src/contents/ui/Bookmarks.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2014-2015 Sebastian Kügler <sebas@kde.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 import QtQuick 0006 import QtQuick.Layouts 1.0 0007 0008 import org.kde.kirigami 2.8 as Kirigami 0009 import org.kde.angelfish 1.0 0010 0011 Kirigami.ScrollablePage { 0012 title: i18n("Bookmarks") 0013 Kirigami.ColumnView.fillWidth: false 0014 0015 header: Item { 0016 anchors.horizontalCenter: parent.horizontalCenter 0017 height: Kirigami.Units.gridUnit * 3 0018 width: list.width 0019 0020 Kirigami.SearchField { 0021 id: search 0022 anchors.centerIn: parent 0023 width: parent.width - Kirigami.Units.gridUnit 0024 0025 clip: true 0026 inputMethodHints: rootPage.privateMode ? Qt.ImhNoPredictiveText : Qt.ImhNone 0027 Kirigami.Theme.inherit: true 0028 0029 onDisplayTextChanged: { 0030 if (displayText === "" || displayText.length > 2) { 0031 list.model.filter = displayText; 0032 timer.running = false; 0033 } 0034 else timer.running = true; 0035 } 0036 Keys.onEscapePressed: pageStack.pop() 0037 0038 Timer { 0039 id: timer 0040 repeat: false 0041 interval: Math.max(1000, 3000 - search.displayText.length * 1000) 0042 onTriggered: list.model.filter = search.displayText 0043 } 0044 } 0045 } 0046 0047 Component { 0048 id: delegateComponent 0049 0050 UrlDelegate { 0051 highlightText: list.model.filter 0052 onClicked: { 0053 currentWebView.url = url; 0054 pageStack.pop(); 0055 } 0056 onRemoved: BrowserManager.removeBookmark(url); 0057 } 0058 } 0059 0060 ListView { 0061 id: list 0062 anchors.fill: parent 0063 0064 interactive: height < contentHeight 0065 clip: true 0066 0067 model: BookmarksHistoryModel { 0068 bookmarks: true 0069 } 0070 0071 reuseItems: true 0072 delegate: delegateComponent 0073 } 0074 }