Warning, /utilities/kdebugsettings/src/quickapps/contents/ui/main.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.Controls 2.15 as QQC2
0006 import org.kde.kirigami 2.19 as Kirigami
0007 
0008 import org.kde.kdebugsettings 1.0
0009 
0010 Kirigami.ApplicationWindow {
0011     id: root
0012 
0013     pageStack {
0014         initialPage: MainPage {}
0015         defaultColumnWidth: root.width
0016 
0017         globalToolBar {
0018             style: Kirigami.ApplicationHeaderStyle.ToolBar
0019             showNavigationButtons: if (applicationWindow().pageStack.currentIndex > 0) {
0020                 Kirigami.ApplicationHeaderStyle.ShowBackButton
0021             } else {
0022                 0
0023             }
0024         }
0025     }
0026     Kirigami.Action {
0027         id: goToKdeApplicationCategories
0028         text: i18nc("@action", "Show KDE Application Categories")
0029         onTriggered: { pageStack.layers.push("qrc:/KDEApplicationRulesPage.qml") }
0030     }
0031     Kirigami.Action {
0032         id: goToCustomCategories
0033         text: i18nc("@action", "Show Custom Categories")
0034         onTriggered: { pageStack.layers.push("qrc:/CustomRulesPage.qml") }
0035     }
0036     Kirigami.Action {
0037         id: goToEnviromnentCategories
0038         text: i18nc("@action", "Show Environment Categories")
0039         onTriggered: { pageStack.layers.push("qrc:/EnvironmentVariableRulesPage.qml") }
0040     }
0041     Kirigami.Action {
0042         id: aboutAction
0043         displayHint: Kirigami.DisplayHint.AlwaysHide
0044         icon.name: "debug-run"
0045         text: i18nc("@action opens about app page", "About")
0046         onTriggered: { pageStack.layers.push("qrc:/AboutPage.qml") }
0047     }
0048 
0049     Kirigami.Action {
0050         id: helpAction
0051         displayHint: Kirigami.DisplayHint.AlwaysHide
0052         icon.name: "help-browser"
0053         text: i18nc("@action", "Open Handbook")
0054         onTriggered: { Qt.openUrlExternally("help:/kdebugsettings") }
0055     }
0056     Kirigami.Action {
0057         id: separatorAction
0058         displayHint: Kirigami.DisplayHint.AlwaysHide
0059         separator: true
0060     }
0061     Kirigami.Action {
0062         id: quitAction
0063         displayHint: Kirigami.DisplayHint.AlwaysHide
0064         text: i18nc("@menu-action", "Quit")
0065         icon.name: "gtk-quit"
0066         shortcut: StandardKey.Quit
0067         onTriggered: Qt.quit()
0068     }
0069     Kirigami.Action {
0070         id: saveAction
0071         displayHint: Kirigami.DisplayHint.AlwaysHide
0072         text: i18nc("@menu-action", "Save")
0073         icon.name: "document-save"
0074         shortcut: StandardKey.Save
0075         onTriggered: {
0076             // TODO
0077         }
0078     }
0079     GlobalMenu {}
0080 }