FlightDisplayView.qml 26.4 KB
Newer Older
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
9 10


11 12
import QtQuick                  2.3
import QtQuick.Controls         1.2
13
import QtQuick.Controls.Styles  1.4
14
import QtQuick.Dialogs          1.2
15 16 17
import QtLocation               5.3
import QtPositioning            5.3
import QtMultimedia             5.5
18
import QtQuick.Layouts          1.2
Patrick José Pereira's avatar
Patrick José Pereira committed
19
import QtQuick.Window           2.2
20

21
import QGroundControl               1.0
Don Gagne's avatar
Don Gagne committed
22
import QGroundControl.FlightDisplay 1.0
23 24 25 26
import QGroundControl.FlightMap     1.0
import QGroundControl.ScreenTools   1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
27
import QGroundControl.Vehicle       1.0
28
import QGroundControl.Controllers   1.0
Don Gagne's avatar
Don Gagne committed
29
import QGroundControl.FactSystem    1.0
30 31

/// Flight Display View
32 33 34
QGCView {
    id:             root
    viewPanel:      _panel
35

36
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
37

Don Gagne's avatar
Don Gagne committed
38 39
    property alias  guidedController:   guidedActionsController

40 41
    property bool activeVehicleJoystickEnabled: _activeVehicle ? _activeVehicle.joystickEnabled : false

42 43 44 45 46 47 48 49 50
    property var    _planMasterController:  masterController
    property var    _missionController:     _planMasterController.missionController
    property var    _geoFenceController:    _planMasterController.geoFenceController
    property var    _rallyPointController:  _planMasterController.rallyPointController
    property var    _activeVehicle:         QGroundControl.multiVehicleManager.activeVehicle
    property bool   _mainIsMap:             QGroundControl.videoManager.hasVideo ? QGroundControl.loadBoolGlobalSetting(_mainIsMapKey,  true) : true
    property bool   _isPipVisible:          QGroundControl.videoManager.hasVideo ? QGroundControl.loadBoolGlobalSetting(_PIPVisibleKey, true) : false
    property real   _savedZoomLevel:        0
    property real   _margins:               ScreenTools.defaultFontPixelWidth / 2
51
    property real   _pipSize:               flightView.width * 0.2
52 53
    property alias  _guidedController:      guidedActionsController
    property alias  _altitudeSlider:        altitudeSlider
54

55

56 57
    readonly property var       _dynamicCameras:        _activeVehicle ? _activeVehicle.dynamicCameras : null
    readonly property bool      _isCamera:              _dynamicCameras ? _dynamicCameras.cameras.count > 0 : false
Don Gagne's avatar
Don Gagne committed
58 59 60 61 62 63 64 65 66 67 68 69
    readonly property bool      isBackgroundDark:       _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true
    readonly property real      _defaultRoll:           0
    readonly property real      _defaultPitch:          0
    readonly property real      _defaultHeading:        0
    readonly property real      _defaultAltitudeAMSL:   0
    readonly property real      _defaultGroundSpeed:    0
    readonly property real      _defaultAirSpeed:       0
    readonly property string    _mapName:               "FlightDisplayView"
    readonly property string    _showMapBackgroundKey:  "/showMapBackground"
    readonly property string    _mainIsMapKey:          "MainFlyWindowIsMap"
    readonly property string    _PIPVisibleKey:         "IsPIPVisible"

70
    function setStates() {
71
        QGroundControl.saveBoolGlobalSetting(_mainIsMapKey, _mainIsMap)
72
        if(_mainIsMap) {
73 74 75 76 77 78 79 80
            //-- Adjust Margins
            _flightMapContainer.state   = "fullMode"
            _flightVideo.state          = "pipMode"
            //-- Save/Restore Map Zoom Level
            if(_savedZoomLevel != 0)
                _flightMap.zoomLevel = _savedZoomLevel
            else
                _savedZoomLevel = _flightMap.zoomLevel
81
        } else {
82 83 84 85 86 87
            //-- Adjust Margins
            _flightMapContainer.state   = "pipMode"
            _flightVideo.state          = "fullMode"
            //-- Set Map Zoom Level
            _savedZoomLevel = _flightMap.zoomLevel
            _flightMap.zoomLevel = _savedZoomLevel - 3
88
        }
Don Gagne's avatar
Don Gagne committed
89 90
    }

91 92 93
    function setPipVisibility(state) {
        _isPipVisible = state;
        QGroundControl.saveBoolGlobalSetting(_PIPVisibleKey, state)
94 95
    }

96
    PlanMasterController {
97
        id:                     masterController
98
        Component.onCompleted:  start(false /* editMode */)
99 100
    }

101
    Connections {
102 103 104
        target:                     _missionController
        onResumeMissionReady:       guidedActionsController.confirmAction(guidedActionsController.actionResumeMissionReady)
        onResumeMissionUploadFail:  guidedActionsController.confirmAction(guidedActionsController.actionResumeMissionUploadFail)
105 106
    }

107 108
    Component.onCompleted: {
        setStates()
109 110 111
        if(QGroundControl.corePlugin.options.flyViewOverlay.toString().length) {
            flyViewOverlay.source = QGroundControl.corePlugin.options.flyViewOverlay
        }
112
    }
dogmaphobic's avatar
dogmaphobic committed
113

114 115 116 117 118 119 120 121 122 123 124 125 126 127
    // The following code is used to track vehicle states such that we prompt to remove mission from vehicle when mission completes

    property bool vehicleArmed:                 _activeVehicle ? _activeVehicle.armed : true // true here prevents pop up from showing during shutdown
    property bool vehicleWasArmed:              false
    property bool vehicleInMissionFlightMode:   _activeVehicle ? (_activeVehicle.flightMode === _activeVehicle.missionFlightMode) : false
    property bool promptForMissionRemove:       false

    onVehicleArmedChanged: {
        if (vehicleArmed) {
            if (!promptForMissionRemove) {
                promptForMissionRemove = vehicleInMissionFlightMode
                vehicleWasArmed = true
            }
        } else {
128
            if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) {
129 130 131 132
                // ArduPilot has a strange bug which prevents mission clear from working at certain times, so we can't show this dialog
                if (!_activeVehicle.apmFirmware) {
                    root.showDialog(missionCompleteDialogComponent, qsTr("Flight Plan complete"), showDialogDefaultWidth, StandardButton.Close)
                }
133 134 135 136 137 138 139 140 141 142 143 144
            }
            promptForMissionRemove = false
        }
    }

    onVehicleInMissionFlightModeChanged: {
        if (!promptForMissionRemove && vehicleArmed) {
            promptForMissionRemove = true
        }
    }

    Component {
145 146 147 148 149 150 151
        id: missionCompleteDialogComponent

        QGCViewDialog {
            QGCFlickable {
                anchors.fill:   parent
                contentHeight:  column.height

152
                ColumnLayout {
153 154 155 156 157 158 159
                    id:                 column
                    anchors.margins:    _margins
                    anchors.left:       parent.left
                    anchors.right:      parent.right
                    spacing:            ScreenTools.defaultFontPixelHeight

                    QGCLabel {
160 161 162 163
                        Layout.fillWidth:       true
                        text:                   qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
                        horizontalAlignment:    Text.AlignHCenter
                        visible:                _activeVehicle.cameraTriggerPoints.count != 0
164 165 166
                    }

                    QGCButton {
167 168
                        Layout.fillWidth:   true
                        text:               qsTr("Remove plan from vehicle")
169 170 171 172 173
                        onClicked: {
                            _planMasterController.removeAllFromVehicle()
                            hideDialog()
                        }
                    }
174 175 176 177 178 179 180

                    QGCButton {
                        Layout.fillWidth:   true
                        text:               qsTr("Leave plan on vehicle")
                        anchors.horizontalCenter:   parent.horizontalCenter
                        onClicked:                  hideDialog()
                    }
181
                }
182 183 184 185
            }
        }
    }

Patrick José Pereira's avatar
Patrick José Pereira committed
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
    Window {
        id:             videoWindow
        width:          !_mainIsMap ? _panel.width  : _pipSize
        height:         !_mainIsMap ? _panel.height : _pipSize * (9/16)
        visible:        false

        Item {
            id:             videoItem
            anchors.fill:   parent
        }

        onClosing: {
            _flightVideo.state = "unpopup"
            videoWindow.visible = false
        }

    }

204 205
    QGCMapPalette { id: mapPal; lightColors: _mainIsMap ? _flightMap.isSatelliteMap : true }

206 207 208 209 210 211 212 213 214 215 216 217
    QGCViewPanel {
        id:             _panel
        anchors.fill:   parent

        //-- Map View
        //   For whatever reason, if FlightDisplayViewMap is the _panel item, changing
        //   width/height has no effect.
        Item {
            id: _flightMapContainer
            z:  _mainIsMap ? _panel.z + 1 : _panel.z + 2
            anchors.left:   _panel.left
            anchors.bottom: _panel.bottom
218
            visible:        _mainIsMap || _isPipVisible && !QGroundControl.videoManager.fullScreen
219 220
            width:          _mainIsMap ? _panel.width  : _pipSize
            height:         _mainIsMap ? _panel.height : _pipSize * (9/16)
221 222 223 224 225 226 227 228 229 230 231 232 233 234
            states: [
                State {
                    name:   "pipMode"
                    PropertyChanges {
                        target:             _flightMapContainer
                        anchors.margins:    ScreenTools.defaultFontPixelHeight
                    }
                },
                State {
                    name:   "fullMode"
                    PropertyChanges {
                        target:             _flightMapContainer
                        anchors.margins:    0
                    }
235
                }
236 237
            ]
            FlightDisplayViewMap {
238 239
                id:                         _flightMap
                anchors.fill:               parent
240
                planMasterController:       masterController
241 242 243 244
                guidedActionsController:    _guidedController
                flightWidgets:              flightDisplayViewWidgets
                rightPanelWidth:            ScreenTools.defaultFontPixelHeight * 9
                qgcView:                    root
245
                multiVehicleView:           !singleVehicleView.checked
246
                scaleState:                 (_mainIsMap && flyViewOverlay.item) ? (flyViewOverlay.item.scaleState ? flyViewOverlay.item.scaleState : "bottomMode") : "bottomMode"
247
            }
248
        }
249

250
        //-- Video View
251
        Item {
252 253
            id:             _flightVideo
            z:              _mainIsMap ? _panel.z + 2 : _panel.z + 1
254 255
            width:          !_mainIsMap ? _panel.width  : _pipSize
            height:         !_mainIsMap ? _panel.height : _pipSize * (9/16)
256 257
            anchors.left:   _panel.left
            anchors.bottom: _panel.bottom
258
            visible:        QGroundControl.videoManager.hasVideo && (!_mainIsMap || _isPipVisible)
259 260 261 262 263
            states: [
                State {
                    name:   "pipMode"
                    PropertyChanges {
                        target: _flightVideo
Patrick José Pereira's avatar
Patrick José Pereira committed
264 265 266 267 268
                        anchors.margins: ScreenTools.defaultFontPixelHeight
                    }
                    PropertyChanges {
                        target: _flightVideoPipControl
                        inPopup: false
269 270 271 272 273 274 275 276
                    }
                },
                State {
                    name:   "fullMode"
                    PropertyChanges {
                        target: _flightVideo
                        anchors.margins:    0
                    }
Patrick José Pereira's avatar
Patrick José Pereira committed
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
                    PropertyChanges {
                        target: _flightVideoPipControl
                        inPopup: false
                    }
                },
                State {
                    name: "popup"
                    StateChangeScript {
                        script: QGroundControl.videoManager.stopVideo()
                    }
                    ParentChange {
                        target: _flightVideo
                        parent: videoItem
                        x: 0
                        y: 0
                        width: videoWindow.width
                        height: videoWindow.height
                    }
                    PropertyChanges {
                        target: _flightVideoPipControl
                        inPopup: true
                    }
                },
                State {
                    name: "unpopup"
                    StateChangeScript {
                        script: QGroundControl.videoManager.stopVideo()
                    }
                    ParentChange {
                        target: _flightVideo
                        parent: _panel
                    }
                    PropertyChanges {
                        target: _flightVideo
                        anchors.left:       _panel.left
                        anchors.bottom:     _panel.bottom
                        anchors.margins:    ScreenTools.defaultFontPixelHeight
                    }
                    PropertyChanges {
                        target: _flightVideoPipControl
                        inPopup: false
                    }
319
                }
320
            ]
321
            //-- Video Streaming
322
            FlightDisplayViewVideo {
Patrick José Pereira's avatar
Patrick José Pereira committed
323
                id:             videoStreaming
324 325 326 327
                anchors.fill:   parent
                visible:        QGroundControl.videoManager.isGStreamer
            }
            //-- UVC Video (USB Camera or Video Device)
328 329
            Loader {
                id:             cameraLoader
330 331
                anchors.fill:   parent
                visible:        !QGroundControl.videoManager.isGStreamer
332
                source:         QGroundControl.videoManager.uvcEnabled ? "qrc:/qml/FlightDisplayViewUVC.qml" : "qrc:/qml/FlightDisplayViewDummy.qml"
333
            }
dogmaphobic's avatar
dogmaphobic committed
334
        }
335 336 337 338

        QGCPipable {
            id:                 _flightVideoPipControl
            z:                  _flightVideo.z + 3
339 340
            width:              _pipSize
            height:             _pipSize * (9/16)
341 342 343
            anchors.left:       _panel.left
            anchors.bottom:     _panel.bottom
            anchors.margins:    ScreenTools.defaultFontPixelHeight
344
            visible:            QGroundControl.videoManager.hasVideo && !QGroundControl.videoManager.fullScreen
345 346
            isHidden:           !_isPipVisible
            isDark:             isBackgroundDark
347
            enablePopup:        _mainIsMap
348 349 350 351 352 353 354
            onActivated: {
                _mainIsMap = !_mainIsMap
                setStates()
            }
            onHideIt: {
                setPipVisibility(!state)
            }
Patrick José Pereira's avatar
Patrick José Pereira committed
355 356 357 358
            onPopup: {
                videoWindow.visible = true
                _flightVideo.state = "popup"
            }
359 360
            onNewWidth: {
                _pipSize = newWidth
Jacob Walser's avatar
Jacob Walser committed
361
            }
dogmaphobic's avatar
dogmaphobic committed
362
        }
Don Gagne's avatar
Don Gagne committed
363

364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385
        Row {
            id:                     singleMultiSelector
            anchors.topMargin:      ScreenTools.toolbarHeight + _margins
            anchors.rightMargin:    _margins
            anchors.right:          parent.right
            anchors.top:            parent.top
            spacing:                ScreenTools.defaultFontPixelWidth
            z:                      _panel.z + 4
            visible:                QGroundControl.multiVehicleManager.vehicles.count > 1

            ExclusiveGroup { id: multiVehicleSelectorGroup }

            QGCRadioButton {
                id:             singleVehicleView
                exclusiveGroup: multiVehicleSelectorGroup
                text:           qsTr("Single")
                checked:        true
                color:          mapPal.text
            }

            QGCRadioButton {
                exclusiveGroup: multiVehicleSelectorGroup
386
                text:           qsTr("Multi-Vehicle")
387 388 389 390
                color:          mapPal.text
            }
        }

391
        FlightDisplayViewWidgets {
392 393
            id:                 flightDisplayViewWidgets
            z:                  _panel.z + 4
394
            height:             ScreenTools.availableHeight - (singleMultiSelector.visible ? singleMultiSelector.height + _margins : 0)
395
            anchors.left:       parent.left
396
            anchors.right:      altitudeSlider.visible ? altitudeSlider.left : parent.right
397 398
            anchors.bottom:     parent.bottom
            qgcView:            root
399
            useLightColors:     isBackgroundDark
400
            missionController:  _missionController
401
            visible:            singleVehicleView.checked && !QGroundControl.videoManager.fullScreen
402 403
        }

404 405 406 407 408
        //-------------------------------------------------------------------------
        //-- Loader helper for plugins to overlay elements over the fly view
        Loader {
            id:                 flyViewOverlay
            z:                  flightDisplayViewWidgets.z + 1
409
            visible:            !QGroundControl.videoManager.fullScreen
410 411 412 413
            height:             ScreenTools.availableHeight
            anchors.left:       parent.left
            anchors.right:      altitudeSlider.visible ? altitudeSlider.left : parent.right
            anchors.bottom:     parent.bottom
414 415

            property var qgcView: root
416 417
        }

418 419 420 421 422 423
        MultiVehicleList {
            anchors.margins:    _margins
            anchors.top:        singleMultiSelector.bottom
            anchors.right:      parent.right
            anchors.bottom:     parent.bottom
            width:              ScreenTools.defaultFontPixelWidth * 30
424
            visible:            !singleVehicleView.checked && !QGroundControl.videoManager.fullScreen
425
            z:                  _panel.z + 4
426
        }
dogmaphobic's avatar
dogmaphobic committed
427

428
        //-- Virtual Joystick
429
        Loader {
430
            id:                         virtualJoystickMultiTouch
431 432
            z:                          _panel.z + 5
            width:                      parent.width  - (_flightVideoPipControl.width / 2)
433
            height:                     Math.min(ScreenTools.availableHeight * 0.25, ScreenTools.defaultFontPixelWidth * 16)
434
            visible:                    (_virtualJoystick ? _virtualJoystick.value : false) && !QGroundControl.videoManager.fullScreen
435 436
            anchors.bottom:             _flightVideoPipControl.top
            anchors.bottomMargin:       ScreenTools.defaultFontPixelHeight * 2
437
            anchors.horizontalCenter:   flightDisplayViewWidgets.horizontalCenter
438
            source:                     "qrc:/qml/VirtualJoystick.qml"
439
            active:                     _virtualJoystick ? _virtualJoystick.value : false
Don Gagne's avatar
Don Gagne committed
440

441
            property bool useLightColors: isBackgroundDark
442 443

            property Fact _virtualJoystick: QGroundControl.settingsManager.appSettings.virtualJoystick
Don Gagne's avatar
Don Gagne committed
444
        }
445 446

        ToolStrip {
447
            visible:            (_activeVehicle ? _activeVehicle.guidedModeSupported : true) && !QGroundControl.videoManager.fullScreen
448 449 450
            id:                 toolStrip
            anchors.leftMargin: ScreenTools.defaultFontPixelWidth
            anchors.left:       _panel.left
451
            anchors.topMargin:  ScreenTools.toolbarHeight + (_margins * 2)
452 453 454 455
            anchors.top:        _panel.top
            z:                  _panel.z + 4
            title:              qsTr("Fly")
            maxHeight:          (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y
456 457
            buttonVisible:      [ _guidedController.showTakeoff || !_guidedController.showLand, _guidedController.showLand && !_guidedController.showTakeoff, true, true, true, _guidedController.smartShotsAvailable ]
            buttonEnabled:      [ _guidedController.showTakeoff, _guidedController.showLand, _guidedController.showRTL, _guidedController.showPause, _anyActionAvailable, _anySmartShotAvailable ]
458

459
            property bool _anyActionAvailable: _guidedController.showStartMission || _guidedController.showResumeMission || _guidedController.showChangeAlt || _guidedController.showLandAbort
460
            property bool _anySmartShotAvailable: _guidedController.showOrbit
461 462
            property var _actionModel: [
                {
463 464 465 466
                    title:      _guidedController.startMissionTitle,
                    text:       _guidedController.startMissionMessage,
                    action:     _guidedController.actionStartMission,
                    visible:    _guidedController.showStartMission
467
                },
Don Gagne's avatar
Don Gagne committed
468 469 470 471 472 473
                {
                    title:      _guidedController.continueMissionTitle,
                    text:       _guidedController.continueMissionMessage,
                    action:     _guidedController.actionContinueMission,
                    visible:    _guidedController.showContinueMission
                },
474
                {
475 476 477 478
                    title:      _guidedController.resumeMissionTitle,
                    text:       _guidedController.resumeMissionMessage,
                    action:     _guidedController.actionResumeMission,
                    visible:    _guidedController.showResumeMission
479 480
                },
                {
481 482 483 484
                    title:      _guidedController.changeAltTitle,
                    text:       _guidedController.changeAltMessage,
                    action:     _guidedController.actionChangeAlt,
                    visible:    _guidedController.showChangeAlt
485 486
                },
                {
487 488 489 490
                    title:      _guidedController.landAbortTitle,
                    text:       _guidedController.landAbortMessage,
                    action:     _guidedController.actionLandAbort,
                    visible:    _guidedController.showLandAbort
491 492 493 494
                }
            ]
            property var _smartShotModel: [
                {
495 496 497 498
                    title:      _guidedController.orbitTitle,
                    text:       _guidedController.orbitMessage,
                    action:     _guidedController.actionOrbit,
                    visible:    _guidedController.showOrbit
499 500 501 502 503
                }
            ]

            model: [
                {
504
                    name:       _guidedController.takeoffTitle,
505
                    iconSource: "/res/takeoff.svg",
506
                    action:     _guidedController.actionTakeoff
507 508
                },
                {
509
                    name:       _guidedController.landTitle,
510
                    iconSource: "/res/land.svg",
511
                    action:     _guidedController.actionLand
512 513
                },
                {
514
                    name:       _guidedController.rtlTitle,
515
                    iconSource: "/res/rtl.svg",
516
                    action:     _guidedController.actionRTL
517 518
                },
                {
519
                    name:       _guidedController.pauseTitle,
Gus Grubba's avatar
Gus Grubba committed
520
                    iconSource: "/res/pause-mission.svg",
521
                    action:     _guidedController.actionPause
522 523 524
                },
                {
                    name:       qsTr("Action"),
Gus Grubba's avatar
Gus Grubba committed
525
                    iconSource: "/res/action.svg",
526 527 528 529 530 531 532 533 534 535 536 537 538
                    action:     -1
                },
                /*
                  No firmware support any smart shots yet
                {
                    name:       qsTr("Smart"),
                    iconSource: "/qmlimages/MapCenter.svg",
                    action:     -1
                },
                */
            ]

            onClicked: {
539
                guidedActionsController.closeAll()
540 541 542
                var action = model[index].action
                if (action === -1) {
                    if (index == 4) {
543
                        guidedActionList.model   = _actionModel
544 545
                        guidedActionList.visible = true
                    } else if (index == 5) {
546
                        guidedActionList.model   = _smartShotModel
547 548 549
                        guidedActionList.visible = true
                    }
                } else {
550
                    _guidedController.confirmAction(action)
551 552 553 554 555
                }
            }
        }

        GuidedActionsController {
556
            id:                 guidedActionsController
557
            missionController:  _missionController
558
            confirmDialog:      guidedActionConfirm
DonLakeFlyer's avatar
DonLakeFlyer committed
559
            actionList:         guidedActionList
Don Gagne's avatar
Don Gagne committed
560
            altitudeSlider:     _altitudeSlider
561 562
            z:                  _flightVideoPipControl.z + 1

563
            onShowStartMissionChanged: {
564
                if (showStartMission && !showResumeMission) {
565 566 567 568
                    confirmAction(actionStartMission)
                }
            }

569 570 571 572 573 574
            onShowContinueMissionChanged: {
                if (showContinueMission) {
                    confirmAction(actionContinueMission)
                }
            }

575 576 577 578 579
            onShowResumeMissionChanged: {
                if (showResumeMission) {
                    confirmAction(actionResumeMission)
                }
            }
580 581 582 583 584 585

            onShowLandAbortChanged: {
                if (showLandAbort) {
                    confirmAction(actionLandAbort)
                }
            }
586 587 588

            /// Close all dialogs
            function closeAll() {
589
                mainWindow.enableToolbar()
590 591 592 593 594
                rootLoader.sourceComponent  = null
                guidedActionConfirm.visible = false
                guidedActionList.visible    = false
                altitudeSlider.visible      = false
            }
595 596
        }

597
        GuidedActionConfirm {
598 599 600 601
            id:                         guidedActionConfirm
            anchors.margins:            _margins
            anchors.bottom:             parent.bottom
            anchors.horizontalCenter:   parent.horizontalCenter
602 603
            guidedController:           _guidedController
            altitudeSlider:             _altitudeSlider
604 605
        }

606
        GuidedActionList {
607 608 609 610
            id:                         guidedActionList
            anchors.margins:            _margins
            anchors.bottom:             parent.bottom
            anchors.horizontalCenter:   parent.horizontalCenter
611
            guidedController:           _guidedController
612 613 614
        }

        //-- Altitude slider
DonLakeFlyer's avatar
DonLakeFlyer committed
615
        GuidedAltitudeSlider {
616 617 618 619 620 621
            id:                 altitudeSlider
            anchors.margins:    _margins
            anchors.right:      parent.right
            anchors.topMargin:  ScreenTools.toolbarHeight + _margins
            anchors.top:        parent.top
            anchors.bottom:     parent.bottom
622
            z:                  _guidedController.z
623 624 625 626 627
            radius:             ScreenTools.defaultFontPixelWidth / 2
            width:              ScreenTools.defaultFontPixelWidth * 10
            color:              qgcPal.window
            visible:            false
        }
Don Gagne's avatar
Don Gagne committed
628
    }
629
}