Warning, /utilities/kdebugsettings/src/quickapps/contents/ui/KDEApplicationRulesPage.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
0009 import org.kde.kdebugsettings 1.0
0010
0011 Kirigami.ScrollablePage {
0012 id: page
0013 title: i18nc("@title", "KDE Application Rules")
0014
0015 leftPadding: 20
0016 actions: [
0017 Kirigami.Action {
0018 displayComponent: Kirigami.SearchField {
0019 onAccepted: loggingDebugProxyModel.filterText = text
0020 }
0021 }
0022 ]
0023
0024 ListView {
0025 id: listviewRules
0026 focus: true // keyboard navigation
0027 activeFocusOnTab: true // keyboard navigation
0028 reuseItems: true
0029 clip: true
0030 model: KDEApplicationLoggingCategoryProxyModel {
0031 id: loggingDebugProxyModel
0032 sourceModel: LoggingManager.qtKdeCategoryModel
0033 }
0034 delegate: Kirigami.BasicListItem {
0035 RowLayout {
0036 QQC2.Label {
0037 Layout.fillHeight: true
0038 Layout.leftMargin: 4
0039 Layout.alignment: Qt.AlignLeft
0040 text: model.description
0041 }
0042 Item {
0043 Layout.fillWidth: true
0044 }
0045 QQC2.ComboBox {
0046 model: CategoryTypeProxyModel {
0047 sourceModel: LoggingManager.categoryTypeModel
0048 showOffType: true
0049 }
0050 textRole: "display"
0051 valueRole: "categoryType"
0052 currentIndex: LoggingManager.categoryTypeModel.indexOfCategory(listviewRules.model.categoryType)
0053 onActivated: {
0054 // TODO
0055 }
0056 }
0057 }
0058 }
0059 }
0060 }
0061