Unverified Commit d5f7442e authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8176 from DonLakeFlyer/SeqNum

MissionItemStatus: Show seq nums, clickable selection
parents 155d0d4b bfd6fccf
...@@ -25,9 +25,11 @@ Rectangle { ...@@ -25,9 +25,11 @@ Rectangle {
opacity: 0.80 opacity: 0.80
clip: true clip: true
property var missionItems ///< List of all available mission items property var missionItems ///< List of all available mission items
property real maxWidth: parent.width
signal setCurrentSeqNum(int seqNum)
property real maxWidth: parent.width
readonly property real _margins: ScreenTools.defaultFontPixelWidth readonly property real _margins: ScreenTools.defaultFontPixelWidth
onMaxWidthChanged: { onMaxWidthChanged: {
...@@ -97,7 +99,9 @@ Rectangle { ...@@ -97,7 +99,9 @@ Rectangle {
checked: object.isCurrentItem checked: object.isCurrentItem
label: object.abbreviation.charAt(0) label: object.abbreviation.charAt(0)
index: object.abbreviation.charAt(0) > 'A' && object.abbreviation.charAt(0) < 'z' ? -1 : object.sequenceNumber index: object.abbreviation.charAt(0) > 'A' && object.abbreviation.charAt(0) < 'z' ? -1 : object.sequenceNumber
showSequenceNumbers: true
visible: true visible: true
onClicked: root.setCurrentSeqNum(object.sequenceNumber)
} }
} }
} }
......
...@@ -884,6 +884,8 @@ Item { ...@@ -884,6 +884,8 @@ Item {
missionItems: _missionController.visualItems missionItems: _missionController.visualItems
visible: _internalVisible && _editingLayer === _layerMission && QGroundControl.corePlugin.options.showMissionStatus visible: _internalVisible && _editingLayer === _layerMission && QGroundControl.corePlugin.options.showMissionStatus
onSetCurrentSeqNum: _missionController.setCurrentPlanViewSeqNum(seqNum, true)
property bool _internalVisible: false property bool _internalVisible: false
function toggleVisible() { function toggleVisible() {
......
...@@ -25,6 +25,7 @@ Canvas { ...@@ -25,6 +25,7 @@ Canvas {
property real gimbalYaw property real gimbalYaw
property real vehicleYaw property real vehicleYaw
property bool showGimbalYaw: false property bool showGimbalYaw: false
property bool showSequenceNumbers: false
property real _width: showGimbalYaw ? Math.max(_gimbalYawWidth, labelControl.visible ? labelControl.width : indicator.width) : (labelControl.visible ? labelControl.width : indicator.width) property real _width: showGimbalYaw ? Math.max(_gimbalYawWidth, labelControl.visible ? labelControl.width : indicator.width) : (labelControl.visible ? labelControl.width : indicator.width)
property real _height: showGimbalYaw ? _gimbalYawWidth : (labelControl.visible ? labelControl.height : indicator.height) property real _height: showGimbalYaw ? _gimbalYawWidth : (labelControl.visible ? labelControl.height : indicator.height)
...@@ -37,7 +38,7 @@ Canvas { ...@@ -37,7 +38,7 @@ Canvas {
property real _labelMargin: 2 property real _labelMargin: 2
property real _labelRadius: _indicatorRadius + _labelMargin property real _labelRadius: _indicatorRadius + _labelMargin
property string _label: label.length > 1 ? label : "" property string _label: label.length > 1 ? label : ""
property string _index: index === 0 || index === -1 ? label.charAt(0) : "" /*index*/ property string _index: index === 0 || index === -1 ? label.charAt(0) : (showSequenceNumbers ? index : "")
onColorChanged: requestPaint() onColorChanged: requestPaint()
onShowGimbalYawChanged: requestPaint() onShowGimbalYawChanged: requestPaint()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment