Commit 4e80a0b6 authored by DonLakeFlyer's avatar DonLakeFlyer

Allow custom build to hide Absolute Altitude

parent 65ebabe4
......@@ -4,6 +4,7 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.Controls 1.0
......@@ -28,7 +29,7 @@ Rectangle {
ExclusiveGroup {
id: altRadios
onCurrentChanged: missionItem.altitudeMode = current.value
onCurrentChanged: missionItem.altitudeMode = current.altModeValue
}
Column {
......@@ -99,10 +100,33 @@ Rectangle {
}
RowLayout {
QGCRadioButton { text: qsTr("Rel"); exclusiveGroup: altRadios; checked: missionItem.altitudeMode === value; readonly property int value: _altModeRelative }
QGCRadioButton { text: qsTr("Abs"); exclusiveGroup: altRadios; checked: missionItem.altitudeMode === value; readonly property int value: _altModeAbsolute }
QGCRadioButton { text: qsTr("AGL"); exclusiveGroup: altRadios; checked: missionItem.altitudeMode === value; readonly property int value: _altModeAboveTerrain }
QGCRadioButton { text: qsTr("TerrF"); exclusiveGroup: altRadios; checked: missionItem.altitudeMode === value; visible: missionItem.supportsTerrainFrame; readonly property int value: _altModeTerrainFrame }
QGCRadioButton {
text: qsTr("Rel")
exclusiveGroup: altRadios
checked: missionItem.altitudeMode === altModeValue
readonly property int altModeValue: _altModeRelative
}
QGCRadioButton {
text: qsTr("Abs")
exclusiveGroup: altRadios
checked: missionItem.altitudeMode === altModeValue
visible: QGroundControl.corePlugin.options.showMissionAbsoluteAltitude || missionItem.altitudeMode === altModeValue
readonly property int altModeValue: _altModeAbsolute
}
QGCRadioButton {
text: qsTr("AGL")
exclusiveGroup: altRadios
checked: missionItem.altitudeMode === altModeValue
readonly property int altModeValue: _altModeAboveTerrain
}
QGCRadioButton {
text: qsTr("TerrF")
exclusiveGroup: altRadios
checked: missionItem.altitudeMode === altModeValue
visible: missionItem.supportsTerrainFrame || missionItem.altitudeMode === altModeValue
readonly property int altModeValue: _altModeTerrainFrame
}
}
FactValueSlider {
......
......@@ -47,6 +47,7 @@ public:
Q_PROPERTY(bool useMobileFileDialog READ useMobileFileDialog CONSTANT)
Q_PROPERTY(bool showMissionStatus READ showMissionStatus CONSTANT)
Q_PROPERTY(bool guidedActionsRequireRCRSSI READ guidedActionsRequireRCRSSI CONSTANT)
Q_PROPERTY(bool showMissionAbsoluteAltitude READ showMissionAbsoluteAltitude NOTIFY showMissionAbsoluteAltitudeChanged)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
......@@ -86,6 +87,7 @@ public:
virtual bool guidedActionsRequireRCRSSI () const { return false; } ///< true: Guided actions will be disabled is there is no RC RSSI
virtual bool showOfflineMapExport () const { return true; }
virtual bool showOfflineMapImport () const { return true; }
virtual bool showMissionAbsoluteAltitude () const { return true; }
#if defined(__mobile__)
virtual bool useMobileFileDialog () const { return true;}
......@@ -111,6 +113,7 @@ signals:
void multiVehicleEnabledChanged (bool multiVehicleEnabled);
void showOfflineMapExportChanged ();
void showOfflineMapImportChanged ();
void showMissionAbsoluteAltitudeChanged ();
private:
CustomInstrumentWidget* _defaultInstrumentWidget;
......
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