Warning, /utilities/kdebugsettings/src/quickapps/contents/ui/CustomRulesPage.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import QtQuick.Layouts 1.15 0006 import QtQuick.Controls 2.15 as QQC2 0007 import org.kde.kirigami 2.15 as Kirigami 0008 import org.kde.kirigamiaddons.delegates 1.0 as Delegates 0009 0010 import org.kde.kdebugsettings 1.0 0011 0012 Kirigami.ScrollablePage { 0013 id: page2 0014 title: i18nc("@title", "Custom Rules") 0015 0016 ListView { 0017 id: listviewRules 0018 reuseItems: true 0019 focus: true // keyboard navigation 0020 model: LoggingManager.customCategoryModel 0021 delegate: Delegates.RoundedItemDelegate { 0022 required property string displayRule 0023 0024 text: displayRule 0025 0026 TapHandler { 0027 acceptedButtons: Qt.RightButton 0028 onTapped: contextMenu.popup() 0029 } 0030 } 0031 0032 QQC2.Menu { 0033 id: contextMenu 0034 QQC2.MenuItem { 0035 icon.name: "list-add" 0036 text: i18nc("@action add custom rule", "Add Rule...") 0037 onTriggered: {} 0038 } 0039 QQC2.MenuItem { 0040 icon.name: "document-edit" // TODO fixit 0041 text: i18nc("@action edit custom rule", "Edit Rule...") 0042 onTriggered: {} 0043 } 0044 QQC2.MenuSeparator {} 0045 QQC2.MenuItem { 0046 icon.name: "edit-delete" 0047 text: i18nc("@action remove custom rule", "Remove Rule") 0048 onTriggered: {} 0049 } 0050 } 0051 } 0052 } 0053