QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleConfigView.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7
8Rectangle {
9 id: vehicleConfigView
10 objectName: "vehicleConfig_root"
11 color: qgcPal.window
12 z: QGroundControl.zOrderTopMost
13
14 // This need to block click event leakage to underlying map.
15 DeadMouseArea {
16 anchors.fill: parent
17 }
18
19 QGCPalette { id: qgcPal; colorGroupEnabled: true }
20
21 readonly property real _defaultTextHeight: ScreenTools.defaultFontPixelHeight
22 readonly property real _defaultTextWidth: ScreenTools.defaultFontPixelWidth
23 readonly property real _horizontalMargin: _defaultTextWidth / 2
24 readonly property real _verticalMargin: _defaultTextHeight / 2
25 readonly property real _buttonWidth: _defaultTextWidth * 18
26 readonly property string _armedVehicleText: qsTr("This operation cannot be performed while the vehicle is armed.")
27
28 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
29 property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : false
30 property string _messagePanelText: qsTr("missing message panel text")
31 property bool _fullParameterVehicleAvailable: _activeVehicle && QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable && !_activeVehicle.parameterManager.missingParameters
32 property var _corePlugin: QGroundControl.corePlugin
33
34 // Tree view state
35 property int _selectedComponentIndex: -1 // -1 = summary or special button
36 property int _selectedSectionIndex: -1
37 property string _selectedSpecial: "" // "summary", "parameters", "firmware", "opticalflow"
38 property bool _showingPrereqMessage: false // Panel area shows prerequisite message instead of selected component
39 property var _expandedComponents: ({})
40 property int _expandedRevision: 0
41 property string _searchQuery: ""
42 property real _fullListWidth: 0 // Button column width with no search active
43
44 Binding on _fullListWidth {
45 when: vehicleConfigView._searchQuery.trim() === ""
46 value: buttonColumn.implicitWidth
47 restoreMode: Binding.RestoreNone
48 }
49
50 function _setExpanded(compIndex, value) {
51 _expandedComponents[compIndex] = value
52 _expandedRevision++
53 }
54
55 function _isExpanded(compIndex) {
56 void _expandedRevision
57 return !!_expandedComponents[compIndex]
58 }
59
60 /// Translated display name for a section ID. JSON-driven components translate via the JSON
61 /// filename context; hand-coded components provide sectionDisplayName().
62 function _sectionDisplayName(component, sectionId) {
63 let context = _translationContext(component)
64 if (context) {
65 return qsTranslate(context, sectionId)
66 }
67 if (component && typeof component.sectionDisplayName === "function") {
68 return component.sectionDisplayName(sectionId)
69 }
70 return sectionId
71 }
72
73 /// Get the section ID for a sidebar entry.
74 function _sectionId(compIndex, sectionIndex) {
75 if (sectionIndex < 0 || !_fullParameterVehicleAvailable) return ""
76 var components = _activeVehicle.autopilotPlugin.vehicleComponents
77 if (compIndex < 0 || compIndex >= components.length) return ""
78 var secs = components[compIndex].sectionIds
79 if (sectionIndex < secs.length) return secs[sectionIndex]
80 return ""
81 }
82
83 /// Extract the translation context (JSON filename) from a component.
84 function _translationContext(component) {
85 if (!component || !component.vehicleConfigJson) return ""
86 var path = component.vehicleConfigJson.toString()
87 var slash = path.lastIndexOf("/")
88 return slash >= 0 ? path.substring(slash + 1) : path
89 }
90
91 function _componentMatchesSearch(component) {
92 if (_searchQuery.trim() === "") return true
93 var query = _searchQuery.toLowerCase().trim()
94 if (component.name.toLowerCase().indexOf(query) !== -1) return true
95 var context = _translationContext(component)
96 var secs = component.sectionIds
97 if (secs) {
98 for (var i = 0; i < secs.length; i++) {
99 if (secs[i].toLowerCase().indexOf(query) !== -1) return true
100 let displayName = _sectionDisplayName(component, secs[i])
101 if (displayName !== secs[i] && displayName.toLowerCase().indexOf(query) !== -1) {
102 return true
103 }
104 }
105 }
106 var keywords = component.sectionKeywords
107 if (keywords) {
108 for (var key in keywords) {
109 var terms = keywords[key]
110 for (var j = 0; j < terms.length; j++) {
111 if (terms[j].toLowerCase().indexOf(query) !== -1) return true
112 if (context && qsTranslate(context, terms[j]).toLowerCase().indexOf(query) !== -1) return true
113 }
114 }
115 }
116 var componentKeywords = component.searchKeywords
117 if (componentKeywords) {
118 for (var k = 0; k < componentKeywords.length; k++) {
119 if (componentKeywords[k].toLowerCase().indexOf(query) !== -1) {
120 return true
121 }
122 }
123 }
124 return false
125 }
126
127 function _sectionMatchesSearch(component, sectionId) {
128 if (_searchQuery.trim() === "") return true
129 var query = _searchQuery.toLowerCase().trim()
130 if (sectionId.toLowerCase().indexOf(query) !== -1) return true
131 var context = _translationContext(component)
132 let displayName = _sectionDisplayName(component, sectionId)
133 if (displayName !== sectionId && displayName.toLowerCase().indexOf(query) !== -1) {
134 return true
135 }
136 var keywords = component.sectionKeywords
137 if (keywords && keywords[sectionId]) {
138 var terms = keywords[sectionId]
139 for (var i = 0; i < terms.length; i++) {
140 if (terms[i].toLowerCase().indexOf(query) !== -1) return true
141 if (context && qsTranslate(context, terms[i]).toLowerCase().indexOf(query) !== -1) return true
142 }
143 }
144 return false
145 }
146
147 function _componentVisible(component) {
148 if (!component || component.setupSource.toString() === "") {
149 return false
150 }
151 return _searchQuery.trim() === "" || _componentMatchesSearch(component)
152 }
153
154 function _anyComponentVisible() {
155 if (!_fullParameterVehicleAvailable) {
156 return false
157 }
158 return _activeVehicle.autopilotPlugin.vehicleComponents.some(_componentVisible)
159 }
160
161 function showSummaryPanel() {
162 if (mainWindow.allowViewSwitch()) {
163 _showSummaryPanel()
164 }
165 }
166
167 function _showSummaryPanel() {
168 _selectedSpecial = "summary"
169 _selectedComponentIndex = -1
170 _selectedSectionIndex = -1
171 if (_fullParameterVehicleAvailable) {
172 if (_activeVehicle.autopilotPlugin.vehicleComponents.length === 0) {
173 panelLoader.setSourceComponent(noComponentsVehicleSummaryComponent)
174 } else {
175 panelLoader.setSource("qrc:/qml/QGroundControl/VehicleSetup/VehicleSummary.qml")
176 }
177 } else if (QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable) {
178 panelLoader.setSourceComponent(missingParametersVehicleSummaryComponent)
179 } else {
180 panelLoader.setSourceComponent(disconnectedVehicleAndParamsSummaryComponent)
181 }
182 }
183
184 function showPanel(specialName, qmlSource) {
185 if (mainWindow.allowViewSwitch()) {
186 _selectedSpecial = specialName
187 _selectedComponentIndex = -1
188 _selectedSectionIndex = -1
189 panelLoader.setSource(qmlSource)
190 }
191 }
192
193 function _navigateToComponent(compIndex, sectionIndex) {
194 if (!mainWindow.allowViewSwitch()) return
195 if (!_fullParameterVehicleAvailable) return
196
197 var components = _activeVehicle.autopilotPlugin.vehicleComponents
198 if (compIndex < 0 || compIndex >= components.length) return
199 var vehicleComponent = components[compIndex]
200
201 _selectedSpecial = ""
202
203 // If component opts in and root was clicked, auto-select first section
204 if (sectionIndex < 0 && vehicleComponent.showFirstSectionOnRootClick && vehicleComponent.sectionIds.length > 0) {
205 sectionIndex = 0
206 }
207 _selectedSectionIndex = sectionIndex
208
209 var autopilotPlugin = _activeVehicle.autopilotPlugin
210 var prereq = autopilotPlugin.prerequisiteSetup(vehicleComponent)
211 if (prereq !== "") {
212 // Selection state still updates so the tree expands and highlights
213 // normally; only the panel area shows the prerequisite message
214 _selectedComponentIndex = compIndex
215 _showingPrereqMessage = true
216 _messagePanelText = qsTr("%1 setup must be completed prior to %2 setup.").arg(prereq).arg(vehicleComponent.name)
217 panelLoader.setSourceComponent(messagePanelComponent)
218 return
219 }
220
221 if (_selectedComponentIndex !== compIndex || _showingPrereqMessage) {
222 _selectedComponentIndex = compIndex
223 _showingPrereqMessage = false
224 panelLoader.setSource(vehicleComponent.setupSource, vehicleComponent)
225 }
226
227 // Apply section filter
228 if (panelLoader.item && typeof panelLoader.item.sectionIdFilter !== "undefined") {
229 panelLoader.item.sectionIdFilter = _sectionId(compIndex, sectionIndex)
230 }
231 }
232
233 function showParametersPanel() {
234 showPanel("parameters", "qrc:/qml/QGroundControl/VehicleSetup/SetupParameterEditor.qml")
235 }
236
237 function showVehicleComponentPanel(vehicleComponent) {
238 if (!mainWindow.allowViewSwitch()) return
239 if (!_fullParameterVehicleAvailable) return
240
241 var components = _activeVehicle.autopilotPlugin.vehicleComponents
242 for (var i = 0; i < components.length; i++) {
243 if (components[i] === vehicleComponent) {
244 _navigateToComponent(i, -1)
245 return
246 }
247 }
248 }
249
250 Component.onCompleted: _showSummaryPanel()
251
252 Connections {
253 target: QGroundControl.corePlugin
254 function onShowAdvancedUIChanged(showAdvancedUI) {
255 if (!showAdvancedUI) {
256 _showSummaryPanel()
257 }
258 }
259 }
260
261 Connections {
262 target: QGroundControl.multiVehicleManager
263 function onParameterReadyVehicleAvailableChanged(parametersReady) {
264 if (parametersReady || _selectedSpecial === "summary" || _selectedSpecial !== "firmware") {
265 _showSummaryPanel()
266 }
267 }
268 }
269
270 Connections {
271 target: panelLoader
272 function onLoaded() {
273 if (panelLoader.item && typeof panelLoader.item.sectionIdFilter !== "undefined") {
274 panelLoader.item.sectionIdFilter = _sectionId(_selectedComponentIndex, _selectedSectionIndex)
275 }
276 }
277 }
278
279 Connections {
280 target: panelLoader.item
281 ignoreUnknownSignals: true
282
283 function onComponentRequested(vehicleComponent) {
284 showVehicleComponentPanel(vehicleComponent)
285 }
286 }
287
288 Component {
289 id: noComponentsVehicleSummaryComponent
290 Rectangle {
291 color: qgcPal.windowCard
292 QGCLabel {
293 anchors.margins: _defaultTextWidth * 2
294 anchors.fill: parent
295 verticalAlignment: Text.AlignVCenter
296 horizontalAlignment: Text.AlignHCenter
297 wrapMode: Text.WordWrap
298 font.pointSize: ScreenTools.mediumFontPointSize
299 text: qsTr("%1 does not currently support configuration of your vehicle. ").arg(QGroundControl.appName) +
300 "If your vehicle is already configured you can still Fly."
301 }
302 }
303 }
304
305 Component {
306 id: disconnectedVehicleAndParamsSummaryComponent
307 Rectangle {
308 id: disconnectedRect
309 color: qgcPal.windowCard
310 Column {
311 anchors.centerIn: parent
312 spacing: ScreenTools.defaultFontPixelHeight
313 QGCLabel {
314 anchors.horizontalCenter: parent.horizontalCenter
315 width: disconnectedRect.width - _defaultTextWidth * 4
316 horizontalAlignment: Text.AlignHCenter
317 wrapMode: Text.WordWrap
318 font.pointSize: ScreenTools.largeFontPointSize
319 text: !_activeVehicle
320 ? qsTr("Vehicle configuration pages will display after you connect your vehicle and parameters have been downloaded.")
321 : (_activeVehicle.parameterManager.parameterDownloadSkipped
322 ? qsTr("Parameter download was skipped because the vehicle is armed. Configuration pages will be available after parameters are downloaded.")
323 : qsTr("Waiting for vehicle parameters to download…"))
324 }
325 QGCButton {
326 anchors.horizontalCenter: parent.horizontalCenter
327 text: qsTr("Download Parameters")
328 visible: _activeVehicle && _activeVehicle.parameterManager.parameterDownloadSkipped
329 enabled: _activeVehicle && _activeVehicle.parameterManager.parameterDownloadSkipped && _activeVehicle.parameterManager.loadProgress === 0
330 onClicked: _activeVehicle.parameterManager.refreshAllParameters()
331 }
332 }
333 }
334 }
335
336 Component {
337 id: missingParametersVehicleSummaryComponent
338
339 Rectangle {
340 color: qgcPal.windowCard
341
342 QGCLabel {
343 anchors.margins: _defaultTextWidth * 2
344 anchors.fill: parent
345 verticalAlignment: Text.AlignVCenter
346 horizontalAlignment: Text.AlignHCenter
347 wrapMode: Text.WordWrap
348 font.pointSize: ScreenTools.mediumFontPointSize
349 text: qsTr("Vehicle did not return the full parameter list. ") +
350 qsTr("As a result, the configuration pages are not available.")
351 }
352 }
353 }
354
355 Component {
356 id: messagePanelComponent
357
358 Item {
359 objectName: "vehicleConfig_messagePanel"
360
361 QGCLabel {
362 anchors.margins: _defaultTextWidth * 2
363 anchors.fill: parent
364 verticalAlignment: Text.AlignVCenter
365 horizontalAlignment: Text.AlignHCenter
366 wrapMode: Text.WordWrap
367 font.pointSize: ScreenTools.mediumFontPointSize
368 text: _messagePanelText
369 }
370 }
371 }
372
373 Rectangle {
374 anchors.fill: leftPanel
375 anchors.margins: -_horizontalMargin * 2
376 color: qgcPal.windowPanel
377 border.color: qgcPal.borderSubtle
378 radius: ScreenTools.defaultBorderRadius
379 }
380
381 ColumnLayout {
382 id: leftPanel
383 width: Math.max(buttonColumn.implicitWidth, _fullListWidth, ScreenTools.isMobile ? 0 : ScreenTools.defaultFontPixelWidth * 22)
384 anchors.topMargin: _verticalMargin * 1.5
385 anchors.bottomMargin: _verticalMargin * 1.5
386 anchors.top: parent.top
387 anchors.bottom: parent.bottom
388 anchors.leftMargin: _horizontalMargin * 3
389 anchors.left: parent.left
390 spacing: _verticalMargin / 2
391
392 QGCTextField {
393 id: searchField
394 objectName: "vehicleConfig_searchField"
395 Layout.fillWidth: true
396 placeholderText: qsTr("Search configuration...")
397 visible: _fullParameterVehicleAvailable
398
399 onTextChanged: {
400 vehicleConfigView._searchQuery = text
401 }
402 }
403
404 QGCFlickable {
405 objectName: "vehicleConfig_sidebarFlickable"
406 Layout.fillWidth: true
407 Layout.fillHeight: true
408 contentHeight: buttonColumn.height + _verticalMargin
409 flickableDirection: Flickable.VerticalFlick
410 clip: true
411
412 ColumnLayout {
413 id: buttonColumn
414 width: parent.width
415 spacing: 0
416
417 // Summary button
418 ConfigButton {
419 id: summaryButton
420 objectName: "vehicleConfig_summary"
421 icon.source: "/qmlimages/VehicleSummaryIcon.png"
422 checked: vehicleConfigView._selectedSpecial === "summary"
423 text: qsTr("Overview")
424 Layout.fillWidth: true
425 visible: vehicleConfigView._searchQuery.trim() === ""
426
427 onClicked: showSummaryPanel()
428 }
429
430 // When the component group is empty only this divider shows, not the second one
431 SidebarDivider {
432 objectName: "vehicleConfig_summaryDivider"
433 visible: summaryButton.visible &&
434 (vehicleConfigView._anyComponentVisible() || opticalFlowButton.visible ||
435 parametersButton.visible || firmwareButton.visible)
436 }
437
438 // Vehicle component tree
439 Repeater {
440 id: componentRepeater
441 model: _fullParameterVehicleAvailable ? _activeVehicle.autopilotPlugin.vehicleComponents : 0
442
443 ColumnLayout {
444 id: compColumn
445 spacing: 0
446 Layout.fillWidth: true
447
448 required property int index
449 required property var modelData
450
451 property var comp: modelData
452 property string compName: comp ? comp.name : ""
453 property var compSectionIds: comp ? comp.sectionIds : []
454 property bool isSelected: vehicleConfigView._selectedComponentIndex === index && vehicleConfigView._selectedSpecial === ""
455 property bool hasSections: compSectionIds.length > 1
456 property bool isSearching: vehicleConfigView._searchQuery.trim() !== ""
457 property bool matchesSearch: comp ? vehicleConfigView._componentMatchesSearch(comp) : false
458 property bool isExpanded: hasSections && (isSearching ? matchesSearch : vehicleConfigView._isExpanded(index))
459
460 visible: vehicleConfigView._componentVisible(comp)
461
462 ConfigButton {
463 Layout.fillWidth: true
464 objectName: "vehicleConfig_comp_" + compColumn.compName.replace(/ /g, "")
465 icon.source: compColumn.comp ? compColumn.comp.iconResource : ""
466 setupComplete: compColumn.comp ? compColumn.comp.setupComplete : true
467 text: compColumn.compName
468 expandable: compColumn.hasSections
469 expanded: compColumn.isExpanded
470 checked: compColumn.isSelected && vehicleConfigView._selectedSectionIndex === -1
471
472 onClicked: {
473 // Only a click on the already-selected component collapses it
474 const wasSelected = compColumn.isSelected
475 vehicleConfigView._navigateToComponent(compColumn.index, -1)
476 if (compColumn.hasSections) {
477 if (wasSelected && compColumn.isExpanded) {
478 vehicleConfigView._setExpanded(compColumn.index, false)
479 } else if (!compColumn.isExpanded) {
480 vehicleConfigView._setExpanded(compColumn.index, true)
481 }
482 }
483 }
484
485 onToggleExpand: {
486 if (!mainWindow.allowViewSwitch()) return
487 var expanding = !compColumn.isExpanded
488 vehicleConfigView._setExpanded(compColumn.index, expanding)
489 if (!expanding && compColumn.isSelected) {
490 vehicleConfigView._navigateToComponent(compColumn.index, -1)
491 }
492 }
493 }
494
495 // Section sub-items
496 Repeater {
497 model: compColumn.isExpanded ? compColumn.compSectionIds : []
498
499 Button {
500 id: sectionBtn
501 objectName: "vehicleConfig_section_" + modelData.replace(/ /g, "")
502 Layout.fillWidth: true
503 padding: ScreenTools.defaultFontPixelWidth * 0.75
504 leftPadding: ScreenTools.defaultFontPixelWidth
505 hoverEnabled: !ScreenTools.isMobile
506
507 property int sectionIndex: index
508 property bool sectionChecked: compColumn.isSelected && vehicleConfigView._selectedSectionIndex === sectionIndex
509 property bool sectionSetupComplete: {
510 if (!compColumn.comp) {
511 return true
512 }
513 // Referencing comp.setupComplete re-evaluates this binding whenever a
514 // setup trigger parameter changes, since sectionSetupComplete() is a
515 // plain function call which QML cannot otherwise track
516 void compColumn.comp.setupComplete
517 return typeof compColumn.comp.sectionSetupComplete === "function"
518 ? compColumn.comp.sectionSetupComplete(modelData)
519 : true
520 }
521 property bool sectionMatchesSearch: {
522 if (!compColumn.isSearching) return true
523 return vehicleConfigView._sectionMatchesSearch(compColumn.comp, modelData)
524 }
525 property bool sectionContentVisible: {
526 if (!compColumn.isSelected) return true
527 if (!panelLoader.item) return true
528 if (typeof panelLoader.item.sectionVisible !== "function") return true
529 return panelLoader.item.sectionVisible(modelData)
530 }
531 property color textColor: qgcPal.textPrimary
532 visible: sectionMatchesSearch && sectionContentVisible
533
534 background: Rectangle {
535 color: sectionBtn.sectionChecked || sectionBtn.pressed ? qgcPal.accentSubtle : (sectionBtn.enabled && sectionBtn.hovered ? qgcPal.windowCard : "transparent")
536 border.width: sectionBtn.sectionChecked || sectionBtn.pressed ? 1 : 0
537 border.color: qgcPal.accent
538 radius: ScreenTools.defaultFontPixelWidth / 2
539 }
540
541 contentItem: RowLayout {
542 spacing: ScreenTools.defaultFontPixelWidth * 0.5
543
544 Rectangle {
545 width: ScreenTools.defaultFontPixelWidth
546 height: width
547 radius: width / 2
548 color: sectionBtn.sectionSetupComplete ? qgcPal.colorGreen : qgcPal.colorOrange
549 visible: !sectionBtn.sectionSetupComplete
550 }
551
552 QGCLabel {
553 text: vehicleConfigView._sectionDisplayName(compColumn.comp, modelData)
554 color: sectionBtn.textColor
555 font.pointSize: ScreenTools.defaultFontPointSize * 0.9
556 horizontalAlignment: Text.AlignLeft
557 Layout.fillWidth: true
558 }
559 }
560
561 onClicked: {
562 vehicleConfigView._navigateToComponent(compColumn.index, sectionIndex)
563 }
564 }
565 }
566 }
567 }
568
569 // Optical Flow (special)
570 ConfigButton {
571 id: opticalFlowButton
572 visible: _activeVehicle ? _activeVehicle.flowImageIndex > 0 : false
573 text: qsTr("Optical Flow")
574 Layout.fillWidth: true
575 checked: vehicleConfigView._selectedSpecial === "opticalflow"
576 onClicked: showPanel("opticalflow", "qrc:/qml/QGroundControl/VehicleSetup/OpticalFlowSensor.qml")
577 }
578
579 SidebarDivider {
580 objectName: "vehicleConfig_componentsDivider"
581 visible: (vehicleConfigView._anyComponentVisible() || opticalFlowButton.visible) &&
582 (parametersButton.visible || firmwareButton.visible)
583 }
584
585 ConfigButton {
586 id: parametersButton
587 objectName: "vehicleConfig_parametersButton"
588 visible: QGroundControl.multiVehicleManager.parameterReadyVehicleAvailable &&
589 !_activeVehicle.usingHighLatencyLink &&
590 _corePlugin.showAdvancedUI &&
591 vehicleConfigView._searchQuery.trim() === ""
592 text: qsTr("Parameters")
593 Layout.fillWidth: true
594 icon.source: "/qmlimages/subMenuButtonImage.png"
595 checked: vehicleConfigView._selectedSpecial === "parameters"
596 onClicked: showPanel("parameters", "qrc:/qml/QGroundControl/VehicleSetup/SetupParameterEditor.qml")
597 }
598
599 ConfigButton {
600 id: firmwareButton
601 objectName: "vehicleConfig_firmwareButton"
602 icon.source: "/qmlimages/FirmwareUpgradeIcon.png"
603 visible: !ScreenTools.isMobile && _corePlugin.options.showFirmwareUpgrade &&
604 vehicleConfigView._searchQuery.trim() === ""
605 text: qsTr("Firmware")
606 Layout.fillWidth: true
607 checked: vehicleConfigView._selectedSpecial === "firmware"
608
609 onClicked: showPanel("firmware", "qrc:/qml/QGroundControl/VehicleSetup/FirmwareUpgrade.qml")
610 }
611 }
612 }
613 }
614
615 Loader {
616 id: panelLoader
617 objectName: "vehicleConfig_panelLoader"
618 anchors.topMargin: _verticalMargin
619 anchors.bottomMargin: _verticalMargin
620 anchors.leftMargin: _horizontalMargin * 4
621 anchors.rightMargin: _horizontalMargin
622 anchors.left: leftPanel.right
623 anchors.right: parent.right
624 anchors.top: parent.top
625 anchors.bottom: parent.bottom
626
627 function setSource(source, vehicleComponent) {
628 panelLoader.source = ""
629 panelLoader.vehicleComponent = vehicleComponent
630 panelLoader.source = source
631 }
632
633 function setSourceComponent(sourceComponent, vehicleComponent) {
634 panelLoader.sourceComponent = undefined
635 panelLoader.vehicleComponent = vehicleComponent
636 panelLoader.sourceComponent = sourceComponent
637 }
638
639 property var vehicleComponent
640 }
641}