FlightDisplayView.qml 26.6 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
19

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

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

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

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

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

41 42 43 44 45
    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
46
    property var    _videoReceiver:         QGroundControl.videoManager.videoReceiver
47
    property bool   _recordingVideo:        _videoReceiver && _videoReceiver.recording
48 49 50 51
    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
52
    property real   _pipSize:               flightView.width * 0.2
53 54
    property alias  _guidedController:      guidedActionsController
    property alias  _altitudeSlider:        altitudeSlider
55

56

57 58
    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
59 60 61 62 63 64 65 66 67 68 69 70
    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"

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

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

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

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

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

115 116 117 118 119 120 121 122 123 124 125 126 127 128
    // 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 {
129
            if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) {
130 131 132 133
                // 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)
                }
134 135 136 137 138 139 140 141 142 143 144 145
            }
            promptForMissionRemove = false
        }
    }

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

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

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

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

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

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

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

187 188
    QGCMapPalette { id: mapPal; lightColors: _mainIsMap ? _flightMap.isSatelliteMap : true }

189 190 191 192 193 194 195 196 197 198 199 200
    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
201
            visible:        _mainIsMap || _isPipVisible && !QGroundControl.videoManager.fullScreen
202 203
            width:          _mainIsMap ? _panel.width  : _pipSize
            height:         _mainIsMap ? _panel.height : _pipSize * (9/16)
204 205 206 207 208 209 210 211 212 213 214 215 216 217
            states: [
                State {
                    name:   "pipMode"
                    PropertyChanges {
                        target:             _flightMapContainer
                        anchors.margins:    ScreenTools.defaultFontPixelHeight
                    }
                },
                State {
                    name:   "fullMode"
                    PropertyChanges {
                        target:             _flightMapContainer
                        anchors.margins:    0
                    }
218
                }
219 220
            ]
            FlightDisplayViewMap {
221 222
                id:                         _flightMap
                anchors.fill:               parent
223
                planMasterController:       masterController
224 225 226 227
                guidedActionsController:    _guidedController
                flightWidgets:              flightDisplayViewWidgets
                rightPanelWidth:            ScreenTools.defaultFontPixelHeight * 9
                qgcView:                    root
228
                multiVehicleView:           !singleVehicleView.checked
229
                scaleState:                 (_mainIsMap && flyViewOverlay.item) ? (flyViewOverlay.item.scaleState ? flyViewOverlay.item.scaleState : "bottomMode") : "bottomMode"
230
            }
231
        }
232

233
        //-- Video View
234
        Item {
235 236
            id:             _flightVideo
            z:              _mainIsMap ? _panel.z + 2 : _panel.z + 1
237 238
            width:          !_mainIsMap ? _panel.width  : _pipSize
            height:         !_mainIsMap ? _panel.height : _pipSize * (9/16)
239 240
            anchors.left:   _panel.left
            anchors.bottom: _panel.bottom
241
            visible:        QGroundControl.videoManager.hasVideo && (!_mainIsMap || _isPipVisible)
242 243 244 245 246 247 248 249 250 251 252 253 254 255
            states: [
                State {
                    name:   "pipMode"
                    PropertyChanges {
                        target: _flightVideo
                        anchors.margins:    ScreenTools.defaultFontPixelHeight
                    }
                },
                State {
                    name:   "fullMode"
                    PropertyChanges {
                        target: _flightVideo
                        anchors.margins:    0
                    }
256
                }
257
            ]
258
            //-- Video Streaming
259 260 261 262 263
            FlightDisplayViewVideo {
                anchors.fill:   parent
                visible:        QGroundControl.videoManager.isGStreamer
            }
            //-- UVC Video (USB Camera or Video Device)
264 265
            Loader {
                id:             cameraLoader
266 267
                anchors.fill:   parent
                visible:        !QGroundControl.videoManager.isGStreamer
268
                source:         QGroundControl.videoManager.uvcEnabled ? "qrc:/qml/FlightDisplayViewUVC.qml" : "qrc:/qml/FlightDisplayViewDummy.qml"
269
            }
dogmaphobic's avatar
dogmaphobic committed
270
        }
271 272 273 274

        QGCPipable {
            id:                 _flightVideoPipControl
            z:                  _flightVideo.z + 3
275 276
            width:              _pipSize
            height:             _pipSize * (9/16)
277 278 279
            anchors.left:       _panel.left
            anchors.bottom:     _panel.bottom
            anchors.margins:    ScreenTools.defaultFontPixelHeight
280
            visible:            QGroundControl.videoManager.hasVideo && !QGroundControl.videoManager.fullScreen
281 282 283 284 285 286 287 288 289
            isHidden:           !_isPipVisible
            isDark:             isBackgroundDark
            onActivated: {
                _mainIsMap = !_mainIsMap
                setStates()
            }
            onHideIt: {
                setPipVisibility(!state)
            }
290 291
            onNewWidth: {
                _pipSize = newWidth
Jacob Walser's avatar
Jacob Walser committed
292
            }
dogmaphobic's avatar
dogmaphobic committed
293
        }
Don Gagne's avatar
Don Gagne committed
294

295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
        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
317
                text:           qsTr("Multi-Vehicle")
318 319 320 321
                color:          mapPal.text
            }
        }

322
        FlightDisplayViewWidgets {
323 324
            id:                 flightDisplayViewWidgets
            z:                  _panel.z + 4
325
            height:             ScreenTools.availableHeight - (singleMultiSelector.visible ? singleMultiSelector.height + _margins : 0)
326
            anchors.left:       parent.left
327
            anchors.right:      altitudeSlider.visible ? altitudeSlider.left : parent.right
328 329
            anchors.bottom:     parent.bottom
            qgcView:            root
330
            useLightColors:     isBackgroundDark
331
            missionController:  _missionController
332
            visible:            singleVehicleView.checked && !QGroundControl.videoManager.fullScreen
333 334
        }

335 336 337 338 339
        //-------------------------------------------------------------------------
        //-- Loader helper for plugins to overlay elements over the fly view
        Loader {
            id:                 flyViewOverlay
            z:                  flightDisplayViewWidgets.z + 1
340
            visible:            !QGroundControl.videoManager.fullScreen
341 342 343 344
            height:             ScreenTools.availableHeight
            anchors.left:       parent.left
            anchors.right:      altitudeSlider.visible ? altitudeSlider.left : parent.right
            anchors.bottom:     parent.bottom
345 346

            property var qgcView: root
347 348
        }

349 350 351 352 353 354 355 356
        // Button to start/stop video recording
        Item {
            z:                  _flightVideoPipControl.z + 1
            anchors.margins:    ScreenTools.defaultFontPixelHeight / 2
            anchors.bottom:     _flightVideo.bottom
            anchors.right:      _flightVideo.right
            height:             ScreenTools.defaultFontPixelHeight * 2
            width:              height
357
            visible:            _videoReceiver && _videoReceiver.videoRunning && QGroundControl.settingsManager.videoSettings.showRecControl.rawValue && _flightVideo.visible && !_isCamera && !QGroundControl.videoManager.fullScreen
358 359
            opacity:            0.75

360 361
            readonly property string recordBtnBackground: "BackgroundName"

362
            Rectangle {
363
                id:                 recordBtnBackground
364 365 366
                anchors.top:        parent.top
                anchors.bottom:     parent.bottom
                width:              height
367
                radius:             _recordingVideo ? 0 : height
368
                color:              "red"
369 370

                SequentialAnimation on visible {
371
                    running:        _recordingVideo
372 373 374 375
                    loops:          Animation.Infinite
                    PropertyAnimation { to: false; duration: 1000 }
                    PropertyAnimation { to: true;  duration: 1000 }
                }
376 377 378 379 380 381 382 383 384
            }

            QGCColoredImage {
                anchors.top:                parent.top
                anchors.bottom:             parent.bottom
                anchors.horizontalCenter:   parent.horizontalCenter
                width:                      height * 0.625
                sourceSize.width:           width
                source:                     "/qmlimages/CameraIcon.svg"
385
                visible:                    recordBtnBackground.visible
386 387 388 389 390 391
                fillMode:                   Image.PreserveAspectFit
                color:                      "white"
            }

            MouseArea {
                anchors.fill:   parent
392
                onClicked: {
393 394 395 396
                    if (_videoReceiver) {
                        if (_recordingVideo) {
                            _videoReceiver.stopRecording()
                            // reset blinking animation
397 398
                            recordBtnBackground.visible = true
                        } else {
399
                            _videoReceiver.startRecording()
400 401 402
                        }
                    }
                }
403 404 405
            }
        }

406 407 408 409 410 411
        MultiVehicleList {
            anchors.margins:    _margins
            anchors.top:        singleMultiSelector.bottom
            anchors.right:      parent.right
            anchors.bottom:     parent.bottom
            width:              ScreenTools.defaultFontPixelWidth * 30
412
            visible:            !singleVehicleView.checked && !QGroundControl.videoManager.fullScreen
413
            z:                  _panel.z + 4
414
        }
dogmaphobic's avatar
dogmaphobic committed
415

416
        //-- Virtual Joystick
417
        Loader {
418
            id:                         virtualJoystickMultiTouch
419 420
            z:                          _panel.z + 5
            width:                      parent.width  - (_flightVideoPipControl.width / 2)
421
            height:                     Math.min(ScreenTools.availableHeight * 0.25, ScreenTools.defaultFontPixelWidth * 16)
422
            visible:                    (_virtualJoystick ? _virtualJoystick.value : false) && !QGroundControl.videoManager.fullScreen
423 424
            anchors.bottom:             _flightVideoPipControl.top
            anchors.bottomMargin:       ScreenTools.defaultFontPixelHeight * 2
425
            anchors.horizontalCenter:   flightDisplayViewWidgets.horizontalCenter
426
            source:                     "qrc:/qml/VirtualJoystick.qml"
427
            active:                     _virtualJoystick ? _virtualJoystick.value : false
Don Gagne's avatar
Don Gagne committed
428

429
            property bool useLightColors: isBackgroundDark
430 431

            property Fact _virtualJoystick: QGroundControl.settingsManager.appSettings.virtualJoystick
Don Gagne's avatar
Don Gagne committed
432
        }
433 434

        ToolStrip {
435
            visible:            (_activeVehicle ? _activeVehicle.guidedModeSupported : true) && !QGroundControl.videoManager.fullScreen
436 437 438
            id:                 toolStrip
            anchors.leftMargin: ScreenTools.defaultFontPixelWidth
            anchors.left:       _panel.left
439
            anchors.topMargin:  ScreenTools.toolbarHeight + (_margins * 2)
440 441 442 443
            anchors.top:        _panel.top
            z:                  _panel.z + 4
            title:              qsTr("Fly")
            maxHeight:          (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y
444 445
            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 ]
446

447
            property bool _anyActionAvailable: _guidedController.showStartMission || _guidedController.showResumeMission || _guidedController.showChangeAlt || _guidedController.showLandAbort
448
            property bool _anySmartShotAvailable: _guidedController.showOrbit
449 450
            property var _actionModel: [
                {
451 452 453 454
                    title:      _guidedController.startMissionTitle,
                    text:       _guidedController.startMissionMessage,
                    action:     _guidedController.actionStartMission,
                    visible:    _guidedController.showStartMission
455
                },
Don Gagne's avatar
Don Gagne committed
456 457 458 459 460 461
                {
                    title:      _guidedController.continueMissionTitle,
                    text:       _guidedController.continueMissionMessage,
                    action:     _guidedController.actionContinueMission,
                    visible:    _guidedController.showContinueMission
                },
462
                {
463 464 465 466
                    title:      _guidedController.resumeMissionTitle,
                    text:       _guidedController.resumeMissionMessage,
                    action:     _guidedController.actionResumeMission,
                    visible:    _guidedController.showResumeMission
467 468
                },
                {
469 470 471 472
                    title:      _guidedController.changeAltTitle,
                    text:       _guidedController.changeAltMessage,
                    action:     _guidedController.actionChangeAlt,
                    visible:    _guidedController.showChangeAlt
473 474
                },
                {
475 476 477 478
                    title:      _guidedController.landAbortTitle,
                    text:       _guidedController.landAbortMessage,
                    action:     _guidedController.actionLandAbort,
                    visible:    _guidedController.showLandAbort
479 480 481 482
                }
            ]
            property var _smartShotModel: [
                {
483 484 485 486
                    title:      _guidedController.orbitTitle,
                    text:       _guidedController.orbitMessage,
                    action:     _guidedController.actionOrbit,
                    visible:    _guidedController.showOrbit
487 488 489 490 491
                }
            ]

            model: [
                {
492
                    name:       _guidedController.takeoffTitle,
493
                    iconSource: "/res/takeoff.svg",
494
                    action:     _guidedController.actionTakeoff
495 496
                },
                {
497
                    name:       _guidedController.landTitle,
498
                    iconSource: "/res/land.svg",
499
                    action:     _guidedController.actionLand
500 501
                },
                {
502
                    name:       _guidedController.rtlTitle,
503
                    iconSource: "/res/rtl.svg",
504
                    action:     _guidedController.actionRTL
505 506
                },
                {
507
                    name:       _guidedController.pauseTitle,
Gus Grubba's avatar
Gus Grubba committed
508
                    iconSource: "/res/pause-mission.svg",
509
                    action:     _guidedController.actionPause
510 511 512
                },
                {
                    name:       qsTr("Action"),
Gus Grubba's avatar
Gus Grubba committed
513
                    iconSource: "/res/action.svg",
514 515 516 517 518 519 520 521 522 523 524 525 526
                    action:     -1
                },
                /*
                  No firmware support any smart shots yet
                {
                    name:       qsTr("Smart"),
                    iconSource: "/qmlimages/MapCenter.svg",
                    action:     -1
                },
                */
            ]

            onClicked: {
527
                guidedActionsController.closeAll()
528 529 530
                var action = model[index].action
                if (action === -1) {
                    if (index == 4) {
531
                        guidedActionList.model   = _actionModel
532 533
                        guidedActionList.visible = true
                    } else if (index == 5) {
534
                        guidedActionList.model   = _smartShotModel
535 536 537
                        guidedActionList.visible = true
                    }
                } else {
538
                    _guidedController.confirmAction(action)
539 540 541 542 543
                }
            }
        }

        GuidedActionsController {
544
            id:                 guidedActionsController
545
            missionController:  _missionController
546
            confirmDialog:      guidedActionConfirm
DonLakeFlyer's avatar
DonLakeFlyer committed
547
            actionList:         guidedActionList
Don Gagne's avatar
Don Gagne committed
548
            altitudeSlider:     _altitudeSlider
549 550
            z:                  _flightVideoPipControl.z + 1

551
            onShowStartMissionChanged: {
552
                if (showStartMission && !showResumeMission) {
553 554 555 556
                    confirmAction(actionStartMission)
                }
            }

557 558 559 560 561 562
            onShowContinueMissionChanged: {
                if (showContinueMission) {
                    confirmAction(actionContinueMission)
                }
            }

563 564 565 566 567
            onShowResumeMissionChanged: {
                if (showResumeMission) {
                    confirmAction(actionResumeMission)
                }
            }
568 569 570 571 572 573

            onShowLandAbortChanged: {
                if (showLandAbort) {
                    confirmAction(actionLandAbort)
                }
            }
574 575 576

            /// Close all dialogs
            function closeAll() {
577
                mainWindow.enableToolbar()
578 579 580 581 582
                rootLoader.sourceComponent  = null
                guidedActionConfirm.visible = false
                guidedActionList.visible    = false
                altitudeSlider.visible      = false
            }
583 584
        }

585
        GuidedActionConfirm {
586 587 588 589
            id:                         guidedActionConfirm
            anchors.margins:            _margins
            anchors.bottom:             parent.bottom
            anchors.horizontalCenter:   parent.horizontalCenter
590 591
            guidedController:           _guidedController
            altitudeSlider:             _altitudeSlider
592 593
        }

594
        GuidedActionList {
595 596 597 598
            id:                         guidedActionList
            anchors.margins:            _margins
            anchors.bottom:             parent.bottom
            anchors.horizontalCenter:   parent.horizontalCenter
599
            guidedController:           _guidedController
600 601 602
        }

        //-- Altitude slider
DonLakeFlyer's avatar
DonLakeFlyer committed
603
        GuidedAltitudeSlider {
604 605 606 607 608 609
            id:                 altitudeSlider
            anchors.margins:    _margins
            anchors.right:      parent.right
            anchors.topMargin:  ScreenTools.toolbarHeight + _margins
            anchors.top:        parent.top
            anchors.bottom:     parent.bottom
610
            z:                  _guidedController.z
611 612 613 614 615
            radius:             ScreenTools.defaultFontPixelWidth / 2
            width:              ScreenTools.defaultFontPixelWidth * 10
            color:              qgcPal.window
            visible:            false
        }
Don Gagne's avatar
Don Gagne committed
616
    }
617
}