Warning, /libraries/kpublictransport/tests/LocationDetailsSheet.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org>
0003
0004 SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006
0007 import QtQuick
0008 import QtQuick.Layouts
0009 import QtQuick.Controls as QQC2
0010 import org.kde.kirigami as Kirigami
0011 import org.kde.example
0012
0013 Kirigami.OverlaySheet {
0014 id: locationDetailsSheet
0015 property var location
0016
0017 header: Kirigami.Heading {
0018 text: "Location Details"
0019 }
0020
0021 ColumnLayout {
0022 QQC2.Label {
0023 text: "Name: " + locationDetailsSheet.location.name
0024 }
0025 QQC2.Label {
0026 text: "Street:" + locationDetailsSheet.location.streetAddress
0027 }
0028 QQC2.Label {
0029 text: "ZIP: " + locationDetailsSheet.location.postalCode
0030 }
0031 QQC2.Label {
0032 text: "City: " + locationDetailsSheet.location.locality
0033 }
0034 QQC2.Label {
0035 text: "Region: " + locationDetailsSheet.location.region
0036 }
0037 QQC2.Label {
0038 text: "Country: " + locationDetailsSheet.location.country
0039 }
0040 QQC2.Label {
0041 text: "Lat: " + locationDetailsSheet.location.latitude
0042 }
0043 QQC2.Label {
0044 text: "Lon: " + locationDetailsSheet.location.longitude
0045 }
0046 QQC2.Label {
0047 text: "Identifiers: " + ExampleUtil.locationIds(locationDetailsSheet.location)
0048 }
0049 QQC2.ToolButton {
0050 icon.name: "map-symbolic"
0051 text: "Station Map"
0052 onClicked: {
0053 applicationWindow().pageStack.push(indoorMapPage, {coordinate: Qt.point(location.longitude, location.latitude)});
0054 locationDetailsSheet.close();
0055 }
0056 }
0057 QQC2.ToolButton {
0058 icon.name: "map-globe"
0059 text: "View on OSM"
0060 onClicked: Qt.openUrlExternally("https://www.openstreetmap.org/#map=18/" + locationDetailsSheet.location.latitude + "/" + locationDetailsSheet.location.longitude)
0061 }
0062 }
0063 }