Warning, /pim/itinerary/src/app/DevelopmentModePage.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 import QtCore
0008 import QtQuick
0009 import QtQuick.Layouts
0010 import QtQuick.Controls as QQC2
0011 import QtQuick.Dialogs
0012 import org.kde.kirigami as Kirigami
0013 import org.kde.itinerary
0014 
0015 Kirigami.ScrollablePage {
0016     id: root
0017     title: "Development Mode"
0018 
0019     FileDialog {
0020         id: mapcssDialog
0021         title: "Import MapCSS"
0022         currentFolder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
0023         nameFilters: ["MapCSS style sheets (*.mapcss)"]
0024         onAccepted: DevelopmentModeController.importMapCSS(selectedFile)
0025     }
0026 
0027     ColumnLayout {
0028         QQC2.Button {
0029             text: "Disable Development Mode"
0030             Layout.fillWidth: true
0031             onClicked: {
0032                 Settings.developmentMode = false;
0033                 showPassiveNotification("Development mode disabled");
0034                 applicationWindow().pageStack.goBack();
0035             }
0036         }
0037 
0038         QQC2.Button {
0039             text: "Import MapCSS"
0040             Layout.fillWidth: true
0041             onClicked: mapcssDialog.open()
0042         }
0043         QQC2.Button {
0044             text: "Reset MapCSS"
0045             Layout.fillWidth: true
0046             onClicked: DevelopmentModeController.purgeMapCSS();
0047         }
0048         QQC2.Button {
0049             text: "Clear OSM Tile Cache"
0050             Layout.fillWidth: true
0051             onClicked: DevelopmentModeController.clearOsmTileCache();
0052         }
0053 
0054         QQC2.Button {
0055             text: "Enable KPT Logging"
0056             Layout.fillWidth: true
0057             onClicked: DevelopmentModeController.enablePublicTransportLogging();
0058         }
0059 
0060         QQC2.Button {
0061             text: "Crash"
0062             Layout.fillWidth: true
0063             onClicked: DevelopmentModeController.crash();
0064         }
0065 
0066         QQC2.Label {
0067             text: DevelopmentModeController.screenInfo();
0068             Layout.fillWidth: true
0069             wrapMode: Text.WordWrap
0070             font.family: "monospace"
0071             MouseArea {
0072                 anchors.fill: parent
0073                 onClicked: {
0074                     Clipboard.saveText(DevelopmentModeController.screenInfo());
0075                     applicationWindow().showPassiveNotification("Screen information copied");
0076                 }
0077             }
0078         }
0079     }
0080 }