Warning, /education/marble/src/apps/marble-maps/Waypoint.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 Gábor Péterffy <peterffy95@gmail.com> 0004 // 0005 0006 import QtQuick 2.3 0007 import QtGraphicalEffects 1.0 0008 import QtQuick.Window 2.2 0009 0010 import org.kde.marble 0.20 0011 0012 Item { 0013 id: root 0014 0015 property alias type: image.type 0016 property int xPos: 0 0017 property int yPos: 0 0018 property var placemark: null 0019 property int index: -1 0020 0021 width: Screen.pixelDensity * 15 0022 height: width 0023 x: xPos - 0.5 * width 0024 y: yPos - 0.5 * height 0025 0026 WaypointImage { 0027 id: image 0028 onClicked: { 0029 if (type == "searchResult") { 0030 if (placemarkDialog.placemark === placemark) { 0031 placemarkDialog.placemark = null 0032 app.state = "none" 0033 } else { 0034 placemarkDialog.placemark = placemark 0035 app.state = "place" 0036 } 0037 } else { 0038 app.currentWaypointIndex = index 0039 app.state = "route" 0040 } 0041 } 0042 anchors { 0043 bottom: parent.verticalCenter 0044 horizontalCenter: parent.horizontalCenter 0045 } 0046 0047 x: 0.5 * parent.width - 0.5 * width 0048 y: 0.5 * parent.height - height 0049 } 0050 }