|
|
|
@ -31,493 +31,546 @@ QGCView {
@@ -31,493 +31,546 @@ QGCView {
|
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
property Fact _percentRemainingAnnounce: QGroundControl.batteryPercentRemainingAnnounce |
|
|
|
|
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 20 |
|
|
|
|
property real _labelWidth: ScreenTools.defaultFontPixelWidth * 15 |
|
|
|
|
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30 |
|
|
|
|
|
|
|
|
|
QGCPalette { id: qgcPal } |
|
|
|
|
|
|
|
|
|
QGCViewPanel { |
|
|
|
|
id: panel |
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
|
|
QGCFlickable { |
|
|
|
|
clip: true |
|
|
|
|
anchors.fill: parent |
|
|
|
|
contentHeight: settingsColumn.height |
|
|
|
|
contentWidth: settingsColumn.width |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: settingsColumn |
|
|
|
|
width: qgcView.width |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Base UI Font Point Size |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
//-- Units |
|
|
|
|
Item { |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
height: unitLabel.height |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
QGCLabel { |
|
|
|
|
id: baseFontLabel |
|
|
|
|
text: qsTr("Base UI font size:") |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
id: unitLabel |
|
|
|
|
text: qsTr("Units (Requires Restart)") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
id: baseFontRow |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
id: decrementButton |
|
|
|
|
width: height |
|
|
|
|
height: baseFontEdit.height |
|
|
|
|
text: "-" |
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
if(ScreenTools.defaultFontPointSize > 6) { |
|
|
|
|
QGroundControl.baseFontPointSize = QGroundControl.baseFontPointSize - 1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
height: unitsCol.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Column { |
|
|
|
|
id: unitsCol |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: distanceUnitsCombo.baseline |
|
|
|
|
text: qsTr("Distance:") |
|
|
|
|
} |
|
|
|
|
FactComboBox { |
|
|
|
|
id: distanceUnitsCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.distanceUnits |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCTextField { |
|
|
|
|
id: baseFontEdit |
|
|
|
|
width: _editFieldWidth - (decrementButton.width * 2) - (baseFontRow.spacing * 2) |
|
|
|
|
text: QGroundControl.baseFontPointSize |
|
|
|
|
showUnits: true |
|
|
|
|
unitsLabel: "pt" |
|
|
|
|
maximumLength: 6 |
|
|
|
|
validator: DoubleValidator {bottom: 6.0; top: 48.0; decimals: 2;} |
|
|
|
|
|
|
|
|
|
onEditingFinished: { |
|
|
|
|
var point = parseFloat(text) |
|
|
|
|
if(point >= 6.0 && point <= 48.0) |
|
|
|
|
QGroundControl.baseFontPointSize = point; |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: areaUnitsCombo.baseline |
|
|
|
|
text: qsTr("Area:") |
|
|
|
|
} |
|
|
|
|
FactComboBox { |
|
|
|
|
id: areaUnitsCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.areaUnits |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
width: height |
|
|
|
|
height: baseFontEdit.height |
|
|
|
|
text: "+" |
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
if(ScreenTools.defaultFontPointSize < 49) { |
|
|
|
|
QGroundControl.baseFontPointSize = QGroundControl.baseFontPointSize + 1 |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: speedUnitsCombo.baseline |
|
|
|
|
text: qsTr("Speed:") |
|
|
|
|
} |
|
|
|
|
FactComboBox { |
|
|
|
|
id: speedUnitsCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.speedUnits |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
text: qsTr("(requires app restart)") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Units |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: baseFontLabel.width |
|
|
|
|
anchors.baseline: distanceUnitsCombo.baseline |
|
|
|
|
text: qsTr("Distance units:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: distanceUnitsCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.distanceUnits |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: distanceUnitsCombo.baseline |
|
|
|
|
text: qsTr("(requires app restart)") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: baseFontLabel.width |
|
|
|
|
anchors.baseline: areaUnitsCombo.baseline |
|
|
|
|
text: qsTr("Area units:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: areaUnitsCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.areaUnits |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: areaUnitsCombo.baseline |
|
|
|
|
text: qsTr("(requires app restart)") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: baseFontLabel.width |
|
|
|
|
anchors.baseline: speedUnitsCombo.baseline |
|
|
|
|
text: qsTr("Speed units:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: speedUnitsCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.speedUnits |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: speedUnitsCombo.baseline |
|
|
|
|
text: qsTr("(requires app restart)") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//-- Video Source |
|
|
|
|
Item { |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
width: parent.width |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Audio preferences |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Mute all audio output") |
|
|
|
|
checked: QGroundControl.isAudioMuted |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.isAudioMuted = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Prompt Save Log |
|
|
|
|
QGCCheckBox { |
|
|
|
|
id: promptSaveLog |
|
|
|
|
text: qsTr("Prompt to save Flight Data Log after each flight") |
|
|
|
|
checked: QGroundControl.isSaveLogPrompt |
|
|
|
|
visible: !ScreenTools.isMobile |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.isSaveLogPrompt = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Prompt Save even if not armed |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Prompt to save Flight Data Log even if vehicle was not armed") |
|
|
|
|
checked: QGroundControl.isSaveLogPromptNotArmed |
|
|
|
|
visible: !ScreenTools.isMobile |
|
|
|
|
enabled: promptSaveLog.checked |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.isSaveLogPromptNotArmed = checked |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
height: videoLabel.height |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
QGCLabel { |
|
|
|
|
id: videoLabel |
|
|
|
|
text: qsTr("Video (Requires Restart)") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Clear settings |
|
|
|
|
QGCCheckBox { |
|
|
|
|
id: clearCheck |
|
|
|
|
text: qsTr("Clear all settings on next start") |
|
|
|
|
checked: false |
|
|
|
|
onClicked: { |
|
|
|
|
checked ? clearDialog.visible = true : QGroundControl.clearDeleteAllSettingsNextBoot() |
|
|
|
|
} |
|
|
|
|
MessageDialog { |
|
|
|
|
id: clearDialog |
|
|
|
|
visible: false |
|
|
|
|
icon: StandardIcon.Warning |
|
|
|
|
standardButtons: StandardButton.Yes | StandardButton.No |
|
|
|
|
title: qsTr("Clear Settings") |
|
|
|
|
text: qsTr("All saved settings will be reset the next time you start QGroundControl. Is this really what you want?") |
|
|
|
|
onYes: { |
|
|
|
|
QGroundControl.deleteAllSettingsNextBoot() |
|
|
|
|
clearDialog.visible = false |
|
|
|
|
Rectangle { |
|
|
|
|
height: videoCol.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Column { |
|
|
|
|
id: videoCol |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: videoSource.baseline |
|
|
|
|
text: qsTr("Video Source:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: videoSource |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: QGroundControl.videoManager.videoSourceList |
|
|
|
|
Component.onCompleted: { |
|
|
|
|
var index = videoSource.find(QGroundControl.videoManager.videoSource) |
|
|
|
|
if (index >= 0) { |
|
|
|
|
videoSource.currentIndex = index |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onActivated: { |
|
|
|
|
if (index != -1) { |
|
|
|
|
currentIndex = index |
|
|
|
|
QGroundControl.videoManager.videoSource = model[index] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onNo: { |
|
|
|
|
clearCheck.checked = false |
|
|
|
|
clearDialog.visible = false |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 0 |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: udpField.baseline |
|
|
|
|
text: qsTr("UDP Port:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCTextField { |
|
|
|
|
id: udpField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: QGroundControl.videoManager.udpPort |
|
|
|
|
validator: IntValidator {bottom: 1024; top: 65535;} |
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
onEditingFinished: { |
|
|
|
|
QGroundControl.videoManager.udpPort = parseInt(text) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Battery talker |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
id: announcePercentCheckbox |
|
|
|
|
anchors.baseline: announcePercent.baseline |
|
|
|
|
text: qsTr("Announce battery lower than:") |
|
|
|
|
checked: _percentRemainingAnnounce.value != 0 |
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
if (checked) { |
|
|
|
|
_percentRemainingAnnounce.value = _percentRemainingAnnounce.defaultValueString |
|
|
|
|
} else { |
|
|
|
|
_percentRemainingAnnounce.value = 0 |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 1 |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: rtspField.baseline |
|
|
|
|
text: qsTr("RTSP URL:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCTextField { |
|
|
|
|
id: rtspField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: QGroundControl.videoManager.rtspURL |
|
|
|
|
onEditingFinished: { |
|
|
|
|
QGroundControl.videoManager.rtspURL = text |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactTextField { |
|
|
|
|
id: announcePercent |
|
|
|
|
fact: _percentRemainingAnnounce |
|
|
|
|
enabled: announcePercentCheckbox.checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
width: parent.width |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Video Source |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
//-- Offline mission editing |
|
|
|
|
Item { |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
height: offlineLabel.height |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: videoSource.baseline |
|
|
|
|
text: qsTr("Video Source:") |
|
|
|
|
id: offlineLabel |
|
|
|
|
text: qsTr("Offline Mission Editing") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: videoSource |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: QGroundControl.videoManager.videoSourceList |
|
|
|
|
Component.onCompleted: { |
|
|
|
|
var index = videoSource.find(QGroundControl.videoManager.videoSource) |
|
|
|
|
if (index >= 0) { |
|
|
|
|
videoSource.currentIndex = index |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
height: offlineCol.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Column { |
|
|
|
|
id: offlineCol |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Firmware:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: offlineTypeCombo.baseline |
|
|
|
|
} |
|
|
|
|
FactComboBox { |
|
|
|
|
id: offlineTypeCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.offlineEditingFirmwareType |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onActivated: { |
|
|
|
|
if (index != -1) { |
|
|
|
|
currentIndex = index |
|
|
|
|
QGroundControl.videoManager.videoSource = model[index] |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Vehicle:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: offlineVehicleCombo.baseline |
|
|
|
|
} |
|
|
|
|
FactComboBox { |
|
|
|
|
id: offlineVehicleCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.offlineEditingVehicleType |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Map Providers |
|
|
|
|
Row { |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
TODO: Map settings should come from QGroundControl.mapEngineManager. What is currently in |
|
|
|
|
QGroundControl.flightMapSettings should be moved there so all map related funtions are in |
|
|
|
|
one place. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: QGroundControl.flightMapSettings.googleMapEnabled |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: mapProvidersLabel |
|
|
|
|
anchors.baseline: mapProviders.baseline |
|
|
|
|
text: qsTr("Map Provider:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCComboBox { |
|
|
|
|
id: mapProviders |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: QGroundControl.flightMapSettings.mapProviders |
|
|
|
|
Component.onCompleted: { |
|
|
|
|
var index = mapProviders.find(QGroundControl.flightMapSettings.mapProvider) |
|
|
|
|
if (index < 0) { |
|
|
|
|
console.warn(qsTr("Active map provider not in combobox"), QGroundControl.flightMapSettings.mapProvider) |
|
|
|
|
} else { |
|
|
|
|
mapProviders.currentIndex = index |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: offlineVehicleCombo.currentText != "Multicopter" |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Cruise speed:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: cruiseSpeedField.baseline |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
id: cruiseSpeedField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.offlineEditingCruiseSpeed |
|
|
|
|
enabled: true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onActivated: { |
|
|
|
|
if (index != -1) { |
|
|
|
|
currentIndex = index |
|
|
|
|
console.log(qsTr("New map provider: ") + model[index]) |
|
|
|
|
QGroundControl.flightMapSettings.mapProvider = model[index] |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: offlineVehicleCombo.currentText != "Fixedwing" |
|
|
|
|
QGCLabel { |
|
|
|
|
id: hoverSpeedLabel |
|
|
|
|
text: qsTr("Hover speed:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
anchors.baseline: hoverSpeedField.baseline |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
id: hoverSpeedField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
fact: QGroundControl.offlineEditingHoverSpeed |
|
|
|
|
enabled: true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Palette Styles |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
//-- Miscelanous |
|
|
|
|
Item { |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
height: miscLabel.height |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
QGCLabel { |
|
|
|
|
width: mapProvidersLabel.width |
|
|
|
|
anchors.baseline: paletteCombo.baseline |
|
|
|
|
text: qsTr("Style:") |
|
|
|
|
id: miscLabel |
|
|
|
|
text: qsTr("Miscelaneous") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCComboBox { |
|
|
|
|
id: paletteCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: [ qsTr("Indoor"), qsTr("Outdoor") ] |
|
|
|
|
currentIndex: QGroundControl.isDarkStyle ? 0 : 1 |
|
|
|
|
|
|
|
|
|
onActivated: { |
|
|
|
|
if (index != -1) { |
|
|
|
|
currentIndex = index |
|
|
|
|
QGroundControl.isDarkStyle = index === 0 ? true : false |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
height: miscCol.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Column { |
|
|
|
|
id: miscCol |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Base UI Font Point Size |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
id: baseFontLabel |
|
|
|
|
text: qsTr("Base UI font size:") |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
id: baseFontRow |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
QGCButton { |
|
|
|
|
id: decrementButton |
|
|
|
|
width: height |
|
|
|
|
height: baseFontEdit.height |
|
|
|
|
text: "-" |
|
|
|
|
onClicked: { |
|
|
|
|
if(ScreenTools.defaultFontPointSize > 6) { |
|
|
|
|
QGroundControl.baseFontPointSize = QGroundControl.baseFontPointSize - 1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCTextField { |
|
|
|
|
id: baseFontEdit |
|
|
|
|
width: _editFieldWidth - (decrementButton.width * 2) - (baseFontRow.spacing * 2) |
|
|
|
|
text: QGroundControl.baseFontPointSize |
|
|
|
|
showUnits: true |
|
|
|
|
unitsLabel: "pt" |
|
|
|
|
maximumLength: 6 |
|
|
|
|
validator: DoubleValidator {bottom: 6.0; top: 48.0; decimals: 2;} |
|
|
|
|
onEditingFinished: { |
|
|
|
|
var point = parseFloat(text) |
|
|
|
|
if(point >= 6.0 && point <= 48.0) |
|
|
|
|
QGroundControl.baseFontPointSize = point; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCButton { |
|
|
|
|
width: height |
|
|
|
|
height: baseFontEdit.height |
|
|
|
|
text: "+" |
|
|
|
|
onClicked: { |
|
|
|
|
if(ScreenTools.defaultFontPointSize < 49) { |
|
|
|
|
QGroundControl.baseFontPointSize = QGroundControl.baseFontPointSize + 1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
text: qsTr("(Requires Restart)") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Audio preferences |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Mute all audio output") |
|
|
|
|
checked: QGroundControl.isAudioMuted |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.isAudioMuted = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Prompt Save Log |
|
|
|
|
QGCCheckBox { |
|
|
|
|
id: promptSaveLog |
|
|
|
|
text: qsTr("Prompt to save Flight Data Log after each flight") |
|
|
|
|
checked: QGroundControl.isSaveLogPrompt |
|
|
|
|
visible: !ScreenTools.isMobile |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.isSaveLogPrompt = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Prompt Save even if not armed |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Prompt to save Flight Data Log even if vehicle was not armed") |
|
|
|
|
checked: QGroundControl.isSaveLogPromptNotArmed |
|
|
|
|
visible: !ScreenTools.isMobile |
|
|
|
|
enabled: promptSaveLog.checked |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.isSaveLogPromptNotArmed = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Clear settings |
|
|
|
|
QGCCheckBox { |
|
|
|
|
id: clearCheck |
|
|
|
|
text: qsTr("Clear all settings on next start") |
|
|
|
|
checked: false |
|
|
|
|
onClicked: { |
|
|
|
|
checked ? clearDialog.visible = true : QGroundControl.clearDeleteAllSettingsNextBoot() |
|
|
|
|
} |
|
|
|
|
MessageDialog { |
|
|
|
|
id: clearDialog |
|
|
|
|
visible: false |
|
|
|
|
icon: StandardIcon.Warning |
|
|
|
|
standardButtons: StandardButton.Yes | StandardButton.No |
|
|
|
|
title: qsTr("Clear Settings") |
|
|
|
|
text: qsTr("All saved settings will be reset the next time you start QGroundControl. Is this really what you want?") |
|
|
|
|
onYes: { |
|
|
|
|
QGroundControl.deleteAllSettingsNextBoot() |
|
|
|
|
clearDialog.visible = false |
|
|
|
|
} |
|
|
|
|
onNo: { |
|
|
|
|
clearCheck.checked = false |
|
|
|
|
clearDialog.visible = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Battery talker |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCCheckBox { |
|
|
|
|
id: announcePercentCheckbox |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
text: qsTr("Announce battery lower than:") |
|
|
|
|
checked: _percentRemainingAnnounce.value != 0 |
|
|
|
|
onClicked: { |
|
|
|
|
if (checked) { |
|
|
|
|
_percentRemainingAnnounce.value = _percentRemainingAnnounce.defaultValueString |
|
|
|
|
} else { |
|
|
|
|
_percentRemainingAnnounce.value = 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
FactTextField { |
|
|
|
|
id: announcePercent |
|
|
|
|
fact: _percentRemainingAnnounce |
|
|
|
|
enabled: announcePercentCheckbox.checked |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Virtual joystick settings |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Virtual Joystick") |
|
|
|
|
checked: QGroundControl.virtualTabletJoystick |
|
|
|
|
onClicked: QGroundControl.virtualTabletJoystick = checked |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Map Providers |
|
|
|
|
Row { |
|
|
|
|
/* |
|
|
|
|
TODO: Map settings should come from QGroundControl.mapEngineManager. What is currently in |
|
|
|
|
QGroundControl.flightMapSettings should be moved there so all map related funtions are in |
|
|
|
|
one place. |
|
|
|
|
*/ |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: QGroundControl.flightMapSettings.googleMapEnabled |
|
|
|
|
QGCLabel { |
|
|
|
|
id: mapProvidersLabel |
|
|
|
|
anchors.baseline: mapProviders.baseline |
|
|
|
|
text: qsTr("Map Provider:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: mapProviders |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: QGroundControl.flightMapSettings.mapProviders |
|
|
|
|
Component.onCompleted: { |
|
|
|
|
var index = mapProviders.find(QGroundControl.flightMapSettings.mapProvider) |
|
|
|
|
if (index < 0) { |
|
|
|
|
console.warn(qsTr("Active map provider not in combobox"), QGroundControl.flightMapSettings.mapProvider) |
|
|
|
|
} else { |
|
|
|
|
mapProviders.currentIndex = index |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onActivated: { |
|
|
|
|
if (index != -1) { |
|
|
|
|
currentIndex = index |
|
|
|
|
console.log(qsTr("New map provider: ") + model[index]) |
|
|
|
|
QGroundControl.flightMapSettings.mapProvider = model[index] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Palette Styles |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: paletteCombo.baseline |
|
|
|
|
text: qsTr("Style:") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: paletteCombo |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: [ qsTr("Indoor"), qsTr("Outdoor") ] |
|
|
|
|
currentIndex: QGroundControl.isDarkStyle ? 0 : 1 |
|
|
|
|
onActivated: { |
|
|
|
|
if (index != -1) { |
|
|
|
|
currentIndex = index |
|
|
|
|
QGroundControl.isDarkStyle = index === 0 ? true : false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
width: parent.width |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Autoconnect settings |
|
|
|
|
QGCLabel { text: "Autoconnect to the following devices:" } |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Pixhawk") |
|
|
|
|
visible: !ScreenTools.isiOS |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectPixhawk |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectPixhawk = checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("SiK Radio") |
|
|
|
|
visible: !ScreenTools.isiOS |
|
|
|
|
checked: QGroundControl.linkManager.autoconnect3DRRadio |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnect3DRRadio = checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("PX4 Flow") |
|
|
|
|
visible: !ScreenTools.isiOS |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectPX4Flow |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectPX4Flow = checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("UDP") |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectUDP |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectUDP = checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("RTK GPS") |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectRTKGPS |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectRTKGPS = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
width: parent.width |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Virtual joystick settings |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Virtual Joystick") |
|
|
|
|
checked: QGroundControl.virtualTabletJoystick |
|
|
|
|
onClicked: QGroundControl.virtualTabletJoystick = checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
width: parent.width |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Offline mission editing settings |
|
|
|
|
|
|
|
|
|
QGCLabel { text: "Offline mission editing" } |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Firmware:") |
|
|
|
|
width: hoverSpeedLabel.width |
|
|
|
|
anchors.baseline: offlineTypeCombo.baseline |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: offlineTypeCombo |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
|
fact: QGroundControl.offlineEditingFirmwareType |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
height: autoConnectLabel.height |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Vehicle:") |
|
|
|
|
width: hoverSpeedLabel.width |
|
|
|
|
anchors.baseline: offlineVehicleCombo.baseline |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: offlineVehicleCombo |
|
|
|
|
width: offlineTypeCombo.width |
|
|
|
|
fact: QGroundControl.offlineEditingVehicleType |
|
|
|
|
indexModel: false |
|
|
|
|
id: autoConnectLabel |
|
|
|
|
text: qsTr("Autoconnect to the following devices:") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: offlineVehicleCombo.currentText != "Multicopter" |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Cruise speed:") |
|
|
|
|
width: hoverSpeedLabel.width |
|
|
|
|
anchors.baseline: cruiseSpeedField.baseline |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FactTextField { |
|
|
|
|
id: cruiseSpeedField |
|
|
|
|
width: offlineTypeCombo.width |
|
|
|
|
fact: QGroundControl.offlineEditingCruiseSpeed |
|
|
|
|
enabled: true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: offlineVehicleCombo.currentText != "Fixedwing" |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: hoverSpeedLabel |
|
|
|
|
text: qsTr("Hover speed:") |
|
|
|
|
width: baseFontLabel.width |
|
|
|
|
anchors.baseline: hoverSpeedField.baseline |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FactTextField { |
|
|
|
|
id: hoverSpeedField |
|
|
|
|
width: offlineTypeCombo.width |
|
|
|
|
fact: QGroundControl.offlineEditingHoverSpeed |
|
|
|
|
enabled: true |
|
|
|
|
Rectangle { |
|
|
|
|
height: autoConnectCol.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
|
width: qgcView.width * 0.8 |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Column { |
|
|
|
|
id: autoConnectCol |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
//----------------------------------------------------------------- |
|
|
|
|
//-- Autoconnect settings |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("Pixhawk") |
|
|
|
|
visible: !ScreenTools.isiOS |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectPixhawk |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectPixhawk = checked |
|
|
|
|
} |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("SiK Radio") |
|
|
|
|
visible: !ScreenTools.isiOS |
|
|
|
|
checked: QGroundControl.linkManager.autoconnect3DRRadio |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnect3DRRadio = checked |
|
|
|
|
} |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("PX4 Flow") |
|
|
|
|
visible: !ScreenTools.isiOS |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectPX4Flow |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectPX4Flow = checked |
|
|
|
|
} |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("UDP") |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectUDP |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectUDP = checked |
|
|
|
|
} |
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: qsTr("RTK GPS") |
|
|
|
|
checked: QGroundControl.linkManager.autoconnectRTKGPS |
|
|
|
|
onClicked: QGroundControl.linkManager.autoconnectRTKGPS = checked |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
width: parent.width |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} // settingsColumn |
|
|
|
|
} // QGCFlickable |
|
|
|
|
} // QGCViewPanel |
|
|
|
|
} // QGCView |
|
|
|
|