|
|
|
@ -16,57 +16,21 @@ import QGroundControl.MultiVehicleManager 1.0
@@ -16,57 +16,21 @@ import QGroundControl.MultiVehicleManager 1.0
|
|
|
|
|
import QGroundControl.ScreenTools 1.0 |
|
|
|
|
import QGroundControl.Palette 1.0 |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
id: _root |
|
|
|
|
Layout.preferredWidth: mainStatusLabel.contentWidth + ScreenTools.defaultFontPixelWidth |
|
|
|
|
RowLayout { |
|
|
|
|
id: _root |
|
|
|
|
spacing: 0 |
|
|
|
|
|
|
|
|
|
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle |
|
|
|
|
property real _margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: mainStatusInfo |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: mainLayout.width + (_margins * 2) |
|
|
|
|
height: mainLayout.height + (_margins * 2) |
|
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
color: qgcPal.window |
|
|
|
|
border.color: qgcPal.text |
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
id: mainLayout |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
rowSpacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
columnSpacing: rowSpacing |
|
|
|
|
rows: _activeVehicle.sysStatusSensorInfo.sensorNames.length |
|
|
|
|
flow: GridLayout.TopToBottom |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorNames |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: modelData |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorStatus |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: modelData |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle |
|
|
|
|
property var _vehicleInAir: _activeVehicle ? _activeVehicle.flying || _activeVehicle.landing : false |
|
|
|
|
property bool _vtolInFWDFlight: _activeVehicle ? _activeVehicle.vtolInFwdFlight : false |
|
|
|
|
property bool _armed: _activeVehicle ? _activeVehicle.armed : false |
|
|
|
|
property real _margins: ScreenTools.defaultFontPixelWidth |
|
|
|
|
property real _spacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: mainStatusLabel |
|
|
|
|
text: mainStatusText() |
|
|
|
|
font.pointSize: ScreenTools.largeFontPointSize |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
id: mainStatusLabel |
|
|
|
|
text: mainStatusText() |
|
|
|
|
font.pointSize: _vehicleInAir ? ScreenTools.defaultFontPointSize : ScreenTools.largeFontPointSize |
|
|
|
|
|
|
|
|
|
property string _commLostText: qsTr("Communication Lost") |
|
|
|
|
property string _readyToFlyText: qsTr("Ready To Fly") |
|
|
|
@ -117,13 +81,156 @@ Item {
@@ -117,13 +81,156 @@ Item {
|
|
|
|
|
return mainStatusLabel._disconnectedText |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
height: _root.height |
|
|
|
|
enabled: _activeVehicle |
|
|
|
|
onClicked: mainWindow.showIndicatorPopup(mainStatusLabel, sensorStatusInfoComponent) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth |
|
|
|
|
height: 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
id: flightModeIcon |
|
|
|
|
width: height |
|
|
|
|
height: ScreenTools.defaultFontPixelHeight * 0.75 |
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
mipmap: true |
|
|
|
|
color: qgcPal.text |
|
|
|
|
source: "/qmlimages/FlightModesComponentIcon.png" |
|
|
|
|
visible: _activeVehicle |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
Layout.preferredWidth: ScreenTools.defaultFontPixelWidth * (_vehicleInAir ? ScreenTools.largeFontPointRatio : 1) / 3 |
|
|
|
|
height: 1 |
|
|
|
|
visible: flightModeMenu.visible |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FlightModeMenu { |
|
|
|
|
id: flightModeMenu |
|
|
|
|
Layout.preferredHeight: _root.height |
|
|
|
|
verticalAlignment: Text.AlignVCenter |
|
|
|
|
font.pointSize: _vehicleInAir ? ScreenTools.largeFontPointSize : ScreenTools.defaultFontPointSize |
|
|
|
|
mouseAreaLeftMargin: -(flightModeMenu.x - flightModeIcon.x) |
|
|
|
|
visible: _activeVehicle |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
Layout.preferredWidth: ScreenTools.defaultFontPixelWidth * ScreenTools.largeFontPointRatio |
|
|
|
|
height: 1 |
|
|
|
|
visible: vtolModeLabel.visible |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
anchors.fill: parent |
|
|
|
|
enabled: _activeVehicle |
|
|
|
|
onClicked: { |
|
|
|
|
mainWindow.showPopUp(_root, mainStatusInfo) |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vtolModeLabel |
|
|
|
|
Layout.preferredHeight: _root.height |
|
|
|
|
verticalAlignment: Text.AlignVCenter |
|
|
|
|
text: _vtolInFWDFlight ? qsTr("FW(vtol)") : qsTr("MR(vtol)") |
|
|
|
|
font.pointSize: ScreenTools.largeFontPointSize |
|
|
|
|
visible: _activeVehicle ? _activeVehicle.vtol && _vehicleInAir : false |
|
|
|
|
|
|
|
|
|
QGCMouseArea { |
|
|
|
|
anchors.fill: parent |
|
|
|
|
onClicked: mainWindow.showIndicatorPopup(vtolModeLabel, vtolTransitionComponent) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: sensorStatusInfoComponent |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: mainLayout.width + (_margins * 2) |
|
|
|
|
height: mainLayout.height + (_margins * 2) |
|
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
color: qgcPal.window |
|
|
|
|
border.color: qgcPal.text |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
id: mainLayout |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
spacing: _spacing |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
text: qsTr("Sensor Status") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
rowSpacing: _spacing |
|
|
|
|
columnSpacing: _spacing |
|
|
|
|
rows: _activeVehicle.sysStatusSensorInfo.sensorNames.length |
|
|
|
|
flow: GridLayout.TopToBottom |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorNames |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: modelData |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
model: _activeVehicle.sysStatusSensorInfo.sensorStatus |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: modelData |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
text: _armed ? qsTr("Disarm") : qsTr("Arm") |
|
|
|
|
onClicked: { |
|
|
|
|
if (_armed) { |
|
|
|
|
mainWindow.disarmVehicleRequest() |
|
|
|
|
} else { |
|
|
|
|
mainWindow.armVehicleRequest() |
|
|
|
|
} |
|
|
|
|
mainWindow.hideIndicatorPopup() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: vtolTransitionComponent |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: mainLayout.width + (_margins * 2) |
|
|
|
|
height: mainLayout.height + (_margins * 2) |
|
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
color: qgcPal.window |
|
|
|
|
border.color: qgcPal.text |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
id: mainLayout |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
text: _vtolInFWDFlight ? qsTr("Transition to Multi-Rotor") : qsTr("Transition to Fixed Wing") |
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
if (_vtolInFWDFlight) { |
|
|
|
|
mainWindow.vtolTransitionToMRFlightRequest() |
|
|
|
|
} else { |
|
|
|
|
mainWindow.vtolTransitionToFwdFlightRequest() |
|
|
|
|
} |
|
|
|
|
mainWindow.hideIndicatorPopup() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|