|
|
|
@ -36,8 +36,8 @@ import QGroundControl.ScreenTools 1.0
@@ -36,8 +36,8 @@ import QGroundControl.ScreenTools 1.0
|
|
|
|
|
import QGroundControl.MultiVehicleManager 1.0 |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
color: qgcPal.window |
|
|
|
|
z: QGroundControl.zOrderTopMost |
|
|
|
|
color: qgcPal.window |
|
|
|
|
z: QGroundControl.zOrderTopMost |
|
|
|
|
|
|
|
|
|
QGCPalette { id: qgcPal; colorGroupEnabled: true } |
|
|
|
|
|
|
|
|
@ -145,7 +145,7 @@ Rectangle {
@@ -145,7 +145,7 @@ Rectangle {
|
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
font.pixelSize: ScreenTools.mediumFontPixelSize |
|
|
|
|
text: "QGroundControl does not currently support setup of your vehicle type. " + |
|
|
|
|
"If your vehicle is already configured you can still Fly." |
|
|
|
|
"If your vehicle is already configured you can still Fly." |
|
|
|
|
|
|
|
|
|
onLinkActivated: Qt.openUrlExternally(link) |
|
|
|
|
} |
|
|
|
@ -166,7 +166,7 @@ Rectangle {
@@ -166,7 +166,7 @@ Rectangle {
|
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
font.pixelSize: ScreenTools.largeFontPixelSize |
|
|
|
|
text: "Connect vehicle to your device and QGroundControl will automatically detect it." + |
|
|
|
|
(ScreenTools.isMobile ? "" : " Click Firmware on the left to upgrade your vehicle.") |
|
|
|
|
(ScreenTools.isMobile ? "" : " Click Firmware on the left to upgrade your vehicle.") |
|
|
|
|
|
|
|
|
|
onLinkActivated: Qt.openUrlExternally(link) |
|
|
|
|
} |
|
|
|
@ -209,129 +209,119 @@ Rectangle {
@@ -209,129 +209,119 @@ Rectangle {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
//-- Limit height to available height (below tool bar) |
|
|
|
|
anchors.topMargin: _margin |
|
|
|
|
height: mainWindow.availableHeight |
|
|
|
|
QGCFlickable { |
|
|
|
|
id: buttonScroll |
|
|
|
|
width: buttonColumn.width |
|
|
|
|
anchors.topMargin: _defaultTextHeight / 2 |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
color: qgcPal.window |
|
|
|
|
contentHeight: buttonColumn.height |
|
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
|
|
|
|
|
|
QGCFlickable { |
|
|
|
|
id: buttonScroll |
|
|
|
|
width: buttonColumn.width |
|
|
|
|
anchors.topMargin: _defaultTextHeight / 2 |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
contentHeight: buttonColumn.height |
|
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
|
Column { |
|
|
|
|
id: buttonColumn |
|
|
|
|
width: _maxButtonWidth |
|
|
|
|
spacing: _defaultTextHeight / 2 |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: buttonColumn |
|
|
|
|
width: _maxButtonWidth |
|
|
|
|
spacing: _defaultTextHeight / 2 |
|
|
|
|
property real _maxButtonWidth: 0 |
|
|
|
|
|
|
|
|
|
property real _maxButtonWidth: 0 |
|
|
|
|
Component.onCompleted: reflowWidths() |
|
|
|
|
|
|
|
|
|
Component.onCompleted: reflowWidths() |
|
|
|
|
Connections { |
|
|
|
|
target: componentRepeater |
|
|
|
|
|
|
|
|
|
Connections { |
|
|
|
|
target: componentRepeater |
|
|
|
|
|
|
|
|
|
onModelChanged: buttonColumn.reflowWidths() |
|
|
|
|
} |
|
|
|
|
onModelChanged: buttonColumn.reflowWidths() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function reflowWidths() { |
|
|
|
|
for (var i=0; i<children.length; i++) { |
|
|
|
|
_maxButtonWidth = Math.max(_maxButtonWidth, children[i].width) |
|
|
|
|
} |
|
|
|
|
for (var i=0; i<children.length; i++) { |
|
|
|
|
children[i].width = _maxButtonWidth |
|
|
|
|
} |
|
|
|
|
function reflowWidths() { |
|
|
|
|
for (var i=0; i<children.length; i++) { |
|
|
|
|
_maxButtonWidth = Math.max(_maxButtonWidth, children[i].width) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
id: summaryButton |
|
|
|
|
imageResource: "/qmlimages/VehicleSummaryIcon.png" |
|
|
|
|
setupIndicator: false |
|
|
|
|
checked: true |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
text: "Summary" |
|
|
|
|
|
|
|
|
|
onClicked: showSummaryPanel() |
|
|
|
|
for (var i=0; i<children.length; i++) { |
|
|
|
|
children[i].width = _maxButtonWidth |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
id: firmwareButton |
|
|
|
|
imageResource: "/qmlimages/FirmwareUpgradeIcon.png" |
|
|
|
|
setupIndicator: false |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: !ScreenTools.isMobile |
|
|
|
|
text: "Firmware" |
|
|
|
|
|
|
|
|
|
onClicked: showFirmwarePanel() |
|
|
|
|
} |
|
|
|
|
SubMenuButton { |
|
|
|
|
id: summaryButton |
|
|
|
|
imageResource: "/qmlimages/VehicleSummaryIcon.png" |
|
|
|
|
setupIndicator: false |
|
|
|
|
checked: true |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
text: "Summary" |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
id: px4FlowButton |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle.genericFirmware : false |
|
|
|
|
setupIndicator: false |
|
|
|
|
text: "PX4Flow" |
|
|
|
|
onClicked: showPX4FlowPanel() |
|
|
|
|
} |
|
|
|
|
onClicked: showSummaryPanel() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
id: joystickButton |
|
|
|
|
setupIndicator: true |
|
|
|
|
setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: _fullParameterVehicleAvailable && joystickManager.joysticks.length != 0 |
|
|
|
|
text: "Joystick" |
|
|
|
|
SubMenuButton { |
|
|
|
|
id: firmwareButton |
|
|
|
|
imageResource: "/qmlimages/FirmwareUpgradeIcon.png" |
|
|
|
|
setupIndicator: false |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: !ScreenTools.isMobile |
|
|
|
|
text: "Firmware" |
|
|
|
|
|
|
|
|
|
onClicked: showJoystickPanel() |
|
|
|
|
} |
|
|
|
|
onClicked: showFirmwarePanel() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
id: componentRepeater |
|
|
|
|
model: _fullParameterVehicleAvailable ? QGroundControl.multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0 |
|
|
|
|
SubMenuButton { |
|
|
|
|
id: px4FlowButton |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle.genericFirmware : false |
|
|
|
|
setupIndicator: false |
|
|
|
|
text: "PX4Flow" |
|
|
|
|
onClicked: showPX4FlowPanel() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
imageResource: modelData.iconResource |
|
|
|
|
setupIndicator: modelData.requiresSetup |
|
|
|
|
setupComplete: modelData.setupComplete |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
text: modelData.name |
|
|
|
|
visible: modelData.setupSource.toString() != "" |
|
|
|
|
SubMenuButton { |
|
|
|
|
id: joystickButton |
|
|
|
|
setupIndicator: true |
|
|
|
|
setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: _fullParameterVehicleAvailable && joystickManager.joysticks.length != 0 |
|
|
|
|
text: "Joystick" |
|
|
|
|
|
|
|
|
|
onClicked: showJoystickPanel() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onClicked: showVehicleComponentPanel(modelData) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Repeater { |
|
|
|
|
id: componentRepeater |
|
|
|
|
model: _fullParameterVehicleAvailable ? QGroundControl.multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0 |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
setupIndicator: false |
|
|
|
|
imageResource: modelData.iconResource |
|
|
|
|
setupIndicator: modelData.requiresSetup |
|
|
|
|
setupComplete: modelData.setupComplete |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable |
|
|
|
|
text: "Parameters" |
|
|
|
|
text: modelData.name |
|
|
|
|
visible: modelData.setupSource.toString() != "" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onClicked: showParametersPanel() |
|
|
|
|
onClicked: showVehicleComponentPanel(modelData) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SubMenuButton { |
|
|
|
|
setupIndicator: false |
|
|
|
|
exclusiveGroup: setupButtonGroup |
|
|
|
|
visible: QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable |
|
|
|
|
text: "Parameters" |
|
|
|
|
|
|
|
|
|
onClicked: showParametersPanel() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Loader { |
|
|
|
|
id: panelLoader |
|
|
|
|
anchors.topMargin: _margin |
|
|
|
|
anchors.bottomMargin: _margin |
|
|
|
|
anchors.leftMargin: _defaultTextWidth |
|
|
|
|
anchors.rightMargin: _defaultTextWidth |
|
|
|
|
anchors.left: buttonScroll.right |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Loader { |
|
|
|
|
id: panelLoader |
|
|
|
|
anchors.topMargin: _margin |
|
|
|
|
anchors.bottomMargin: _margin |
|
|
|
|
anchors.leftMargin: _defaultTextWidth |
|
|
|
|
anchors.rightMargin: _defaultTextWidth |
|
|
|
|
anchors.left: buttonScroll.right |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|