QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MainStatusIndicator.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7RowLayout {
8 id: control
9 spacing: ScreenTools.defaultFontPixelWidth
10
11 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
12 property var _guidedController: globals.guidedControllerFlyView
13 property bool _armed: _activeVehicle ? _activeVehicle.armed : false
14 property real _margins: ScreenTools.defaultFontPixelWidth
15 property real _spacing: ScreenTools.defaultFontPixelWidth / 2
16 property bool _healthAndArmingChecksSupported: _activeVehicle ? _activeVehicle.healthAndArmingCheckReport.supported : false
17 property var _readiness: _activeVehicle ? _activeVehicle.readiness : null
18 property bool _vehicleSyncing: _readiness ? _readiness.status === VehicleReadiness.Status.Syncing : false
19 property var _vehicleInAir: _activeVehicle ? _activeVehicle.airborne || _activeVehicle.landing : false
20 property bool _vtolInFWDFlight: _activeVehicle ? _activeVehicle.vtolInFwdFlight : false
21 property bool _rebootRequired: _activeVehicle ? _activeVehicle.rebootRequired : false
22 property bool _checklistEnabled: QGroundControl.settingsManager.appSettings.useChecklist.rawValue
23 property bool _preVehicleChecklistActive: _checklistEnabled && !!preVehicleLoader.item && preVehicleLoader.item.hasGroups
24 property bool _preVehiclePassed: !preVehicleLoader.item || preVehicleLoader.item.allChecksPassed
25 property bool _flownSinceArming: false
26 property bool _checklistComplete: _activeVehicle ? _activeVehicle.checkListState === Vehicle.CheckListPassed : false
27 // The checklist is pre-flight, so an unfinished one is not flagged once armed
28 property bool _checklistWarning: _checklistEnabled && !!_activeVehicle && !_checklistComplete && !_armed
29 // Pre-vehicle checks are the only checks which can be pending while disconnected
30 property bool _preVehicleWarning: _preVehicleChecklistActive && !_preVehiclePassed
31 property bool _anyChecklistWarning: _activeVehicle ? _checklistWarning : _preVehicleWarning
32 property int _healthErrorCount: _healthAndArmingChecksSupported ?
33 _activeVehicle.healthAndArmingCheckReport.errorCount : 0
34 property int _healthWarningCount: _healthAndArmingChecksSupported ?
35 _activeVehicle.healthAndArmingCheckReport.warningCount : 0
36
37 readonly property int tabChecklist: 0
38 readonly property int tabMessages: 1
39 readonly property int tabStatus: 2
40
41 property int _initialTab: -1
42
43 // Raised when the dropdown is already open and should switch tabs
44 signal tabRequested(int tab)
45
46 function dropMainStatusIndicator(showMessages = false) {
47 _initialTab = showMessages ? tabMessages : -1
48 let overallStatusComponent = _activeVehicle ? overallStatusIndicatorPage : overallStatusOfflineIndicatorPage
49 mainWindow.showIndicatorDrawer(overallStatusComponent, control)
50 if (_initialTab !== -1) {
51 tabRequested(_initialTab)
52 }
53 }
54
55 QGCPalette { id: qgcPal }
56
57 // Lives here rather than in the dropdown so checklist progress survives the dropdown closing
58 Loader {
59 id: preVehicleLoader
60 visible: false
61 active: _checklistEnabled
62 source: "qrc:/qml/QGroundControl/FlyView/PreVehicleCheckList.qml"
63 }
64
65 Loader {
66 id: checklistLoader
67 visible: false
68 active: _checklistEnabled && !!_activeVehicle
69 source: "qrc:/qml/QGroundControl/FlyView/PreFlightCheckList.qml"
70
71 // The vehicle may still hold the Passed state of the previous checklist, so sync it to the new one
72 onLoaded: {
73 if (_activeVehicle) {
74 _activeVehicle.checkListState = item.checklistPassed === true ? Vehicle.CheckListPassed : Vehicle.CheckListNotSetup
75 }
76 }
77 }
78
79 Binding {
80 target: checklistLoader.item
81 property: "prerequisitesPassed"
82 value: _preVehiclePassed
83 when: !!checklistLoader.item
84 }
85
86 // Each sortie starts with a clean checklist, but only when pre-vehicle checks make the previous one stale.
87 // Pre-vehicle checks only support a single vehicle: flights are tracked on the active vehicle only, so one which
88 // is airborne or lands while another vehicle is selected does not reset them.
89 Connections {
90 target: _activeVehicle
91
92 function onAirborneChanged(airborne) {
93 if (airborne) {
94 _flownSinceArming = true
95 }
96 }
97
98 function onArmedChanged(armed) {
99 if (armed || !_flownSinceArming) {
100 return
101 }
102 _flownSinceArming = false
103 if (_preVehicleChecklistActive) {
104 preVehicleLoader.item.reset()
105 if (checklistLoader.item) {
106 checklistLoader.item.reset()
107 }
108 }
109 }
110 }
111
112 on_ActiveVehicleChanged: _flownSinceArming = false
113
114 QGCLabel {
115 id: mainStatusLabel
116 objectName: "mainStatusText"
117 Layout.fillHeight: true
118 Layout.preferredWidth: Math.max(contentWidth + leftPadding + rightPadding, badgeRow.width)
119 leftPadding: ScreenTools.defaultFontPixelWidth / 2
120 rightPadding: ScreenTools.defaultFontPixelWidth / 2
121 horizontalAlignment: Text.AlignRight
122 verticalAlignment: Text.AlignVCenter
123 text: mainStatusText()
124 color: qgcPal.textPrimary
125 font.pointSize: ScreenTools.largeFontPointSize
126
127 property string _commLostText: qsTr("Comms Lost")
128 property string _readyToFlyText: qsTr("Ready")
129 property string _notReadyToFlyText: qsTr("Not Ready")
130 property string _disconnectedText: qsTr("Disconnected - Click to manually connect")
131 property string _armedText: qsTr("Armed")
132 property string _flyingText: qsTr("Flying")
133 property string _landingText: qsTr("Landing")
134
135 function mainStatusText() {
136 if (_activeVehicle) {
137 if (_communicationLost) {
138 _mainStatusBGColor = "red"
139 return mainStatusLabel._commLostText
140 }
141
142 const readinessStatus = _readiness ? _readiness.status : VehicleReadiness.Status.Unknown
143 const healthWarnings = _healthAndArmingChecksSupported &&
144 _activeVehicle.healthAndArmingCheckReport.hasWarningsOrErrors
145
146 if (_activeVehicle.armed) {
147 if (readinessStatus === VehicleReadiness.Status.NotReady) {
148 _mainStatusBGColor = "red"
149 } else if (healthWarnings || readinessStatus === VehicleReadiness.Status.Unknown || _vehicleSyncing) {
150 _mainStatusBGColor = "yellow"
151 } else {
152 _mainStatusBGColor = "green"
153 }
154
155 if (_activeVehicle.underway) {
156 return mainStatusLabel._flyingText
157 } else if (_activeVehicle.landing) {
158 return mainStatusLabel._landingText
159 } else {
160 return mainStatusLabel._armedText
161 }
162 }
163
164 if (readinessStatus === VehicleReadiness.Status.Ready) {
165 _mainStatusBGColor = healthWarnings ? "yellow" : "green"
166 return mainStatusLabel._readyToFlyText
167 }
168 _mainStatusBGColor = (readinessStatus === VehicleReadiness.Status.NotReady) ? "red" : "yellow"
169 return mainStatusLabel._notReadyToFlyText
170 } else {
171 _mainStatusBGColor = qgcPal.brandPrimary
172 return mainStatusLabel._disconnectedText
173 }
174 }
175
176 Row {
177 id: badgeRow
178 anchors.top: parent.top
179 anchors.topMargin: 2
180 anchors.right: parent.right
181 spacing: ScreenTools.defaultFontPixelWidth * 0.25
182
183 Rectangle {
184 id: firmwareUpdateBadge
185 objectName: "mainStatusFirmwareUpdateBadge"
186 width: height
187 height: severityBadge.height
188 radius: width / 2
189 color: Qt.rgba(1, 1, 1, 0.75)
190 visible: _activeVehicle && !_vehicleSyncing && _activeVehicle.newStableFirmwareVersion !== "" && !_activeVehicle.newStableFirmwareVersionAcknowledged
191
192 QGCColoredImage {
193 anchors.fill: parent
194 source: "/res/UpdateAvailable.svg"
195 color: qgcPal.colorBlue
196 }
197 }
198
199 StatusPill {
200 objectName: "mainStatusRebootBadge"
201 text: qsTr("Reboot")
202 color: qgcPal.colorOrange
203 visible: _rebootRequired && !_vehicleSyncing
204 }
205
206 // Other errors or warnings take the severity pill over, so the incomplete checklist gets its own pill beside it
207 StatusPill {
208 id: checklistBadge
209 objectName: "mainStatusChecklistBadge"
210 text: qsTr("Pre-Flight")
211 color: qgcPal.warningIndicator
212 visible: !_vehicleSyncing && _anyChecklistWarning && !severityBadge.namesChecklist
213 }
214
215 // Worst state across the dropdown tabs: messages, health and arming checks, and the pre-flight checklist
216 SeverityPill {
217 id: severityBadge
218 objectName: "mainStatusSeverityBadge"
219 errorCount: _activeVehicle ? _activeVehicle.unreadCriticalMessageCount + _healthErrorCount : 0
220 warningCount: _activeVehicle ? _activeVehicle.unreadWarningMessageCount + _healthWarningCount +
221 (_checklistWarning ? 1 : 0) : (_preVehicleWarning ? 1 : 0)
222 unreadCount: _activeVehicle ? _activeVehicle.unreadMessageCount : 0
223 warningLabel: namesChecklist ? qsTr("Pre-Flight") : qsTr("Warning")
224 visible: !_vehicleSyncing && text.length > 0
225
226 readonly property bool namesChecklist: _anyChecklistWarning && severity === "warning" && warningCount === 1
227 }
228
229 // Takes the place of every other badge until initial connect completes
230 StatusPill {
231 id: vehicleSyncBadge
232 objectName: "mainStatusVehicleSyncBadge"
233 text: qsTr("Vehicle Sync")
234 color: qgcPal.warningIndicator
235 visible: _vehicleSyncing
236 }
237 }
238
239 QGCMouseArea {
240 anchors.fill: parent
241 onClicked: dropMainStatusIndicator()
242 }
243 }
244
245 QGCLabel {
246 id: vtolModeLabel
247 Layout.fillHeight: true
248 verticalAlignment: Text.AlignVCenter
249 text: _vtolInFWDFlight ? qsTr("FW(vtol)") : qsTr("MR(vtol)")
250 color: qgcPal.textPrimary
251 font.pointSize: _vehicleInAir ? ScreenTools.largeFontPointSize : ScreenTools.defaultFontPointSize
252 visible: _activeVehicle && _activeVehicle.vtol
253
254 QGCMouseArea {
255 anchors.fill: parent
256 onClicked: {
257 if (_vehicleInAir) {
258 mainWindow.showIndicatorDrawer(vtolTransitionIndicatorPage)
259 }
260 }
261 }
262 }
263
264 Component {
265 id: overallStatusOfflineIndicatorPage
266
267 MainStatusIndicatorOfflinePage {
268 preVehicleChecklistLoader: preVehicleLoader
269 showChecklist: _preVehicleChecklistActive
270
271 Component.onCompleted: mainWindow.suppressCriticalVehicleMessages = true
272 Component.onDestruction: mainWindow.suppressCriticalVehicleMessages = false
273 }
274 }
275
276 Component {
277 id: overallStatusIndicatorPage
278
279 ToolIndicatorPage {
280 waitForParameters: false
281 fillWindow: true
282 contentComponent: mainStatusContentComponent
283 }
284 }
285
286 Component {
287 id: mainStatusContentComponent
288
289 ColumnLayout {
290 id: mainLayout
291 spacing: _spacing
292
293 property bool parametersReady: QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable
294
295 // Only the Messages tab shows critical messages, so only then is the popup redundant
296 Binding {
297 target: mainWindow
298 property: "suppressCriticalVehicleMessages"
299 value: mainLayout.visible && statusTabs.currentIndex === control.tabMessages
300 }
301
302 Connections {
303 target: control
304 function onTabRequested(tab) { statusTabs.currentIndex = tab }
305 }
306
307 QGCGroupBox {
308 Layout.fillWidth: true
309 heading: qsTr("Commands")
310 showDividers: false
311 // Stop controls must stay reachable without parameters
312 visible: parametersReady || _guidedController.showEmergencyStop || _guidedController.showDisarm || _rebootRequired
313
314 RowLayout {
315 spacing: ScreenTools.defaultFontPixelWidth
316
317 QGCDelayButton {
318 objectName: "mainStatusArmButton"
319 enabled: _armed || (_guidedController.showArm && _guidedController.armReady)
320 text: _armed ? qsTr("Disarm") : qsTr("Arm")
321 visible: _armed ? _guidedController.showDisarm : parametersReady
322
323 onActivated: {
324 _activeVehicle.armed = !_armed
325 mainWindow.closeIndicatorDrawer()
326 }
327 }
328
329 QGCButton {
330 objectName: "mainStatusEmergencyStopButton"
331 text: qsTr("Emergency Stop")
332 backgroundColor: qgcPal.colorRed
333 textColor: qgcPal.accentText
334 fontWeight: Font.Bold
335 visible: _guidedController.showEmergencyStop
336
337 onClicked: {
338 _guidedController.confirmAction(_guidedController.actionEmergencyStop)
339 mainWindow.closeIndicatorDrawer()
340 }
341 }
342
343 QGCDelayButton {
344 text: qsTr("Force Arm")
345 visible: parametersReady && _guidedController.showForceArm
346
347 onActivated: {
348 _activeVehicle.forceArm()
349 mainWindow.closeIndicatorDrawer()
350 }
351 }
352
353 LabelledComboBox {
354 id: primaryLinkCombo
355 Layout.alignment: Qt.AlignTop
356 label: qsTr("Primary Link")
357 alternateText: _primaryLinkName
358 visible: parametersReady && _activeVehicle && _activeVehicle.vehicleLinkManager.linkNames.length > 1
359
360 property var _rgLinkNames: _activeVehicle ? _activeVehicle.vehicleLinkManager.linkNames : [ ]
361 property var _rgLinkStatus: _activeVehicle ? _activeVehicle.vehicleLinkManager.linkStatuses : [ ]
362 property string _primaryLinkName: _activeVehicle ? _activeVehicle.vehicleLinkManager.primaryLinkName : ""
363
364 function updateComboModel() {
365 let linkModel = []
366 for (let i = 0; i < _rgLinkNames.length; i++) {
367 let linkStatus = _rgLinkStatus[i]
368 linkModel.push(_rgLinkNames[i] + (linkStatus === "" ? "" : " " + _rgLinkStatus[i]))
369 }
370 primaryLinkCombo.model = linkModel
371 primaryLinkCombo.currentIndex = -1
372 }
373
374 Component.onCompleted: updateComboModel()
375 on_RgLinkNamesChanged: updateComboModel()
376 on_RgLinkStatusChanged: updateComboModel()
377
378 onActivated: (index) => {
379 _activeVehicle.vehicleLinkManager.primaryLinkName = _rgLinkNames[index]; currentIndex = -1
380 mainWindow.closeIndicatorDrawer()
381 }
382 }
383
384 QGCLabel {
385 Layout.maximumWidth: ScreenTools.defaultFontPixelWidth * 16
386 Layout.maximumHeight: rebootButton.height
387 text: qsTr("Reboot required for changes to take effect")
388 font.pointSize: ScreenTools.smallFontPointSize
389 wrapMode: Text.WordWrap
390 elide: Text.ElideRight
391 horizontalAlignment: Text.AlignRight
392 visible: _rebootRequired && !_armed
393 }
394
395 QGCLabel {
396 objectName: "mainStatusRebootDisarmLabel"
397 Layout.maximumWidth: ScreenTools.defaultFontPixelWidth * 16
398 Layout.maximumHeight: rebootButton.height
399 text: qsTr("Reboot required. Disarm vehicle first.")
400 font.pointSize: ScreenTools.smallFontPointSize
401 wrapMode: Text.WordWrap
402 elide: Text.ElideRight
403 horizontalAlignment: Text.AlignRight
404 visible: _rebootRequired && _armed
405 }
406
407 QGCDelayButton {
408 id: rebootButton
409 objectName: "mainStatusRebootButton"
410 text: qsTr("Reboot Vehicle")
411 visible: _rebootRequired && !_armed
412
413 onActivated: {
414 _activeVehicle.rebootVehicle()
415 mainWindow.closeIndicatorDrawer()
416 }
417 }
418 }
419 }
420
421 RowLayout {
422 Layout.fillWidth: true
423 spacing: ScreenTools.defaultFontPixelWidth
424 visible: _activeVehicle && _activeVehicle.newStableFirmwareVersion !== ""
425
426 QGCLabel {
427 objectName: "mainStatusFirmwareUpdateLabel"
428 text: _activeVehicle ? qsTr("Firmware update available: %1.%2.%3 → %4")
429 .arg(_activeVehicle.firmwareMajorVersion)
430 .arg(_activeVehicle.firmwareMinorVersion)
431 .arg(_activeVehicle.firmwarePatchVersion)
432 .arg(_activeVehicle.newStableFirmwareVersion) : ""
433 }
434
435 QGCButton {
436 objectName: "mainStatusFirmwareUpdateAckButton"
437 small: true
438 text: qsTr("Acknowledge and Hide")
439 visible: _activeVehicle && !_activeVehicle.newStableFirmwareVersionAcknowledged
440 onClicked: _activeVehicle.acknowledgeNewStableFirmwareVersion()
441 }
442 }
443
444 QGCGroupBox {
445 id: statusTabs
446 Layout.fillWidth: true
447 showDividers: false
448 contentSpacing: _spacing
449
450 Component.onCompleted: {
451 if (control._initialTab !== -1) {
452 currentIndex = control._initialTab
453 } else {
454 currentIndex = (_checklistEnabled && !_checklistComplete) ? control.tabChecklist : control.tabStatus
455 }
456 }
457
458 QGCGroupBoxTab {
459 title: qsTr("Pre-Flight Checklist")
460 buttonObjectName: "mainStatusChecklistTab"
461 tabVisible: _checklistEnabled
462 badge: StatusPill {
463 objectName: "mainStatusChecklistTabBadge"
464 text: _checklistComplete ? qsTr("Passed") : qsTr("In Progress")
465 color: _checklistComplete ? QGroundControl.globalPalette.successIndicator : QGroundControl.globalPalette.warningIndicator
466 }
467
468 MainStatusChecklistHost {
469 loader: preVehicleLoader
470 visible: _preVehicleChecklistActive
471 }
472
473 MainStatusChecklistHost {
474 loader: checklistLoader
475 }
476 }
477
478 QGCGroupBoxTab {
479 title: qsTr("Vehicle Messages")
480 buttonObjectName: "mainStatusMessagesTab"
481 badge: SeverityPill {
482 objectName: "mainStatusMessagesTabBadge"
483 errorCount: _activeVehicle ? _activeVehicle.unreadCriticalMessageCount : 0
484 warningCount: _activeVehicle ? _activeVehicle.unreadWarningMessageCount : 0
485 unreadCount: _activeVehicle ? _activeVehicle.unreadMessageCount : 0
486 }
487
488 ColumnLayout {
489 Layout.fillWidth: true
490 spacing: ScreenTools.defaultFontPixelHeight / 4
491
492 RowLayout {
493 Layout.fillWidth: true
494 spacing: ScreenTools.defaultFontPixelWidth / 2
495 visible: !vehicleMessageList.noMessages
496
497 Item { Layout.fillWidth: true }
498
499 QGCButton {
500 objectName: "vehicleMessagesMarkReadButton"
501 small: true
502 text: qsTr("Mark as Read")
503 visible: _activeVehicle && _activeVehicle.hasUnreadMessages
504 onClicked: _activeVehicle.markMessagesRead()
505 }
506
507 QGCButton {
508 objectName: "vehicleMessagesClearButton"
509 small: true
510 text: qsTr("Clear")
511 onClicked: {
512 _activeVehicle.clearMessages()
513 mainWindow.closeIndicatorDrawer()
514 }
515 }
516 }
517
518 VehicleMessageList {
519 id: vehicleMessageList
520 Layout.fillWidth: true
521 visible: !noMessages
522 }
523
524 QGCLabel {
525 text: qsTr("No new vehicle messages")
526 visible: vehicleMessageList.noMessages
527 }
528 }
529 }
530
531 QGCGroupBoxTab {
532 title: qsTr("Overall Status")
533 buttonObjectName: "mainStatusOverallStatusTab"
534 badge: SeverityPill {
535 objectName: "mainStatusOverallStatusTabBadge"
536 errorCount: _healthErrorCount
537 warningCount: _healthWarningCount
538 }
539
540 GridLayout {
541 id: sensorStatusGrid
542 rowSpacing: _spacing
543 columnSpacing: _spacing
544 rows: _activeVehicle.sysStatusSensorInfo.sensorNames.length
545 flow: GridLayout.TopToBottom
546 visible: parametersReady && !_healthAndArmingChecksSupported
547
548 Repeater {
549 model: _activeVehicle.sysStatusSensorInfo.sensorNames
550 QGCLabel { text: modelData }
551 }
552
553 Repeater {
554 model: _activeVehicle.sysStatusSensorInfo.sensorStatus
555 QGCLabel { text: modelData }
556 }
557 }
558
559 ColumnLayout {
560 id: overallStatusList
561 Layout.fillWidth: true
562 spacing: _spacing
563 visible: parametersReady && _healthAndArmingChecksSupported &&
564 _activeVehicle.healthAndArmingCheckReport.problemsForCurrentMode.count > 0
565
566 QGCButton {
567 objectName: "healthChecksAcknowledgeAllButton"
568 Layout.alignment: Qt.AlignRight
569 small: true
570 text: qsTr("Acknowledge All Warnings")
571 visible: _healthWarningCount > 0
572 onClicked: _activeVehicle.healthAndArmingCheckReport.acknowledgeAllWarnings()
573 }
574
575 // List health and arming checks
576 Repeater {
577 model: _activeVehicle ? _activeVehicle.healthAndArmingCheckReport.problemsForCurrentMode : null
578 delegate: listdelegate
579 }
580 }
581
582 QGCLabel {
583 text: parametersReady ? qsTr("No status issues") : qsTr("Waiting for parameters...")
584 visible: !sensorStatusGrid.visible && !overallStatusList.visible
585 }
586 }
587 }
588
589 Component {
590 id: listdelegate
591
592 ColumnLayout {
593 Layout.fillWidth: true
594 spacing: 0
595
596 RowLayout {
597 Layout.fillWidth: true
598 spacing: ScreenTools.defaultFontPixelHeight
599
600 QGCLabel {
601 id: message
602 Layout.fillWidth: true
603 text: object.message
604 textFormat: TextEdit.RichText
605 wrapMode: Text.WordWrap
606 color: object.severity == 'error' ? qgcPal.errorText : (object.severity == 'warning' && !object.acknowledged) ? qgcPal.warningText : qgcPal.textPrimary
607 opacity: object.acknowledged ? 0.6 : 1
608 MouseArea {
609 anchors.fill: parent
610 onClicked: {
611 if (object.description != "")
612 object.expanded = !object.expanded
613 }
614 }
615 }
616
617 QGCLabel {
618 Layout.alignment: Qt.AlignVCenter
619 text: qsTr("Acknowledged")
620 font.pointSize: ScreenTools.smallFontPointSize
621 opacity: 0.6
622 visible: object.acknowledged
623 }
624
625 QGCColoredImage {
626 id: arrowDownIndicator
627 Layout.alignment: Qt.AlignVCenter
628 Layout.preferredHeight: 1.5 * ScreenTools.defaultFontPixelWidth
629 Layout.preferredWidth: Layout.preferredHeight
630 source: "/qmlimages/arrow-down.png"
631 color: qgcPal.textPrimary
632 visible: object.description != ""
633 MouseArea {
634 anchors.fill: parent
635 onClicked: object.expanded = !object.expanded
636 }
637 }
638 }
639
640 QGCLabel {
641 id: description
642 Layout.fillWidth: true
643 text: object.description
644 textFormat: TextEdit.RichText
645 wrapMode: Text.WordWrap
646 clip: true
647 visible: object.expanded
648
649 property var fact: null
650
651 onLinkActivated: (link) => {
652 if (link.startsWith('param://')) {
653 var paramName = link.substr(8);
654 fact = controller.getParameterFact(-1, paramName, true)
655 if (fact != null) {
656 paramEditorDialogFactory.open()
657 }
658 } else {
659 Qt.openUrlExternally(link);
660 }
661 }
662
663 FactPanelController {
664 id: controller
665 }
666
667 QGCPopupDialogFactory {
668 id: paramEditorDialogFactory
669
670 dialogComponent: paramEditorDialogComponent
671 }
672
673 Component {
674 id: paramEditorDialogComponent
675
676 ParameterEditorDialog {
677 title: qsTr("Edit Parameter")
678 fact: description.fact
679 destroyOnClose: true
680 }
681 }
682 }
683 }
684 }
685 }
686 }
687}