Warning, /education/marble/src/apps/marble-maps/DeveloperDialog.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 import QtQuick 2.3 0007 import QtQuick.Controls 2.0 0008 import QtQuick.Window 2.2 0009 import QtQuick.Layouts 1.1 0010 import QtQuick.Dialogs 1.0 0011 0012 import org.kde.marble 0.20 0013 0014 Item { 0015 id: root 0016 height: swipeView.height + Screen.pixelDensity * 4 0017 0018 SystemPalette { 0019 id: palette 0020 colorGroup: SystemPalette.Active 0021 } 0022 0023 Settings { 0024 id: settings 0025 0026 Component.onDestruction: { 0027 settings.setValue("MarbleMaps", "mapThemeId", marbleMaps.mapThemeId) 0028 settings.setValue("localization", "translationsDisabled", ignoreTranslations.checked ? "true" : "false") 0029 settings.setValue("localization", "translationFile", localizationItem.translationFile) 0030 settings.setValue("Developer", "inertialGlobeRotation", marbleMaps.inertialGlobeRotation) 0031 settings.setValue("Developer", "positionProvider", marbleMaps.currentPositionProvider) 0032 settings.setValue("Developer", "runtimeTrace", runtimeTrace.checked ? "true" : "false") 0033 settings.setValue("Developer", "debugTags", debugTags.checked ? "true" : "false") 0034 settings.setValue("Developer", "debugPlacemarks", debugPlacemarks.checked ? "true" : "false") 0035 settings.setValue("Developer", "debugPolygons", debugPolygons.checked ? "true" : "false") 0036 settings.setValue("Developer", "debugBatches", debugBatches.checked ? "true" : "false") 0037 settings.setValue("Developer", "debugOutput", debugOutputEnabled ? "true" : "false") 0038 } 0039 } 0040 0041 Rectangle { 0042 anchors.fill: parent 0043 color: palette.base 0044 } 0045 0046 0047 SwipeView { 0048 id: swipeView 0049 currentIndex: pageIndicator.currentIndex 0050 anchors.left: parent.left 0051 anchors.right: parent.right 0052 height: infoItem.height 0053 0054 Item { 0055 id: tilesItem 0056 height: childrenRect.height 0057 0058 Item { 0059 height: childrenRect.height 0060 anchors.left: parent.left 0061 anchors.right: parent.right 0062 anchors.top: parent.top 0063 anchors.margins: Screen.pixelDensity * 2 0064 0065 Column { 0066 spacing: Screen.pixelDensity * 1 0067 0068 Text { 0069 text: "Tiles" 0070 } 0071 Grid { 0072 columns: 2 0073 flow: Grid.TopToBottom 0074 rowSpacing: Screen.pixelDensity * 0.5 0075 columnSpacing: Screen.pixelDensity * 2 0076 0077 CheckBox { 0078 id: mapTheme 0079 text: "Development Tiles" 0080 checked: settings.value("MarbleMaps", "mapThemeId") === "earth/vectorosm-dev/vectorosm-dev.dgml" 0081 onCheckedChanged: marbleMaps.mapThemeId = checked ? "earth/vectorosm-dev/vectorosm-dev.dgml" : "earth/vectorosm/vectorosm.dgml" 0082 } 0083 0084 Button { 0085 text: "Reload Tiles" 0086 onClicked: marbleMaps.reloadTiles() 0087 } 0088 } 0089 } 0090 } 0091 } 0092 0093 Item { 0094 id: toolsItem 0095 height: childrenRect.height 0096 0097 Item { 0098 height: childrenRect.height 0099 anchors.left: parent.left 0100 anchors.right: parent.right 0101 anchors.top: parent.top 0102 anchors.margins: Screen.pixelDensity * 2 0103 0104 Column { 0105 spacing: Screen.pixelDensity * 1 0106 0107 Text { 0108 text: "Tools" 0109 } 0110 Grid { 0111 columns: 2 0112 flow: Grid.TopToBottom 0113 rowSpacing: Screen.pixelDensity * 0.5 0114 columnSpacing: Screen.pixelDensity * 2 0115 0116 CheckBox { 0117 id: debugTags 0118 text: "OSM Tags" 0119 checked: settings.value("Developer", "debugTags") === "true" 0120 onCheckedChanged: app.showOsmTags = checked 0121 } 0122 0123 CheckBox { 0124 text: "Shell Output" 0125 checked: settings.value("Developer", "debugOutput") === "true" 0126 onCheckedChanged: settings.debugOutputEnabled = checked 0127 } 0128 0129 CheckBox { 0130 text: "Inertial Rotation" 0131 checked: settings.value("Developer", "inertialGlobeRotation") === "true" 0132 onCheckedChanged: marbleMaps.inertialGlobeRotation = checked 0133 } 0134 0135 CheckBox { 0136 text: "GPS Simulation" 0137 checked: settings.value("Developer", "positionProvider") === "RouteSimulationPositionProviderPlugin" 0138 onCheckedChanged: marbleMaps.currentPositionProvider = checked ? "RouteSimulationPositionProviderPlugin" : "QtPositioning" 0139 } 0140 } 0141 } 0142 } 0143 } 0144 0145 Item { 0146 id: infoItem 0147 height: childrenRect.height 0148 0149 Item { 0150 anchors.left: parent.left 0151 anchors.right: parent.right 0152 anchors.top: parent.top 0153 height: childrenRect.height 0154 anchors.margins: Screen.pixelDensity * 2 0155 0156 Column { 0157 spacing: Screen.pixelDensity * 1 0158 0159 Text { 0160 text: "Debug Rendering" 0161 } 0162 0163 Grid { 0164 columns: 2 0165 flow: Grid.TopToBottom 0166 rowSpacing: Screen.pixelDensity * 0.5 0167 columnSpacing: Screen.pixelDensity * 2 0168 0169 CheckBox { 0170 id: runtimeTrace 0171 text: "Performance" 0172 checked: settings.value("Developer", "runtimeTrace") === "true" 0173 onCheckedChanged: marbleMaps.setShowRuntimeTrace(checked) 0174 } 0175 0176 CheckBox { 0177 id: debugBatches 0178 text: "Batches" 0179 checked: settings.value("Developer", "debugBatches") === "true" 0180 onCheckedChanged: marbleMaps.setShowDebugBatches(checked) 0181 } 0182 0183 CheckBox { 0184 id: debugPolygons 0185 text: "Polygons" 0186 checked: settings.value("Developer", "debugPolygons") === "true" 0187 onCheckedChanged: marbleMaps.setShowDebugPolygons(checked) 0188 } 0189 0190 CheckBox { 0191 id: debugPlacemarks 0192 text: "Placemarks" 0193 checked: settings.value("Developer", "debugPlacemarks") === "true" 0194 onCheckedChanged: marbleMaps.setShowDebugPlacemarks(checked) 0195 } 0196 } 0197 } 0198 } 0199 } 0200 0201 Item { 0202 id: localizationItem 0203 height: childrenRect.height 0204 0205 property string translationFile: settings.value("localization", "translationFile", "") 0206 property string displayFile: translationFile.length > 0 ? translationFile.replace(/^.*[\\\/]/, '') : "none" 0207 0208 Item { 0209 height: childrenRect.height 0210 anchors.left: parent.left 0211 anchors.right: parent.right 0212 anchors.top: parent.top 0213 anchors.margins: Screen.pixelDensity * 2 0214 0215 Column { 0216 spacing: Screen.pixelDensity * 1 0217 0218 Text { 0219 text: "Translations" 0220 } 0221 0222 Grid { 0223 columns: 2 0224 flow: Grid.TopToBottom 0225 rowSpacing: Screen.pixelDensity * 0.5 0226 columnSpacing: Screen.pixelDensity * 3 0227 0228 0229 Text { 0230 text: "Custom file: " + localizationItem.displayFile 0231 } 0232 0233 Row { 0234 spacing: Screen.pixelDensity * 2 0235 0236 Button { 0237 text: "Change" 0238 onClicked: fileDialog.open() 0239 } 0240 0241 Button { 0242 text: "Remove" 0243 onClicked: localizationItem.translationFile = "" 0244 } 0245 } 0246 0247 CheckBox { 0248 id: ignoreTranslations 0249 text: "Disable all translations" 0250 checked: settings.value("localization", "translationsDisabled", "false") === "true" 0251 } 0252 0253 Text { 0254 text: "<i>Changes require a restart</i>" 0255 } 0256 0257 } 0258 } 0259 } 0260 } 0261 } 0262 0263 PageIndicator { 0264 id: pageIndicator 0265 interactive: true 0266 count: swipeView.count 0267 currentIndex: swipeView.currentIndex 0268 0269 anchors.bottom: parent.bottom 0270 anchors.horizontalCenter: parent.horizontalCenter 0271 } 0272 0273 FileDialog { 0274 id: fileDialog 0275 title: "Choose a translation file" 0276 folder: shortcuts.home 0277 sidebarVisible: false 0278 nameFilters: [ "Translation files (*.qm)" ] 0279 onAccepted: localizationItem.translationFile = fileUrl 0280 } 0281 }