QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
RallyPointInspector.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6import QGroundControl.FactControls
7
8/// Inspector of the current rally point
9Item {
10 id: root
11
12 required property var page
13 property bool drillIn: false
14
15 signal backRequested
16
17 ColumnLayout {
18 anchors.fill: parent
19 anchors.margins: ScreenTools.defaultFontPixelWidth / 2
20 spacing: ScreenTools.defaultFontPixelHeight * 0.5
21
22 PlanInspectorHeader {
23 Layout.fillWidth: true
24 namePrefix: "planPanel_rallyInspector"
25 title: qsTr("Rally Point %1").arg(root.page.currentIndex + 1)
26 drillIn: root.drillIn
27 canStepPrevious: root.page.currentIndex > 0
28 canStepNext: root.page.currentIndex >= 0 && root.page.currentIndex < root.page.points.count - 1
29
30 onBackRequested: root.backRequested()
31 onPreviousRequested: root.page.step(-1)
32 onNextRequested: root.page.step(1)
33 onDeleteRequested: {
34 if (mainWindow.allowViewSwitch()) {
35 root.page.deleteCurrent()
36 }
37 }
38 }
39
40 QGCFlickable {
41 id: flickable
42
43 Layout.fillWidth: true
44 Layout.fillHeight: true
45 contentHeight: fieldsColumn.height
46 clip: true
47
48 ColumnLayout {
49 id: fieldsColumn
50
51 width: flickable.width
52 spacing: ScreenTools.defaultFontPixelHeight * 0.5
53
54 LabelledFactTextField {
55 objectName: "planPanel_rallyField_0"
56 Layout.fillWidth: true
57 visible: root.page.current !== null
58 fact: root.page.current ? root.page.current.latitude : null
59 }
60
61 LabelledFactTextField {
62 objectName: "planPanel_rallyField_1"
63 Layout.fillWidth: true
64 visible: root.page.current !== null
65 fact: root.page.current ? root.page.current.longitude : null
66 }
67
68 Loader {
69 Layout.fillWidth: true
70 active: root.page.current !== null
71
72 sourceComponent: RallyPointAltitudeEditor {
73 rallyPoint: root.page.current
74 vehicle: root.page.planMasterController.controllerVehicle
75 }
76 }
77 }
78 }
79 }
80}