Warning, /network/neochat/src/qml/FullScreenMap.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2021 Tobias Fella <fella@posteo.de> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Controls 0006 import QtLocation 0007 import QtPositioning 0008 0009 import org.kde.kirigami as Kirigami 0010 0011 ApplicationWindow { 0012 id: root 0013 0014 property real latitude: NaN 0015 property real longitude: NaN 0016 property string asset 0017 property var author 0018 property QtObject liveLocationModel: null 0019 0020 flags: Qt.FramelessWindowHint | Qt.WA_TranslucentBackground 0021 visibility: Qt.WindowFullScreen 0022 0023 title: i18n("View Location") 0024 0025 Shortcut { 0026 sequence: "Escape" 0027 onActivated: root.destroy() 0028 } 0029 0030 color: Kirigami.Theme.backgroundColor 0031 0032 background: AbstractButton { 0033 onClicked: root.destroy() 0034 } 0035 0036 MapView { 0037 id: mapView 0038 anchors.fill: parent 0039 map.center: root.liveLocationModel ? QtPositioning.coordinate(root.liveLocationModel.boundingBox.y, root.liveLocationModel.boundingBox.x) : QtPositioning.coordinate(root.latitude, root.longitude) 0040 map.zoomLevel: 15 0041 map.plugin: OsmLocationPlugin.plugin 0042 LocationMapItem { 0043 latitude: root.latitude 0044 longitude: root.longitude 0045 asset: root.asset 0046 author: root.author 0047 isLive: true 0048 heading: NaN 0049 visible: !isNaN(root.latitude) && !isNaN(root.longitude) 0050 } 0051 MapItemView { 0052 model: root.liveLocationModel 0053 delegate: LocationMapItem {} 0054 } 0055 0056 Connections { 0057 target: mapView.map 0058 function onCopyrightLinkActivated() { 0059 Qt.openUrlExternally(link); 0060 } 0061 } 0062 } 0063 0064 Button { 0065 anchors.top: parent.top 0066 anchors.right: parent.right 0067 0068 text: i18n("Close") 0069 icon.name: "dialog-close" 0070 display: AbstractButton.IconOnly 0071 0072 width: Kirigami.Units.gridUnit * 2 0073 height: Kirigami.Units.gridUnit * 2 0074 0075 onClicked: root.destroy() 0076 } 0077 }