Warning, /education/marble/src/apps/marble-maps/PositionMarker.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 0007 import QtQuick 2.3 0008 import QtQuick.Window 2.2 0009 0010 Item { 0011 id: root 0012 width: arrowIndicator.width 0013 height: arrowIndicator.height 0014 0015 property real angle: 0 0016 property bool showAccuracy: true 0017 property real radius: 100 0018 property bool allowRadiusAnimation: true 0019 property bool allowPositionAnimation: true 0020 property real speed: 0 0021 0022 Behavior on radius { 0023 enabled: allowRadiusAnimation 0024 NumberAnimation { duration: 200 } 0025 } 0026 0027 Behavior on angle { 0028 RotationAnimation { 0029 duration: 200 0030 direction: RotationAnimation.Shortest 0031 } 0032 } 0033 Behavior on x { 0034 enabled: allowPositionAnimation 0035 SmoothedAnimation { duration: 200 } 0036 } 0037 Behavior on y { 0038 enabled: allowPositionAnimation 0039 SmoothedAnimation { duration: 200 } 0040 } 0041 0042 Rectangle { 0043 width: 2 * root.radius 0044 height: 2 * root.radius 0045 anchors.centerIn: parent 0046 visible: root.showAccuracy 0047 color: "#40ff0000" 0048 border.color: "#ff0000" 0049 border.width: 2 0050 radius: root.radius 0051 } 0052 0053 Rectangle { 0054 id: circleIndicator 0055 visible: root.speed < 0.4 0056 width: Screen.pixelDensity * 3.5 0057 height: width 0058 anchors.centerIn: parent 0059 radius: width/2 0060 border { 0061 color: "#f2f2f2" 0062 width: 4 0063 } 0064 color: "#004a96" 0065 } 0066 0067 Image { 0068 id: arrowIndicator 0069 width: Screen.pixelDensity * 6 0070 height: width 0071 anchors.centerIn: parent 0072 visible: root.speed >= 0.4 0073 source: "qrc:///navigation_blue.svg" 0074 sourceSize.width: width 0075 sourceSize.height: height 0076 smooth: true 0077 rotation: root.angle 0078 } 0079 }