Warning, /education/marble/src/apps/marble-maps/SidePanel.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2017 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.Dialogs 1.2 0010 import org.kde.marble 0.20 0011 0012 Drawer { 0013 id: root 0014 0015 property var marbleMaps 0016 property alias showAccessibility: accessibilityAction.checked 0017 signal aboutActionTriggered() 0018 0019 Settings { 0020 id: settings 0021 0022 property bool showUpdateInfo: Number(value("MarbleMaps", "updateInfoVersion", "0")) < 1 0023 0024 Component.onDestruction: { 0025 settings.setValue("MarbleMaps", "showAccessibility", accessibilityAction.checked ? "true" : "false") 0026 } 0027 } 0028 0029 Column { 0030 id: drawerContent 0031 anchors.fill: parent 0032 spacing: Screen.pixelDensity * 2 0033 0034 Image { 0035 source: "drawer.svg" 0036 width: parent.width 0037 sourceSize.width: width 0038 fillMode: Image.PreserveAspectFit 0039 } 0040 0041 MenuIcon { 0042 id: publicTransportAction 0043 anchors.leftMargin: Screen.pixelDensity * 2 0044 anchors.rightMargin: anchors.leftMargin 0045 0046 checkable: true 0047 checked: marbleMaps.showPublicTransport 0048 hasSettings: true 0049 text: qsTr("Public Transport") 0050 icon: "qrc:/material/directions-bus.svg" 0051 onTriggered: { 0052 root.close() 0053 root.marbleMaps.showPublicTransport = checked 0054 } 0055 onSettingsTriggered: { 0056 root.close() 0057 publicTransportLoader.source = "PublicTransport.qml" 0058 publicTransportDialog.open() 0059 } 0060 } 0061 0062 MenuIcon { 0063 id: outdoorActivitiesAction 0064 anchors.leftMargin: Screen.pixelDensity * 2 0065 anchors.rightMargin: anchors.leftMargin 0066 0067 checkable: true 0068 checked: marbleMaps.showOutdoorActivities 0069 hasSettings: true 0070 text: qsTr("Outdoor Activities") 0071 icon: "qrc:/material/directions-run.svg" 0072 onTriggered: { 0073 root.close() 0074 root.marbleMaps.showOutdoorActivities = checked 0075 } 0076 onSettingsTriggered: { 0077 root.close() 0078 outdoorActivitiesLoader.source = "OutdoorActivities.qml" 0079 outdoorActivitiesDialog.open() 0080 } 0081 } 0082 0083 MenuIcon { 0084 id: accessibilityAction 0085 anchors.leftMargin: Screen.pixelDensity * 2 0086 anchors.rightMargin: anchors.leftMargin 0087 checkable: true 0088 checked: settings.value("MarbleMaps", "showAccessibility", "false") === "true" 0089 text: qsTr("Accessibility") 0090 icon: "qrc:/material/wheelchair.svg" 0091 onTriggered: root.close() 0092 } 0093 0094 Rectangle { 0095 width: parent.width 0096 height: 1 0097 color: "gray" 0098 } 0099 0100 MenuIcon { 0101 text: qsTr("About Marble Maps…") 0102 anchors.leftMargin: Screen.pixelDensity * 2 0103 anchors.rightMargin: anchors.leftMargin 0104 onTriggered: { 0105 root.close() 0106 root.aboutActionTriggered() 0107 } 0108 } 0109 } 0110 0111 Dialog { 0112 id: publicTransportDialog 0113 title: qsTr("Public Transport") 0114 0115 Loader { 0116 id: publicTransportLoader 0117 onLoaded: { 0118 item.implicitWidth = parent.width 0119 item.marbleMaps = root.marbleMaps 0120 } 0121 } 0122 } 0123 0124 Dialog { 0125 id: outdoorActivitiesDialog 0126 title: qsTr("Outdoor Activities") 0127 0128 Loader { 0129 id: outdoorActivitiesLoader 0130 onLoaded: { 0131 item.implicitWidth = parent.width 0132 item.marbleMaps = root.marbleMaps 0133 } 0134 } 0135 } 0136 }