|
|
@ -33,6 +33,7 @@ Rectangle { |
|
|
|
property color _outerTextColor: _currentItem ? qgcPal.primaryButtonText : qgcPal.text |
|
|
|
property color _outerTextColor: _currentItem ? qgcPal.primaryButtonText : qgcPal.text |
|
|
|
property bool _noMissionItemsAdded: ListView.view.model.count === 1 |
|
|
|
property bool _noMissionItemsAdded: ListView.view.model.count === 1 |
|
|
|
property real _sectionSpacer: ScreenTools.defaultFontPixelWidth / 2 // spacing between section headings |
|
|
|
property real _sectionSpacer: ScreenTools.defaultFontPixelWidth / 2 // spacing between section headings |
|
|
|
|
|
|
|
property bool _singleComplexItem: missionController.complexMissionItemNames.length === 1 |
|
|
|
|
|
|
|
|
|
|
|
readonly property real _editFieldWidth: Math.min(width - _margin * 2, ScreenTools.defaultFontPixelWidth * 12) |
|
|
|
readonly property real _editFieldWidth: Math.min(width - _margin * 2, ScreenTools.defaultFontPixelWidth * 12) |
|
|
|
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
@ -63,7 +64,7 @@ Rectangle { |
|
|
|
anchors.verticalCenter: commandPicker.verticalCenter |
|
|
|
anchors.verticalCenter: commandPicker.verticalCenter |
|
|
|
anchors.leftMargin: _margin |
|
|
|
anchors.leftMargin: _margin |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
text: missionItem.abbreviation.charAt(0) |
|
|
|
text: missionItem.homePosition ? "H" : missionItem.sequenceNumber |
|
|
|
color: _outerTextColor |
|
|
|
color: _outerTextColor |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -97,20 +98,16 @@ Rectangle { |
|
|
|
onTriggered: insertWaypoint() |
|
|
|
onTriggered: insertWaypoint() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
|
|
|
|
text: qsTr("Delete") |
|
|
|
|
|
|
|
onTriggered: remove() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Menu { |
|
|
|
Menu { |
|
|
|
id: normalPatternMenu |
|
|
|
id: patternMenu |
|
|
|
title: qsTr("Insert pattern") |
|
|
|
title: qsTr("Insert pattern") |
|
|
|
|
|
|
|
visible: !_singleComplexItem |
|
|
|
|
|
|
|
|
|
|
|
Instantiator { |
|
|
|
Instantiator { |
|
|
|
model: missionController.complexMissionItemNames |
|
|
|
model: missionController.complexMissionItemNames |
|
|
|
|
|
|
|
|
|
|
|
onObjectAdded: normalPatternMenu.insertItem(index, object) |
|
|
|
onObjectAdded: patternMenu.insertItem(index, object) |
|
|
|
onObjectRemoved: normalPatternMenu.removeItem(object) |
|
|
|
onObjectRemoved: patternMenu.removeItem(object) |
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
text: modelData |
|
|
|
text: modelData |
|
|
@ -120,6 +117,17 @@ Rectangle { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
|
|
|
|
text: qsTr("Insert ") + missionController.complexMissionItemNames[0] |
|
|
|
|
|
|
|
visible: _singleComplexItem |
|
|
|
|
|
|
|
onTriggered: insertComplexItem(missionController.complexMissionItemNames[0]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
|
|
|
|
text: qsTr("Delete") |
|
|
|
|
|
|
|
onTriggered: remove() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MenuItem { |
|
|
|
text: qsTr("Change command...") |
|
|
|
text: qsTr("Change command...") |
|
|
|
onTriggered: commandPicker.clicked() |
|
|
|
onTriggered: commandPicker.clicked() |
|
|
|
visible: !_waypointsOnlyMode |
|
|
|
visible: !_waypointsOnlyMode |
|
|
|