5import QGroundControl.FactControls
6import QGroundControl.Controls
7import QGroundControl.FlyView
8import QGroundControl.FlightMap
13 height: Math.max(contentHeight, minimumHeight)
14 color: qgcPal.toolbarBackground
15 radius: ScreenTools.defaultFontPixelHeight / 2
16 visible: !QGroundControl.videoManager.fullScreen && _multipleVehicles && _settingEnableMVPanel
19 property bool _settingEnableMVPanel: QGroundControl.settingsManager.appSettings.enableMultiVehiclePanel.value
20 property bool _multipleVehicles: QGroundControl.multiVehicleManager.vehicles.count > 1
21 property var vehicles: QGroundControl.multiVehicleManager.vehicles
22 property var selectedVehicles: QGroundControl.multiVehicleManager.selectedVehicles
23 property real contentWidth: Math.max(
24 multiVehicleList.implicitWidth,
25 swipeViewContainer.implicitWidth
26 ) + ScreenTools.defaultFontPixelHeight
27 property real contentHeight: Math.min(
29 topRightPanelColumnLayout.implicitHeight + topRightPanelColumnLayout.anchors.margins * 2
31 property real minimumHeight: swipeViewContainer.height
32 property real maximumHeight
34 QGCPalette { id: qgcPal }
41 id: topRightPanelColumnLayout
43 anchors.margins: topRightPanel.color.a ? ScreenTools.defaultFontPixelHeight / 2 : 0
44 spacing: ScreenTools.defaultFontPixelWidth * 0.75 // _layoutMargin
48 Layout.fillWidth: true
49 Layout.fillHeight: true
53 visible: topRightPanel.height === maximumHeight
56 anchors.left: parent.left
57 anchors.right: parent.right
58 anchors.top: parent.top
61 color: QGroundControl.globalPalette.groupBorder
65 orientation: Gradient.Vertical
66 GradientStop { position: 0.00; color: topRightPanel.color }
67 GradientStop { position: 0.05; color: "transparent" }
69 GradientStop { position: 0.95; color: "transparent" }
70 GradientStop { position: 1.00; color: topRightPanel.color }
74 anchors.left: parent.left
75 anchors.right: parent.right
76 anchors.bottom: parent.bottom
79 color: QGroundControl.globalPalette.groupBorder
86 id: swipeViewContainer
87 Layout.fillWidth: true
88 implicitHeight: swipePages.implicitHeight
89 implicitWidth: swipePages.implicitWidth
95 spacing: ScreenTools.defaultFontPixelHeight
96 implicitHeight: Math.max(buttonsPage.implicitHeight, photoVideoPage.implicitHeight)
97 implicitWidth: Math.max(buttonsPage.implicitWidth, photoVideoPage.implicitWidth)
101 implicitHeight: buttonsColumnLayout.implicitHeight + ScreenTools.defaultFontPixelHeight * 2
102 implicitWidth: buttonsColumnLayout.implicitWidth + ScreenTools.defaultFontPixelHeight * 2
105 id: buttonsColumnLayout
106 anchors.right: parent.right
107 anchors.left: parent.left
108 anchors.verticalCenter: parent.verticalCenter
109 spacing: ScreenTools.defaultFontPixelHeight / 2
110 implicitHeight: Math.max(selectionRowLayout.height, actionRowLayout.height) + ScreenTools.defaultFontPixelHeight * 2
111 implicitWidth: Math.max(selectionRowLayout.width, actionRowLayout.width) + ScreenTools.defaultFontPixelHeight * 4
115 let ids = Array.from({length: selectedVehicles.count}, (_, i) =>
116 selectedVehicles.get(i).id
117 ).sort((a, b) => a - b)
119 return qsTr("Vehicles Selected: ") + (ids ? ids : "-")
121 Layout.alignment: Qt.AlignHCenter
125 id: selectionRowLayout
126 Layout.alignment: Qt.AlignHCenter
129 text: qsTr("Select All")
130 enabled: multiVehicleList.selectedVehicles && multiVehicleList.selectedVehicles.count !== QGroundControl.multiVehicleManager.vehicles.count
131 onClicked: multiVehicleList.selectAll()
135 text: qsTr("Deselect All")
136 enabled: multiVehicleList.selectedVehicles && multiVehicleList.selectedVehicles.count > 0
137 onClicked: multiVehicleList.deselectAll()
144 text: qsTr("Multi Vehicle Actions")
145 Layout.alignment: Qt.AlignHCenter
150 Layout.alignment: Qt.AlignHCenter
154 enabled: multiVehicleList.armAvailable()
155 onClicked: _guidedController.confirmAction(_guidedController.actionMVArm)
156 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 2.75
163 enabled: multiVehicleList.disarmAvailable()
164 onClicked: _guidedController.confirmAction(_guidedController.actionMVDisarm)
165 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 2.75
172 enabled: multiVehicleList.startAvailable()
173 onClicked: _guidedController.confirmAction(_guidedController.actionMVStartMission)
174 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 2.75
181 enabled: multiVehicleList.pauseAvailable()
182 onClicked: _guidedController.confirmAction(_guidedController.actionMVPause)
183 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 2.75
194 implicitHeight: photoVideoControlLoader.implicitHeight + ScreenTools.defaultFontPixelHeight * 2
195 implicitWidth: photoVideoControlLoader.implicitWidth + ScreenTools.defaultFontPixelHeight * 2
197 // We use a Loader to load the photoVideoControlComponent only when the active vehicle is not null
198 // This make it easier to implement PhotoVideoControl without having to check for the mavlink camera
199 // to be null all over the place
202 id: photoVideoControlLoader
203 anchors.horizontalCenter: parent.horizontalCenter
204 sourceComponent: globals.activeVehicle ? photoVideoControlComponent : undefined
206 property real rightEdgeCenterInset: visible ? parent.width - x : 0
209 id: photoVideoControlComponent
220 count: swipePages.count
221 currentIndex: swipePages.currentIndex
222 anchors.bottom: parent.bottom
223 anchors.horizontalCenter: parent.horizontalCenter
224 anchors.margins: ScreenTools.defaultFontPixelHeight / 4
226 delegate: Rectangle {
227 height: ScreenTools.defaultFontPixelHeight / 2
230 color: model.index === pageIndicator.currentIndex ? qgcPal.text : qgcPal.button
231 opacity: model.index === pageIndicator.currentIndex ? 0.9 : 0.3