QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MissionSettingsEditor.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
9// Editor for Initial Camera Settings (mission item 0)
10Rectangle {
11 id: root
12 width: availableWidth
13 height: valuesColumn.height + (_margin * 2)
14 color: qgcPal.windowShadeDark
15 radius: ScreenTools.defaultBorderRadius
16
17 required property var missionItem
18 required property real availableWidth
19
20 property var _masterController: missionItem.masterController
21 property var _controllerVehicle: _masterController.controllerVehicle
22 property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly
23 property bool _showCameraSection: _waypointsOnlyMode || QGroundControl.corePlugin.showAdvancedUI
24 property bool _simpleMissionStart: QGroundControl.corePlugin.options.showSimpleMissionStart
25
26 readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
27
28 QGCPalette { id: qgcPal }
29
30 ColumnLayout {
31 id: valuesColumn
32 anchors.margins: _margin
33 anchors.left: parent.left
34 anchors.right: parent.right
35 anchors.top: parent.top
36 spacing: ScreenTools.defaultFontPixelHeight / 2
37
38 Column {
39 Layout.fillWidth: true
40 spacing: _margin
41 visible: !_simpleMissionStart
42
43 CameraSection {
44 id: cameraSection
45 anchors.left: parent.left
46 anchors.right: parent.right
47 missionItem: root.missionItem
48 visible: _showCameraSection
49 showSectionHeader: false
50
51 Component.onCompleted: checked = !_waypointsOnlyMode && missionItem.cameraSection.settingsSpecified
52 }
53
54 QGCLabel {
55 anchors.left: parent.left
56 anchors.right: parent.right
57 text: qsTr("Above camera commands will take affect immediately upon mission start.")
58 wrapMode: Text.WordWrap
59 horizontalAlignment: Text.AlignHCenter
60 font.pointSize: ScreenTools.smallFontPointSize
61 visible: _showCameraSection && cameraSection.checked
62 }
63 }
64 }
65}