Commit f30d265c authored by Gus Grubba's avatar Gus Grubba

Tidying up Mission Settings and Survey Settings

parent 8a3ee28d
...@@ -38,6 +38,7 @@ Rectangle { ...@@ -38,6 +38,7 @@ Rectangle {
property bool _showCruiseSpeed: !_missionVehicle.multiRotor property bool _showCruiseSpeed: !_missionVehicle.multiRotor
property bool _showHoverSpeed: _missionVehicle.multiRotor || missionController.vehicle.vtol property bool _showHoverSpeed: _missionVehicle.multiRotor || missionController.vehicle.vtol
property bool _multipleFirmware: QGroundControl.supportedFirmwareCount > 2 property bool _multipleFirmware: QGroundControl.supportedFirmwareCount > 2
property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 16
readonly property string _firmwareLabel: qsTr("Firmware:") readonly property string _firmwareLabel: qsTr("Firmware:")
readonly property string _vehicleLabel: qsTr("Vehicle:") readonly property string _vehicleLabel: qsTr("Vehicle:")
...@@ -53,6 +54,7 @@ Rectangle { ...@@ -53,6 +54,7 @@ Rectangle {
QGCLabel { QGCLabel {
text: qsTr("Planned Home Position") text: qsTr("Planned Home Position")
color: qgcPal.buttonHighlight
} }
Rectangle { Rectangle {
...@@ -64,29 +66,19 @@ Rectangle { ...@@ -64,29 +66,19 @@ Rectangle {
Repeater { Repeater {
model: missionItem.textFieldFacts model: missionItem.textFieldFacts
RowLayout {
Item { anchors.left: parent.left
width: valuesColumn.width
height: textField.height
QGCLabel {
id: textFieldLabel
anchors.baseline: textField.baseline
text: object.name
}
FactTextField {
id: textField
anchors.right: parent.right anchors.right: parent.right
width: _editFieldWidth spacing: _margin
QGCLabel { text: object.name; Layout.fillWidth: true }
FactTextField {
Layout.preferredWidth: _fieldWidth
showUnits: true showUnits: true
fact: object fact: object
visible: !_root.readOnly visible: !_root.readOnly
} }
FactLabel { FactLabel {
anchors.baseline: textFieldLabel.baseline Layout.preferredWidth: _fieldWidth
anchors.right: parent.right
fact: object fact: object
visible: _root.readOnly visible: _root.readOnly
} }
...@@ -102,7 +94,8 @@ Rectangle { ...@@ -102,7 +94,8 @@ Rectangle {
} }
QGCLabel { QGCLabel {
text: qsTr("Vehicle Info:") text: qsTr("Vehicle Info")
color: qgcPal.buttonHighlight
visible: _multipleFirmware visible: _multipleFirmware
} }
...@@ -125,72 +118,93 @@ Rectangle { ...@@ -125,72 +118,93 @@ Rectangle {
QGCLabel { QGCLabel {
text: _firmwareLabel text: _firmwareLabel
visible: _showOfflineEditingCombos visible: _showOfflineEditingCombos
Layout.fillWidth: true
} }
FactComboBox { FactComboBox {
Layout.fillWidth: true
fact: QGroundControl.offlineEditingFirmwareType fact: QGroundControl.offlineEditingFirmwareType
indexModel: false indexModel: false
visible: _showOfflineEditingCombos visible: _showOfflineEditingCombos
Layout.preferredWidth: _fieldWidth
} }
QGCLabel { QGCLabel {
text: _firmwareLabel text: _firmwareLabel
visible: !_showOfflineEditingCombos visible: !_showOfflineEditingCombos
Layout.fillWidth: true
} }
QGCLabel { QGCLabel {
text: _missionVehicle.firmwareTypeString text: _missionVehicle.firmwareTypeString
visible: !_showOfflineEditingCombos visible: !_showOfflineEditingCombos
Layout.preferredWidth: _fieldWidth
} }
QGCLabel { QGCLabel {
text: _vehicleLabel text: _vehicleLabel
visible: _showOfflineEditingCombos visible: _showOfflineEditingCombos
Layout.fillWidth: true
} }
FactComboBox { FactComboBox {
id: offlineVehicleCombo id: offlineVehicleCombo
Layout.fillWidth: true
fact: QGroundControl.offlineEditingVehicleType fact: QGroundControl.offlineEditingVehicleType
indexModel: false indexModel: false
visible: _showOfflineEditingCombos visible: _showOfflineEditingCombos
Layout.preferredWidth: _fieldWidth
} }
QGCLabel { QGCLabel {
text: _vehicleLabel text: _vehicleLabel
visible: !_showOfflineEditingCombos visible: !_showOfflineEditingCombos
Layout.fillWidth: true
} }
QGCLabel { QGCLabel {
text: _missionVehicle.vehicleTypeString text: _missionVehicle.vehicleTypeString
visible: !_showOfflineEditingCombos visible: !_showOfflineEditingCombos
Layout.preferredWidth: _fieldWidth
} }
QGCLabel { QGCLabel {
Layout.row: 2 Layout.row: 2
text: qsTr("Cruise speed:") text: qsTr("Cruise speed:")
visible: _showCruiseSpeed visible: _showCruiseSpeed
Layout.fillWidth: true
} }
FactTextField { FactTextField {
Layout.fillWidth: true
fact: QGroundControl.offlineEditingCruiseSpeed fact: QGroundControl.offlineEditingCruiseSpeed
visible: _showCruiseSpeed visible: _showCruiseSpeed
Layout.preferredWidth: _fieldWidth
} }
QGCLabel { QGCLabel {
Layout.row: 3 Layout.row: 3
text: qsTr("Hover speed:") text: qsTr("Hover speed:")
visible: _showHoverSpeed visible: _showHoverSpeed
Layout.fillWidth: true
} }
FactTextField { FactTextField {
Layout.fillWidth: true
fact: QGroundControl.offlineEditingHoverSpeed fact: QGroundControl.offlineEditingHoverSpeed
visible: _showHoverSpeed visible: _showHoverSpeed
Layout.preferredWidth: _fieldWidth
} }
} // GridLayout } // GridLayout
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
visible: !_multipleFirmware
QGCLabel { text: qsTr("Hover speed:"); Layout.fillWidth: true }
FactTextField {
Layout.preferredWidth: _fieldWidth
fact: QGroundControl.offlineEditingHoverSpeed
}
}
QGCLabel { QGCLabel {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
visible: _multipleFirmware text: qsTr("Speeds are only used for time calculations. Actual vehicle speed will not be affected.")
text: qsTr("Speeds are only for time calculations. Actual vehicle will not be affected.") horizontalAlignment: Text.AlignHCenter
} }
Rectangle { Rectangle {
...@@ -201,6 +215,7 @@ Rectangle { ...@@ -201,6 +215,7 @@ Rectangle {
} }
QGCButton { QGCButton {
width: parent.width * 0.9
text: qsTr("Set Home To Map Center") text: qsTr("Set Home To Map Center")
onClicked: editorRoot.moveHomeToMapCenter() onClicked: editorRoot.moveHomeToMapCenter()
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
......
This diff is collapsed.
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