6import QGroundControl.Controls
7import QGroundControl.FactControls
11 radius: ScreenTools.defaultFontPixelWidth * 0.5
16 property var missionItems ///< List of all available mission items
17 property real maxWidth: parent.width
19 signal setCurrentSeqNum(int seqNum)
21 readonly property real _margins: ScreenTools.defaultFontPixelWidth
24 var calcLength = (statusListView.count + 1) * (statusListView.count ? statusListView.contentItem.children[0].width : 1)
25 root.width = root.maxWidth > calcLength ? calcLength : root.maxWidth
28 QGCPalette { id: qgcPal }
32 anchors.top: parent.bottom
34 text: qsTr("Terrain Altitude")
35 horizontalAlignment: Text.AlignHCenter
37 transformOrigin: Item.TopLeft
42 anchors.margins: _margins
43 anchors.top: parent.top
44 anchors.bottom: parent.bottom
45 anchors.leftMargin: ScreenTools.defaultFontPixelHeight
46 anchors.left: parent.left
47 anchors.right: parent.right
49 highlightMoveDuration: 250
50 orientation: ListView.Horizontal
53 currentIndex: _missionController.currentPlanViewSeqNum
56 var calcLength = (statusListView.count + 1) * (statusListView.count ? statusListView.contentItem.children[0].width : 1)
57 root.width = root.maxWidth > calcLength ? calcLength : root.maxWidth
61 height: statusListView.height
62 width: display ? (indicator.width + spacing) : 0
65 property real availableHeight: height - indicator.height
66 property bool _coordValid: object.coordinate.isValid
67 property bool _terrainAvailable: !isNaN(object.terrainPercent)
68 property real _terrainPercent: _terrainAvailable ? object.terrainPercent : 1
70 readonly property bool display: object.specifiesCoordinate && !object.isStandaloneCoordinate
71 readonly property real spacing: ScreenTools.defaultFontPixelWidth * ScreenTools.smallFontPointRatio
74 anchors.bottom: parent.bottom
75 anchors.horizontalCenter: parent.horizontalCenter
76 width: indicator.width
77 height: _terrainAvailable ? Math.max(availableHeight * _terrainPercent, 1) : parent.height
78 color: _terrainAvailable ? (object.terrainCollision ? "red": qgcPal.text) : "yellow"
82 MissionItemIndexLabel {
84 anchors.horizontalCenter: parent.horizontalCenter
85 y: availableHeight - (availableHeight * object.altPercent)
87 checked: object.isCurrentItem
88 label: object.abbreviation.charAt(0)
89 index: object.abbreviation.charAt(0) > 'A' && object.abbreviation.charAt(0) < 'z' ? -1 : object.sequenceNumber
90 showSequenceNumbers: false
95 anchors.leftMargin: -2
96 anchors.rightMargin: -2
97 anchors.fill: indexLabel
100 visible: indexLabel.visible
101 transform: Rotation { angle: 90; origin.x: indexBackground.width / 2; origin.y: indexBackground.height / 2 }
106 anchors.centerIn: parent
107 text: object.sequenceNumber
108 visible: indicator.index != -1
109 transform: Rotation { angle: 90; origin.x: indexLabel.width / 2; origin.y: indexLabel.height / 2 }
114 onClicked: root.setCurrentSeqNum(object.sequenceNumber)