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 layerMission: 1
10 readonly property int layerFence: 2
11 readonly property int layerRally: 3
12
13 readonly property var layerInfos: [
14 { layer: layerMission, nodeType: "missionGroup", icon: "/res/waypoint.svg", name: qsTr("Mission") },
15 { layer: layerFence, nodeType: "fenceGroup", icon: "/res/GeoFence.svg", name: qsTr("GeoFence") },
16 { layer: layerRally, nodeType: "rallyGroup", icon: "/res/RallyPoint.svg", name: qsTr("Rally Points") }
17 ]
18
19 function infoForNodeType(nodeType) {
20 return layerInfos.find(l => l.nodeType === nodeType) ?? null
21 }
22}