Browse Source

Better visuals on no connected, and connected no components

QGC4.4
Don Gagne 10 years ago
parent
commit
a8a30ba1e7
  1. 35
      src/VehicleSetup/SetupView.qml

35
src/VehicleSetup/SetupView.qml

@ -53,7 +53,11 @@ Item { @@ -53,7 +53,11 @@ Item {
function showSummaryPanel()
{
if (_fullParameterVehicleAvailable) {
panelLoader.source = "VehicleSummary.qml";
if (multiVehicleManager.activeVehicle.autopilot.vehicleComponents.length == 0) {
panelLoader.sourceComponent = noComponentsVehicleSummaryComponent
} else {
panelLoader.source = "VehicleSummary.qml";
}
} else if (multiVehicleManager.parameterReadyVehicleAvailable) {
panelLoader.sourceComponent = missingParametersVehicleSummaryComponent
} else {
@ -115,7 +119,7 @@ Item { @@ -115,7 +119,7 @@ Item {
}
Component {
id: disconnectedVehicleSummaryComponent
id: noComponentsVehicleSummaryComponent
Rectangle {
color: qgcPal.windowShade
@ -127,11 +131,8 @@ Item { @@ -127,11 +131,8 @@ Item {
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
font.pixelSize: ScreenTools.mediumFontPixelSize
text: "Welcome to QGroundControl. " +
"QGroundControl supports any <font color=\"orange\"><a href=\"http://www.qgroundcontrol.org/mavlink/start\">mavlink</a></font> enabled vehicle. " +
"If you are using the <font color=\"orange\"><a href=\"https://pixhawk.org/choice\">PX4 Flight Stack</a></font>, you also get full support for setting up and calibrating your vehicle. "+
"Otherwise you will only get support for flying a vehicle which has been setup and calibrated using other means. " +
"Use the Connect button above to connect to your vehicle."
text: "QGroundControl does not currently support setup of your vehicle type. " +
"If your vehicle is already configured you can still Fly."
onLinkActivated: Qt.openUrlExternally(link)
}
@ -139,6 +140,25 @@ Item { @@ -139,6 +140,25 @@ Item {
}
Component {
id: disconnectedVehicleSummaryComponent
Rectangle {
color: qgcPal.windowShade
QGCLabel {
anchors.margins: _defaultTextWidth * 2
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
font.pixelSize: ScreenTools.largeFontPixelSize
text: "Click Connect on the top right to Fly. Click Firmware on the left to upgrade your vehicle."
onLinkActivated: Qt.openUrlExternally(link)
}
}
}
Component {
id: missingParametersVehicleSummaryComponent
Rectangle {
@ -218,6 +238,7 @@ Item { @@ -218,6 +238,7 @@ Item {
width: _buttonWidth
imageResource: "/qmlimages/VehicleSummaryIcon.png"
setupIndicator: false
checked: true
exclusiveGroup: setupButtonGroup
text: "SUMMARY"

Loading…
Cancel
Save