QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
TransectStyleComplexItemTerrainFollow.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7import QGroundControl.FactControls
8
9ColumnLayout {
10 spacing: _margin
11 visible: tabBar.currentIndex === 2
12
13 property var missionItem
14
15 MouseArea {
16 Layout.preferredWidth: childrenRect.width
17 Layout.preferredHeight: childrenRect.height
18
19 onClicked: {
20 var removeModes = []
21 var updateFunction = function(altMode){ missionItem.cameraCalc.distanceMode = altMode }
22 removeModes.push(QGroundControl.AltitudeModeMixed)
23 if (!missionItem.masterController.controllerVehicle.supports.terrainFrame) {
24 removeModes.push(QGroundControl.AltitudeModeTerrainFrame)
25 }
26 if (!QGroundControl.corePlugin.options.showMissionAbsoluteAltitude || !_missionItem.cameraCalc.isManualCamera) {
27 removeModes.push(QGroundControl.AltitudeModeAbsolute)
28 }
29 altModeDialogFactory.open({ rgRemoveModes: removeModes, updateAltModeFn: updateFunction })
30 }
31
32 QGCPopupDialogFactory {
33 id: altModeDialogFactory
34
35 dialogComponent: altModeDialogComponent
36 }
37
38 Component { id: altModeDialogComponent; AltModeDialog { } }
39
40 RowLayout {
41 spacing: ScreenTools.defaultFontPixelWidth / 2
42
43 QGCLabel { text: QGroundControl.altitudeModeShortDescription(missionItem.cameraCalc.distanceMode) }
44 QGCColoredImage {
45 height: ScreenTools.defaultFontPixelHeight / 2
46 width: height
47 source: "/res/DropArrow.svg"
48 color: qgcPal.text
49 }
50 }
51 }
52
53 GridLayout {
54 Layout.fillWidth: true
55 columnSpacing: _margin
56 rowSpacing: _margin
57 columns: 2
58 enabled: missionItem.cameraCalc.distanceMode === QGroundControl.AltitudeModeCalcAboveTerrain
59
60 QGCLabel { text: qsTr("Tolerance") }
61 FactTextField {
62 fact: missionItem.terrainAdjustTolerance
63 Layout.fillWidth: true
64 }
65
66 QGCLabel { text: qsTr("Max Climb Rate") }
67 FactTextField {
68 fact: missionItem.terrainAdjustMaxClimbRate
69 Layout.fillWidth: true
70 }
71
72 QGCLabel { text: qsTr("Max Descent Rate") }
73 FactTextField {
74 fact: missionItem.terrainAdjustMaxDescentRate
75 Layout.fillWidth: true
76 }
77 }
78}