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
12 property var missionItem
13
14 MouseArea {
15 Layout.preferredWidth: childrenRect.width
16 Layout.preferredHeight: childrenRect.height
17
18 onClicked: {
19 var removeModes = []
20 var updateFunction = function(altFrame){ missionItem.cameraCalc.distanceMode = altFrame }
21 removeModes.push(QGroundControl.AltitudeFrameMixed)
22 if (!missionItem.masterController.controllerVehicle.supports.terrainFrame) {
23 removeModes.push(QGroundControl.AltitudeFrameTerrain)
24 }
25 if (!QGroundControl.corePlugin.options.showMissionAbsoluteAltitude || !missionItem.cameraCalc.isManualCamera) {
26 removeModes.push(QGroundControl.AltitudeFrameAbsolute)
27 }
28 altFrameDialogFactory.open({ currentAltFrame: missionItem.cameraCalc.distanceMode, rgRemoveModes: removeModes, updateAltFrameFn: updateFunction })
29 }
30
31 QGCPopupDialogFactory {
32 id: altFrameDialogFactory
33
34 dialogComponent: altFrameDialogComponent
35 }
36
37 Component { id: altFrameDialogComponent; AltFrameDialog { } }
38
39 RowLayout {
40 spacing: ScreenTools.defaultFontPixelWidth / 2
41
42 QGCLabel { text: QGroundControl.altitudeFrameShortDescription(missionItem.cameraCalc.distanceMode) }
43 QGCColoredImage {
44 height: ScreenTools.defaultFontPixelHeight / 2
45 width: height
46 source: "/res/DropArrow.svg"
47 color: qgcPal.textPrimary
48 }
49 }
50 }
51
52 GridLayout {
53 Layout.fillWidth: true
54 columnSpacing: _margin
55 rowSpacing: _margin
56 columns: 2
57 enabled: missionItem.cameraCalc.distanceMode === QGroundControl.AltitudeFrameCalcAboveTerrain
58
59 QGCLabel { text: qsTr("Tolerance") }
60 FactTextField {
61 fact: missionItem.terrainAdjustTolerance
62 Layout.fillWidth: true
63 }
64
65 QGCLabel { text: qsTr("Max Climb Rate") }
66 FactTextField {
67 fact: missionItem.terrainAdjustMaxClimbRate
68 Layout.fillWidth: true
69 }
70
71 QGCLabel { text: qsTr("Max Descent Rate") }
72 FactTextField {
73 fact: missionItem.terrainAdjustMaxDescentRate
74 Layout.fillWidth: true
75 }
76 }
77}