QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MissionItemMapVisual.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtLocation
4import QtPositioning
5
6import QGroundControl
7import QGroundControl.Controls
8
9/// Mission item map visual
10Item {
11 id: _root
12
13 property var map ///< Map control to place item in
14 property var vehicle ///< Vehicle associated with this item
15 property bool interactive: true ///< Vehicle associated with this item
16
17 signal clicked(int sequenceNumber)
18
19 Loader {
20 id: mapVisualLoader
21
22 asynchronous: true
23
24 Component.onCompleted: {
25 mapVisualLoader.setSource(object.mapVisualQML, {
26 map: _root.map,
27 vehicle: _root.vehicle,
28 opacity: Qt.binding(() => _root.opacity),
29 interactive: Qt.binding(() => _root.interactive)
30 })
31 }
32
33 onLoaded: {
34 if (!item) {
35 return
36 }
37
38 item.parent = map
39
40 if (item.clicked) {
41 item.clicked.connect(_root.clicked)
42 }
43 }
44 }
45}