Commit b5497de9 authored by Don Gagne's avatar Don Gagne

parent 67b4758e
......@@ -195,6 +195,7 @@
<file alias="counter-clockwise-arrow.svg">resources/counter-clockwise-arrow.svg</file>
<file alias="chevron-down.svg">resources/chevron-down.svg</file>
<file alias="chevron-up.svg">resources/chevron-up.svg</file>
<file alias="DropArrow.svg">resources/DropArrow.svg</file>
<file alias="gear-black.svg">resources/gear-black.svg</file>
<file alias="gear-white.svg">resources/gear-white.svg</file>
<file alias="helicoptericon.svg">resources/helicoptericon.svg</file>
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve">
<g>
<g id="arrow-drop-down">
<polygon points="0,63.75 127.5,191.25 255,63.75 "/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
......@@ -32,22 +32,32 @@ Rectangle {
property string _altModeAboveTerrainHelpText: qsTr("Altitude above terrain\nActual AMSL altitude: %1 %2").arg(missionItem.amslAltAboveTerrain.valueString).arg(missionItem.amslAltAboveTerrain.units)
property string _altModeTerrainFrameHelpText: qsTr("Using terrain reference frame")
readonly property string _altModeRelativeExtraUnits: qsTr(" (Rel)")
readonly property string _altModeAbsoluteExtraUnits: qsTr(" (AMSL)")
readonly property string _altModeAboveTerrainExtraUnits: qsTr(" (Abv Terr)")
readonly property string _altModeTerrainFrameExtraUnits: qsTr(" (TerrF)")
function updateAltitudeModeText() {
if (missionItem.altitudeMode === _altModeRelative) {
altModeLabel.text = qsTr("Altitude")
altModeHelp.text = _altModeRelativeHelpText
altField.extraUnits = _altModeRelativeExtraUnits
} else if (missionItem.altitudeMode === _altModeAbsolute) {
altModeLabel.text = qsTr("Above Mean Sea Level")
altModeHelp.text = _altModeAbsoluteHelpText
altField.extraUnits = _altModeAbsoluteExtraUnits
} else if (missionItem.altitudeMode === _altModeAboveTerrain) {
altModeLabel.text = qsTr("Above Terrain")
altModeHelp.text = Qt.binding(function() { return _altModeAboveTerrainHelpText })
altField.extraUnits = _altModeAboveTerrainExtraUnits
} else if (missionItem.altitudeMode === _altModeTerrainFrame) {
altModeLabel.text = qsTr("Terrain Frame")
altModeHelp.text = _altModeTerrainFrameHelpText
altField.extraUnits = _altModeTerrainFrameExtraUnits
} else {
altModeLabel.text = qsTr("Internal Error")
altModeHelp.text = ""
altField.extraUnits = ""
}
}
......@@ -130,11 +140,11 @@ Rectangle {
id: altHamburger
anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 4
anchors.left: altModeLabel.right
anchors.top: altModeLabel.top
width: height
height: altModeLabel.height
anchors.verticalCenter: altModeLabel.verticalCenter
width: ScreenTools.defaultFontPixelHeight / 2
height: width
sourceSize.height: height
source: "qrc:/qmlimages/Hamburger.svg"
source: "/res/DropArrow.svg"
color: qgcPal.text
}
......@@ -166,6 +176,7 @@ Rectangle {
checkable: true
checked: missionItem.altitudeMode === _altModeAboveTerrain
onTriggered: missionItem.altitudeMode = _altModeAboveTerrain
visible: missionItem.specifiesCoordinate
}
MenuItem {
......@@ -179,15 +190,21 @@ Rectangle {
}
FactTextField {
fact: missionItem.altitude
id: altField
fact: missionItem.altitude
unitsLabel: fact.units + extraUnits
anchors.left: parent.left
anchors.right: parent.right
property string extraUnits
}
QGCLabel {
id: altModeHelp
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize
id: altModeHelp
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize
anchors.left: parent.left
anchors.right: parent.right
}
}
}
......
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