QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PlanEditLayers.qml
Go to the documentation of this file.
1pragma Singleton
2
3import QtQuick
4
5/// Single source of truth for the Plan View map editing layers. Used by the
6/// layer switcher (PlanView), the plan tree view group headers, and the map
7/// visual bindings.
8QtObject {
9 readonly property int layerPlan: 0
10 readonly property int layerMission: 1
11 readonly property int layerFence: 2
12 readonly property int layerRally: 3
13
14 readonly property var layerInfos: [
15 { layer: layerMission, nodeType: "missionGroup", icon: "/res/waypoint.svg", name: qsTr("Mission") },
16 { layer: layerFence, nodeType: "fenceGroup", icon: "/res/GeoFence.svg", name: qsTr("GeoFence") },
17 { layer: layerRally, nodeType: "rallyGroup", icon: "/res/RallyPoint.svg", name: qsTr("Rally Points") }
18 ]
19
20 function infoForNodeType(nodeType) {
21 return layerInfos.find(l => l.nodeType === nodeType) ?? null
22 }
23}