Warning, /utilities/kongress/src/contents/ui/MapView.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * SPDX-FileCopyrightText: 2020 Dimitris Kardarakos <dimkard@posteo.net>
0003 *
0004 * SPDX-License-Identifier: GPL-3.0-or-later
0005 */
0006
0007 import QtQuick 2.7
0008 import QtQuick.Layouts 1.11
0009 import QtQuick.Controls 2.4 as Controls2
0010 import org.kde.kirigami 2.4 as Kirigami
0011
0012 Kirigami.ScrollablePage {
0013 id: root
0014
0015 property string imageUrl
0016 property string latitude
0017 property string longitude
0018 property string geoUrl
0019
0020 title: i18n("Map")
0021
0022 ColumnLayout {
0023
0024 Image {
0025 Layout.fillWidth: true
0026 visible: imageUrl !== ""
0027 source: root.imageUrl
0028 fillMode: Image.PreserveAspectFit
0029 asynchronous: true
0030 }
0031
0032 Controls2.Label {
0033 Layout.alignment : Qt.AlignHCenter
0034 visible: root.latitude !== ""
0035 text: i18n("Latitude: %1", root.latitude)
0036 }
0037
0038 Controls2.Label {
0039 Layout.alignment : Qt.AlignHCenter
0040 visible: root.longitude !== ""
0041 text: i18n("Longitude: %1", root.longitude)
0042 }
0043
0044 Controls2.Button {
0045 Layout.alignment : Qt.AlignHCenter
0046 visible: root.geoUrl !== ""
0047 text: i18n("OpenStreetMap")
0048
0049 onClicked: Qt.openUrlExternally(root.geoUrl)
0050 }
0051 }
0052 }