Commit 182b76af authored by Gus Grubba's avatar Gus Grubba

Convert QGCRadioButton to QtQuick.Controls 2.4 (eliminate ExclusiveGroup)

parent 584cf293
...@@ -35,10 +35,6 @@ SetupPage { ...@@ -35,10 +35,6 @@ SetupPage {
id: controller id: controller
} }
ExclusiveGroup {
id: airframeTypeExclusive
}
Component { Component {
id: oldFramePageComponent id: oldFramePageComponent
...@@ -62,12 +58,9 @@ SetupPage { ...@@ -62,12 +58,9 @@ SetupPage {
Repeater { Repeater {
model: controller.airframeTypesModel model: controller.airframeTypesModel
QGCRadioButton { QGCRadioButton {
text: object.name text: object.name
checked: controller.currentAirframeType == object checked: controller.currentAirframeType == object
exclusiveGroup: airframeTypeExclusive
onCheckedChanged: { onCheckedChanged: {
if (checked) { if (checked) {
controller.currentAirframeType = object controller.currentAirframeType = object
......
...@@ -62,10 +62,6 @@ SetupPage { ...@@ -62,10 +62,6 @@ SetupPage {
property string _restartRequired: qsTr("Requires vehicle reboot") property string _restartRequired: qsTr("Requires vehicle reboot")
ExclusiveGroup { id: fenceActionRadioGroup }
ExclusiveGroup { id: landLoiterRadioGroup }
ExclusiveGroup { id: returnAltRadioGroup }
Component { Component {
id: batteryFailsafeComponent id: batteryFailsafeComponent
...@@ -478,7 +474,6 @@ SetupPage { ...@@ -478,7 +474,6 @@ SetupPage {
anchors.left: parent.left anchors.left: parent.left
anchors.top: altitudeGeo.bottom anchors.top: altitudeGeo.bottom
text: qsTr("Report only") text: qsTr("Report only")
exclusiveGroup: fenceActionRadioGroup
checked: _fenceAction.value == 0 checked: _fenceAction.value == 0
onClicked: _fenceAction.value = 0 onClicked: _fenceAction.value = 0
...@@ -490,7 +485,6 @@ SetupPage { ...@@ -490,7 +485,6 @@ SetupPage {
anchors.left: circleGeo.left anchors.left: circleGeo.left
anchors.top: geoReportRadio.bottom anchors.top: geoReportRadio.bottom
text: qsTr("RTL or Land") text: qsTr("RTL or Land")
exclusiveGroup: fenceActionRadioGroup
checked: _fenceAction.value == 1 checked: _fenceAction.value == 1
onClicked: _fenceAction.value = 1 onClicked: _fenceAction.value = 1
...@@ -587,7 +581,6 @@ SetupPage { ...@@ -587,7 +581,6 @@ SetupPage {
anchors.top: parent.top anchors.top: parent.top
text: qsTr("Return at current altitude") text: qsTr("Return at current altitude")
checked: _rtlAltFact.value == 0 checked: _rtlAltFact.value == 0
exclusiveGroup: returnAltRadioGroup
onClicked: _rtlAltFact.value = 0 onClicked: _rtlAltFact.value = 0
} }
...@@ -598,7 +591,6 @@ SetupPage { ...@@ -598,7 +591,6 @@ SetupPage {
anchors.left: returnAtCurrentRadio.left anchors.left: returnAtCurrentRadio.left
anchors.top: returnAtCurrentRadio.bottom anchors.top: returnAtCurrentRadio.bottom
text: qsTr("Return at specified altitude:") text: qsTr("Return at specified altitude:")
exclusiveGroup: returnAltRadioGroup
checked: _rtlAltFact.value != 0 checked: _rtlAltFact.value != 0
onClicked: _rtlAltFact.value = 1500 onClicked: _rtlAltFact.value = 1500
...@@ -640,7 +632,6 @@ SetupPage { ...@@ -640,7 +632,6 @@ SetupPage {
anchors.baseline: landSpeedField.baseline anchors.baseline: landSpeedField.baseline
text: qsTr("Land with descent speed:") text: qsTr("Land with descent speed:")
checked: _rtlAltFinalFact.value == 0 checked: _rtlAltFinalFact.value == 0
exclusiveGroup: landLoiterRadioGroup
onClicked: _rtlAltFinalFact.value = 0 onClicked: _rtlAltFinalFact.value = 0
} }
...@@ -660,7 +651,6 @@ SetupPage { ...@@ -660,7 +651,6 @@ SetupPage {
anchors.left: returnAtCurrentRadio.left anchors.left: returnAtCurrentRadio.left
anchors.baseline: rltAltFinalField.baseline anchors.baseline: rltAltFinalField.baseline
text: qsTr("Final loiter altitude:") text: qsTr("Final loiter altitude:")
exclusiveGroup: landLoiterRadioGroup
onClicked: _rtlAltFinalFact.value = _rtlAltFact.value onClicked: _rtlAltFinalFact.value = _rtlAltFact.value
} }
...@@ -707,7 +697,6 @@ SetupPage { ...@@ -707,7 +697,6 @@ SetupPage {
anchors.top: parent.top anchors.top: parent.top
text: qsTr("Return at current altitude") text: qsTr("Return at current altitude")
checked: _rtlAltFact.value < 0 checked: _rtlAltFact.value < 0
exclusiveGroup: returnAltRadioGroup
onClicked: _rtlAltFact.value = -1 onClicked: _rtlAltFact.value = -1
} }
...@@ -718,7 +707,6 @@ SetupPage { ...@@ -718,7 +707,6 @@ SetupPage {
anchors.left: returnAtCurrentRadio.left anchors.left: returnAtCurrentRadio.left
anchors.top: returnAtCurrentRadio.bottom anchors.top: returnAtCurrentRadio.bottom
text: qsTr("Return at specified altitude:") text: qsTr("Return at specified altitude:")
exclusiveGroup: returnAltRadioGroup
checked: _rtlAltFact.value >= 0 checked: _rtlAltFact.value >= 0
onClicked: _rtlAltFact.value = 10000 onClicked: _rtlAltFact.value = 10000
......
...@@ -108,27 +108,19 @@ SetupPage { ...@@ -108,27 +108,19 @@ SetupPage {
text: qsTr("Click Ok to place your Spektrum receiver in the bind mode. Select the specific receiver type below:") text: qsTr("Click Ok to place your Spektrum receiver in the bind mode. Select the specific receiver type below:")
} }
ExclusiveGroup { id: radioGroup }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: radioGroup
text: qsTr("DSM2 Mode") text: qsTr("DSM2 Mode")
property int bindMode: RadioComponentController.DSM2 property int bindMode: RadioComponentController.DSM2
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: radioGroup
text: qsTr("DSMX (7 channels or less)") text: qsTr("DSMX (7 channels or less)")
property int bindMode: RadioComponentController.DSMX7 property int bindMode: RadioComponentController.DSMX7
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: radioGroup
checked: true checked: true
text: qsTr("DSMX (8 channels or more)") text: qsTr("DSMX (8 channels or more)")
property int bindMode: RadioComponentController.DSMX8 property int bindMode: RadioComponentController.DSMX8
} }
} }
...@@ -440,21 +432,15 @@ SetupPage { ...@@ -440,21 +432,15 @@ SetupPage {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
ExclusiveGroup { id: modeGroup }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: modeGroup
text: qsTr("Mode 1") text: qsTr("Mode 1")
checked: controller.transmitterMode == 1 checked: controller.transmitterMode == 1
onClicked: controller.transmitterMode = 1 onClicked: controller.transmitterMode = 1
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: modeGroup
text: qsTr("Mode 2") text: qsTr("Mode 2")
checked: controller.transmitterMode == 2 checked: controller.transmitterMode == 2
onClicked: controller.transmitterMode = 2 onClicked: controller.transmitterMode = 2
} }
} }
......
...@@ -261,10 +261,8 @@ SetupPage { ...@@ -261,10 +261,8 @@ SetupPage {
Item { height: 1; width: _margins; } Item { height: 1; width: _margins; }
Column { Column {
spacing: _margins * 0.5 spacing: _margins * 0.5
ExclusiveGroup { id: polarityGroup }
QGCRadioButton { QGCRadioButton {
checked: _camTriggerPol && _camTriggerPol.value === 0 checked: _camTriggerPol && _camTriggerPol.value === 0
exclusiveGroup: polarityGroup
text: "Low (0V)" text: "Low (0V)"
onClicked: { onClicked: {
if(_camTriggerPol) { if(_camTriggerPol) {
...@@ -274,7 +272,6 @@ SetupPage { ...@@ -274,7 +272,6 @@ SetupPage {
} }
QGCRadioButton { QGCRadioButton {
checked: _camTriggerPol && _camTriggerPol.value > 0 checked: _camTriggerPol && _camTriggerPol.value > 0
exclusiveGroup: polarityGroup
text: "High (3.3V)" text: "High (3.3V)"
onClicked: { onClicked: {
if(_camTriggerPol) { if(_camTriggerPol) {
......
...@@ -54,8 +54,6 @@ SetupPage { ...@@ -54,8 +54,6 @@ SetupPage {
property bool _hitlAvailable: controller.parameterExists(-1, hitlParam) property bool _hitlAvailable: controller.parameterExists(-1, hitlParam)
property Fact _hitlEnabled: controller.getParameterFact(-1, hitlParam, false) property Fact _hitlEnabled: controller.getParameterFact(-1, hitlParam, false)
ExclusiveGroup { id: homeLoiterGroup }
Rectangle { Rectangle {
x: lowBattGrid.x + outerGrid.x - _margins x: lowBattGrid.x + outerGrid.x - _margins
y: lowBattGrid.y + outerGrid.y - _margins y: lowBattGrid.y + outerGrid.y - _margins
...@@ -391,7 +389,6 @@ SetupPage { ...@@ -391,7 +389,6 @@ SetupPage {
QGCRadioButton { QGCRadioButton {
id: homeLandRadio id: homeLandRadio
checked: _rtlLandDelay ? _rtlLandDelay.value === 0 : false checked: _rtlLandDelay ? _rtlLandDelay.value === 0 : false
exclusiveGroup: homeLoiterGroup
text: qsTr("Land immediately") text: qsTr("Land immediately")
onClicked: _rtlLandDelay.value = 0 onClicked: _rtlLandDelay.value = 0
} }
...@@ -402,7 +399,6 @@ SetupPage { ...@@ -402,7 +399,6 @@ SetupPage {
QGCRadioButton { QGCRadioButton {
id: homeLoiterNoLandRadio id: homeLoiterNoLandRadio
checked: _rtlLandDelay ? _rtlLandDelay.value < 0 : false checked: _rtlLandDelay ? _rtlLandDelay.value < 0 : false
exclusiveGroup: homeLoiterGroup
text: qsTr("Loiter and do not land") text: qsTr("Loiter and do not land")
onClicked: _rtlLandDelay.value = -1 onClicked: _rtlLandDelay.value = -1
} }
...@@ -413,7 +409,6 @@ SetupPage { ...@@ -413,7 +409,6 @@ SetupPage {
QGCRadioButton { QGCRadioButton {
id: homeLoiterLandRadio id: homeLoiterLandRadio
checked: _rtlLandDelay ? _rtlLandDelay.value > 0 : false checked: _rtlLandDelay ? _rtlLandDelay.value > 0 : false
exclusiveGroup: homeLoiterGroup
text: qsTr("Loiter and land after specified time") text: qsTr("Loiter and land after specified time")
onClicked: _rtlLandDelay.value = 60 onClicked: _rtlLandDelay.value = 60
} }
......
...@@ -496,18 +496,14 @@ Item { ...@@ -496,18 +496,14 @@ Item {
z: _mapAndVideo.z + 4 z: _mapAndVideo.z + 4
visible: QGroundControl.multiVehicleManager.vehicles.count > 1 && QGroundControl.corePlugin.options.enableMultiVehicleList visible: QGroundControl.multiVehicleManager.vehicles.count > 1 && QGroundControl.corePlugin.options.enableMultiVehicleList
ExclusiveGroup { id: multiVehicleSelectorGroup }
QGCRadioButton { QGCRadioButton {
id: singleVehicleView id: singleVehicleView
exclusiveGroup: multiVehicleSelectorGroup
text: qsTr("Single") text: qsTr("Single")
checked: true checked: true
textColor: mapPal.text textColor: mapPal.text
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: multiVehicleSelectorGroup
text: qsTr("Multi-Vehicle") text: qsTr("Multi-Vehicle")
textColor: mapPal.text textColor: mapPal.text
} }
......
...@@ -344,9 +344,6 @@ Item { ...@@ -344,9 +344,6 @@ Item {
insertComplexMissionItemFromKMLOrSHP(complexItemName, polygonSelectPatternFile, -1) insertComplexMissionItemFromKMLOrSHP(complexItemName, polygonSelectPatternFile, -1)
hideDialog() hideDialog()
} }
ExclusiveGroup {
id: radioGroup
}
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
...@@ -361,11 +358,9 @@ Item { ...@@ -361,11 +358,9 @@ Item {
id: surveyRadio id: surveyRadio
text: qsTr("Survey") text: qsTr("Survey")
checked: true checked: true
exclusiveGroup: radioGroup
} }
QGCRadioButton { QGCRadioButton {
text: qsTr("Structure Scan") text: qsTr("Structure Scan")
exclusiveGroup: radioGroup
} }
} }
} }
...@@ -732,43 +727,27 @@ Item { ...@@ -732,43 +727,27 @@ Item {
visible: !QGroundControl.corePlugin.options.enablePlanViewSelector visible: !QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
ExclusiveGroup {
id: planElementSelectorGroup
onCurrentChanged: {
switch (current) {
case planElementMission:
_editingLayer = _layerMission
break
case planElementGeoFence:
_editingLayer = _layerGeoFence
break
case planElementRallyPoints:
_editingLayer = _layerRallyPoints
break
}
}
}
QGCRadioButton { QGCRadioButton {
id: planElementMission id: planElementMission
exclusiveGroup: planElementSelectorGroup
text: qsTr("Mission") text: qsTr("Mission")
checked: true checked: true
visible: QGroundControl.corePlugin.options.enablePlanViewSelector visible: QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
onClicked: _editingLayer = _layerMission
} }
QGCRadioButton { QGCRadioButton {
id: planElementGeoFence id: planElementGeoFence
exclusiveGroup: planElementSelectorGroup
text: qsTr("Fence") text: qsTr("Fence")
visible: QGroundControl.corePlugin.options.enablePlanViewSelector visible: QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
onClicked: _editingLayer = _layerGeoFence
} }
QGCRadioButton { QGCRadioButton {
id: planElementRallyPoints id: planElementRallyPoints
exclusiveGroup: planElementSelectorGroup
text: qsTr("Rally") text: qsTr("Rally")
visible: QGroundControl.corePlugin.options.enablePlanViewSelector visible: QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
onClicked: _editingLayer = _layerRallyPoints
} }
} }
} }
......
...@@ -150,10 +150,6 @@ RowLayout { ...@@ -150,10 +150,6 @@ RowLayout {
resetGraphs() resetGraphs()
} }
ExclusiveGroup {
id: tuneTypeRadios
}
ValueAxis { ValueAxis {
id: valueXAxis id: valueXAxis
min: 0 min: 0
...@@ -246,8 +242,6 @@ RowLayout { ...@@ -246,8 +242,6 @@ RowLayout {
QGCRadioButton { QGCRadioButton {
text: modelData text: modelData
checked: _currentTuneType === modelData checked: _currentTuneType === modelData
exclusiveGroup: tuneTypeRadios
onClicked: _currentTuneType = modelData onClicked: _currentTuneType = modelData
} }
} }
......
import QtQuick 2.3 import QtQuick 2.11
import QtQuick.Controls 1.2 import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
RadioButton { RadioButton {
id: control
property color textColor: _qgcPal.text property color textColor: _qgcPal.text
property bool textBold: false property bool textBold: false
property real textFontPointSize: ScreenTools.defaultFontPointSize property real textFontPointSize: ScreenTools.defaultFontPointSize
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled } property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _noText: text === "" property bool _noText: text === ""
activeFocusOnPress: true
style: RadioButtonStyle {
spacing: _noText ? 0 : ScreenTools.defaultFontPixelWidth * 0.25
label: Item {
implicitWidth: _noText ? 0 : text.implicitWidth + ScreenTools.defaultFontPixelWidth * 0.25
implicitHeight: _noText ? 0 : Math.max(text.implicitHeight, ScreenTools.radioButtonIndicatorSize)
baselineOffset: text.y + text.baselineOffset
Text {
id: text
text: control.text
font.pointSize: textFontPointSize
font.bold: control.textBold
color: control.textColor
anchors.centerIn: parent
}
}
indicator: Rectangle { indicator: Rectangle {
width: ScreenTools.radioButtonIndicatorSize implicitWidth: ScreenTools.radioButtonIndicatorSize
height: width implicitHeight: width
color: "white" color: "white"
border.color: "black" border.color: "black"
radius: height / 2 radius: height / 2
opacity: control.enabled ? 1 : 0.5 opacity: control.enabled ? 1 : 0.5
x: control.leftPadding
y: parent.height / 2 - height / 2
Rectangle { Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
width: Math.round(parent.width * 0.5) width: Math.round(parent.width * 0.5)
height: width height: width
antialiasing: true antialiasing: true
radius: height / 2 radius: height * 0.5
color: "black" color: "black"
visible: control.checked visible: control.checked
} }
} }
contentItem: Text {
text: control.text
font.pointSize: textFontPointSize
font.bold: control.textBold
color: control.textColor
opacity: enabled ? 1.0 : 0.3
verticalAlignment: Text.AlignVCenter
leftPadding: control.indicator.width + (_noText ? 0 : ScreenTools.defaultFontPixelWidth * 0.25)
} }
} }
...@@ -1195,9 +1195,6 @@ Item { ...@@ -1195,9 +1195,6 @@ Item {
height: width height: width
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
ButtonGroup {
buttons: mapSetButtons.children
}
Column { Column {
id: mapSetButtons id: mapSetButtons
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
......
...@@ -194,10 +194,6 @@ SetupPage { ...@@ -194,10 +194,6 @@ SetupPage {
onCancelDialog: reject() onCancelDialog: reject()
} }
ExclusiveGroup {
id: firmwareGroup
}
ListModel { ListModel {
id: firmwareTypeList id: firmwareTypeList
...@@ -288,7 +284,6 @@ SetupPage { ...@@ -288,7 +284,6 @@ SetupPage {
QGCRadioButton { QGCRadioButton {
id: px4FlightStackRadio1 id: px4FlightStackRadio1
exclusiveGroup: _defaultFirmwareIsPX4 ? firmwareGroup : null
text: qsTr("PX4 Flight Stack ") text: qsTr("PX4 Flight Stack ")
textBold: _defaultFirmwareIsPX4 textBold: _defaultFirmwareIsPX4
checked: _defaultFirmwareIsPX4 checked: _defaultFirmwareIsPX4
...@@ -302,7 +297,6 @@ SetupPage { ...@@ -302,7 +297,6 @@ SetupPage {
QGCRadioButton { QGCRadioButton {
id: apmFlightStack id: apmFlightStack
exclusiveGroup: firmwareGroup
text: qsTr("ArduPilot Flight Stack") text: qsTr("ArduPilot Flight Stack")
textBold: !_defaultFirmwareIsPX4 textBold: !_defaultFirmwareIsPX4
checked: !_defaultFirmwareIsPX4 checked: !_defaultFirmwareIsPX4
...@@ -316,7 +310,6 @@ SetupPage { ...@@ -316,7 +310,6 @@ SetupPage {
QGCRadioButton { QGCRadioButton {
id: px4FlightStackRadio2 id: px4FlightStackRadio2
exclusiveGroup: _defaultFirmwareIsPX4 ? null : firmwareGroup
text: qsTr("PX4 Flight Stack ") text: qsTr("PX4 Flight Stack ")
visible: !_defaultFirmwareIsPX4 && !_singleFirmwareMode && !px4Flow visible: !_defaultFirmwareIsPX4 && !_singleFirmwareMode && !px4Flow
......
...@@ -410,10 +410,7 @@ SetupPage { ...@@ -410,10 +410,7 @@ SetupPage {
spacing: ScreenTools.defaultFontPixelHeight / 3 spacing: ScreenTools.defaultFontPixelHeight / 3
visible: activeVehicle.supportsThrottleModeCenterZero visible: activeVehicle.supportsThrottleModeCenterZero
ExclusiveGroup { id: throttleModeExclusiveGroup }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: throttleModeExclusiveGroup
text: qsTr("Center stick is zero throttle") text: qsTr("Center stick is zero throttle")
checked: _activeJoystick ? _activeJoystick.throttleMode == 0 : false checked: _activeJoystick ? _activeJoystick.throttleMode == 0 : false
...@@ -436,7 +433,6 @@ SetupPage { ...@@ -436,7 +433,6 @@ SetupPage {
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: throttleModeExclusiveGroup
text: qsTr("Full down stick is zero throttle") text: qsTr("Full down stick is zero throttle")
checked: _activeJoystick ? _activeJoystick.throttleMode == 1 : false checked: _activeJoystick ? _activeJoystick.throttleMode == 1 : false
...@@ -726,14 +722,11 @@ SetupPage { ...@@ -726,14 +722,11 @@ SetupPage {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
ExclusiveGroup { id: modeGroup }
QGCLabel { QGCLabel {
text: "TX Mode:" text: "TX Mode:"
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: modeGroup
text: "1" text: "1"
checked: controller.transmitterMode == 1 checked: controller.transmitterMode == 1
enabled: !controller.calibrating enabled: !controller.calibrating
...@@ -742,7 +735,6 @@ SetupPage { ...@@ -742,7 +735,6 @@ SetupPage {
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: modeGroup
text: "2" text: "2"
checked: controller.transmitterMode == 2 checked: controller.transmitterMode == 2
enabled: !controller.calibrating enabled: !controller.calibrating
...@@ -751,7 +743,6 @@ SetupPage { ...@@ -751,7 +743,6 @@ SetupPage {
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: modeGroup
text: "3" text: "3"
checked: controller.transmitterMode == 3 checked: controller.transmitterMode == 3
enabled: !controller.calibrating enabled: !controller.calibrating
...@@ -760,7 +751,6 @@ SetupPage { ...@@ -760,7 +751,6 @@ SetupPage {
} }
QGCRadioButton { QGCRadioButton {
exclusiveGroup: modeGroup
text: "4" text: "4"
checked: controller.transmitterMode == 4 checked: controller.transmitterMode == 4
enabled: !controller.calibrating enabled: !controller.calibrating
......
...@@ -639,16 +639,11 @@ Rectangle { ...@@ -639,16 +639,11 @@ Rectangle {
property bool useFixedPosition: rtkSettings.useFixedBasePosition.rawValue property bool useFixedPosition: rtkSettings.useFixedBasePosition.rawValue
property real firstColWidth: ScreenTools.defaultFontPixelWidth * 3 property real firstColWidth: ScreenTools.defaultFontPixelWidth * 3
ExclusiveGroup {
id: useFixedBasePositionRadioGroup
}
QGCRadioButton { QGCRadioButton {
text: qsTr("Perform Survey-In") text: qsTr("Perform Survey-In")
visible: rtkGrid.rtkSettings.useFixedBasePosition.visible visible: rtkGrid.rtkSettings.useFixedBasePosition.visible
checked: rtkGrid.rtkSettings.useFixedBasePosition.value == false checked: rtkGrid.rtkSettings.useFixedBasePosition.value == false
onClicked: rtkGrid.rtkSettings.useFixedBasePosition.value = false onClicked: rtkGrid.rtkSettings.useFixedBasePosition.value = false
exclusiveGroup: useFixedBasePositionRadioGroup
Layout.columnSpan: 3 Layout.columnSpan: 3
} }
...@@ -683,7 +678,6 @@ Rectangle { ...@@ -683,7 +678,6 @@ Rectangle {
visible: rtkGrid.rtkSettings.useFixedBasePosition.visible visible: rtkGrid.rtkSettings.useFixedBasePosition.visible
checked: rtkGrid.rtkSettings.useFixedBasePosition.value == true checked: rtkGrid.rtkSettings.useFixedBasePosition.value == true
onClicked: rtkGrid.rtkSettings.useFixedBasePosition.value = true onClicked: rtkGrid.rtkSettings.useFixedBasePosition.value = true
exclusiveGroup: useFixedBasePositionRadioGroup
Layout.columnSpan: 3 Layout.columnSpan: 3
} }
......
...@@ -58,24 +58,20 @@ Column { ...@@ -58,24 +58,20 @@ Column {
width: parent.width width: parent.width
} }
ColumnLayout { ColumnLayout {
ExclusiveGroup { id: autoPilotGroup }
QGCRadioButton { QGCRadioButton {
id: px4Firmware id: px4Firmware
text: qsTr("PX4 Firmware") text: qsTr("PX4 Firmware")
checked: false checked: false
exclusiveGroup: autoPilotGroup
} }
QGCRadioButton { QGCRadioButton {
id: apmFirmware id: apmFirmware
text: qsTr("APM Firmware") text: qsTr("APM Firmware")
checked: false checked: false
exclusiveGroup: autoPilotGroup
} }
QGCRadioButton { QGCRadioButton {
id: genericFirmware id: genericFirmware
text: qsTr("Generic Firmware") text: qsTr("Generic Firmware")
checked: false checked: false
exclusiveGroup: autoPilotGroup
} }
} }
Item { Item {
...@@ -88,18 +84,15 @@ Column { ...@@ -88,18 +84,15 @@ Column {
} }
ColumnLayout { ColumnLayout {
visible: apmFirmware.checked visible: apmFirmware.checked
ExclusiveGroup { id: apmVehicleGroup }
QGCRadioButton { QGCRadioButton {
id: copterVehicle id: copterVehicle
text: qsTr("ArduCopter") text: qsTr("ArduCopter")
checked: false checked: false
exclusiveGroup: apmVehicleGroup
} }
QGCRadioButton { QGCRadioButton {
id: planeVehicle id: planeVehicle
text: qsTr("ArduPlane") text: qsTr("ArduPlane")
checked: false checked: false
exclusiveGroup: apmVehicleGroup
} }
} }
} }
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