|
|
|
@ -18,118 +18,163 @@ import QGroundControl.Palette 1.0
@@ -18,118 +18,163 @@ import QGroundControl.Palette 1.0
|
|
|
|
|
import QGroundControl.Vehicle 1.0 |
|
|
|
|
import QGroundControl.FlightMap 1.0 |
|
|
|
|
|
|
|
|
|
QGCListView { |
|
|
|
|
id: missionItemEditorListView |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
orientation: ListView.Vertical |
|
|
|
|
model: QGroundControl.multiVehicleManager.vehicles |
|
|
|
|
cacheBuffer: _cacheBuffer < 0 ? 0 : _cacheBuffer |
|
|
|
|
clip: true |
|
|
|
|
|
|
|
|
|
property real _margin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
property real _cacheBuffer: height * 2 |
|
|
|
|
property real _widgetHeight: ScreenTools.defaultFontPixelHeight * 3 |
|
|
|
|
|
|
|
|
|
delegate: Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: innerColumn.y + innerColumn.height + _margin |
|
|
|
|
color: qgcPal.missionItemEditor |
|
|
|
|
opacity: 0.8 |
|
|
|
|
radius: _margin |
|
|
|
|
|
|
|
|
|
property var _vehicle: object |
|
|
|
|
property color _textColor: "black" |
|
|
|
|
|
|
|
|
|
QGCPalette { id: qgcPal } |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
id: widgetLayout |
|
|
|
|
anchors.margins: _margin |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
layoutDirection: Qt.RightToLeft |
|
|
|
|
|
|
|
|
|
QGCCompassWidget { |
|
|
|
|
size: _widgetHeight |
|
|
|
|
vehicle: _vehicle |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCAttitudeWidget { |
|
|
|
|
size: _widgetHeight |
|
|
|
|
vehicle: _vehicle |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Item { |
|
|
|
|
property var guidedActionsController |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
anchors.top: widgetLayout.top |
|
|
|
|
anchors.bottom: widgetLayout.bottom |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: widgetLayout.left |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
property real _margin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
property real _widgetHeight: ScreenTools.defaultFontPixelHeight * 3 |
|
|
|
|
property color _textColor: "black" |
|
|
|
|
property real _rectOpacity: 0.8 |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
Layout.alignment: Qt.AlignTop |
|
|
|
|
text: _vehicle.id |
|
|
|
|
color: _textColor |
|
|
|
|
} |
|
|
|
|
QGCPalette { id: qgcPal } |
|
|
|
|
|
|
|
|
|
FlightModeMenu { |
|
|
|
|
font.pointSize: ScreenTools.largeFontPointSize |
|
|
|
|
color: _textColor |
|
|
|
|
activeVehicle: _vehicle |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
NoMouseThroughRectangle { |
|
|
|
|
id: mvCommands |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
height: mvCommandsColumn.height + (_margin *2) |
|
|
|
|
color: qgcPal.missionItemEditor |
|
|
|
|
opacity: _rectOpacity |
|
|
|
|
radius: _margin |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: innerColumn |
|
|
|
|
id: mvCommandsColumn |
|
|
|
|
anchors.margins: _margin |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.top: widgetLayout.bottom |
|
|
|
|
spacing: _margin |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
height: 5 |
|
|
|
|
color: "green" |
|
|
|
|
text: qsTr("The following commands will be applied to all vehicles") |
|
|
|
|
color: _textColor |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
font.pointSize: ScreenTools.smallFontPointSize |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
spacing: _margin |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Arm" |
|
|
|
|
visible: !_vehicle.armed |
|
|
|
|
onClicked: _vehicle.armed = true |
|
|
|
|
text: "Pause" |
|
|
|
|
onClicked: guidedActionsController.confirmAction(guidedActionsController.actionMVPause) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Start" |
|
|
|
|
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.missionFlightMode |
|
|
|
|
onClicked: _vehicle.flightMode = _vehicle.missionFlightMode |
|
|
|
|
text: "Start Mision" |
|
|
|
|
onClicked: guidedActionsController.confirmAction(guidedActionsController.actionMVStartMission) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Stop" |
|
|
|
|
visible: _vehicle.armed && _vehicle.pauseVehicleSupported |
|
|
|
|
onClicked: _vehicle.pauseVehicle() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "RTL" |
|
|
|
|
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.rtlFlightMode |
|
|
|
|
onClicked: _vehicle.flightMode = _vehicle.rtlFlightMode |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Take control" |
|
|
|
|
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.takeControlFlightMode |
|
|
|
|
onClicked: _vehicle.flightMode = _vehicle.takeControlFlightMode |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} // QGCListView |
|
|
|
|
|
|
|
|
|
QGCListView { |
|
|
|
|
id: missionItemEditorListView |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.topMargin: _margin |
|
|
|
|
anchors.top: mvCommands.bottom |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
orientation: ListView.Vertical |
|
|
|
|
model: QGroundControl.multiVehicleManager.vehicles |
|
|
|
|
cacheBuffer: _cacheBuffer < 0 ? 0 : _cacheBuffer |
|
|
|
|
clip: true |
|
|
|
|
|
|
|
|
|
property real _cacheBuffer: height * 2 |
|
|
|
|
|
|
|
|
|
delegate: Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: innerColumn.y + innerColumn.height + _margin |
|
|
|
|
color: qgcPal.missionItemEditor |
|
|
|
|
opacity: _rectOpacity |
|
|
|
|
radius: _margin |
|
|
|
|
|
|
|
|
|
property var _vehicle: object |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
id: innerColumn |
|
|
|
|
anchors.margins: _margin |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.left |
|
|
|
|
spacing: _margin |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.left |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
Layout.alignment: Qt.AlignTop |
|
|
|
|
text: _vehicle.id |
|
|
|
|
color: _textColor |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
Layout.alignment: Qt.AlignCenter |
|
|
|
|
spacing: _margin |
|
|
|
|
|
|
|
|
|
FlightModeMenu { |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
font.pointSize: ScreenTools.largeFontPointSize |
|
|
|
|
color: _textColor |
|
|
|
|
activeVehicle: _vehicle |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
text: _vehicle.armed ? qsTr("Armed") : qsTr("Disarmed") |
|
|
|
|
color: _textColor |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCompassWidget { |
|
|
|
|
size: _widgetHeight |
|
|
|
|
vehicle: _vehicle |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCAttitudeWidget { |
|
|
|
|
size: _widgetHeight |
|
|
|
|
vehicle: _vehicle |
|
|
|
|
} |
|
|
|
|
} // RowLayout |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Arm" |
|
|
|
|
visible: !_vehicle.armed |
|
|
|
|
onClicked: _vehicle.armed = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Start Mission" |
|
|
|
|
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.missionFlightMode |
|
|
|
|
onClicked: _vehicle.startMission() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Pause" |
|
|
|
|
visible: _vehicle.armed && _vehicle.pauseVehicleSupported |
|
|
|
|
onClicked: _vehicle.pauseVehicle() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "RTL" |
|
|
|
|
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.rtlFlightMode |
|
|
|
|
onClicked: _vehicle.flightMode = _vehicle.rtlFlightMode |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: "Take control" |
|
|
|
|
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.takeControlFlightMode |
|
|
|
|
onClicked: _vehicle.flightMode = _vehicle.takeControlFlightMode |
|
|
|
|
} |
|
|
|
|
} // Row |
|
|
|
|
} // ColumnLayout |
|
|
|
|
} // delegate - Rectangle |
|
|
|
|
} // QGCListView |
|
|
|
|
} // Item |
|
|
|
|