FlightDisplayView.qml 26.1 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 46 47 48 49 50 51 52
    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
    property real   _pipSize:               mainWindow.width * 0.2
    property alias  _guidedController:      guidedActionsController
    property alias  _altitudeSlider:        altitudeSlider
53

54

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

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

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

95
    function px4JoystickCheck() {
96
        if ( _activeVehicle && !_activeVehicle.supportsManualControl && (QGroundControl.settingsManager.appSettings.virtualJoystick.value || _activeVehicle.joystickEnabled)) {
97 98 99 100
            px4JoystickSupport.open()
        }
    }

101 102
    PlanElemementMasterController {
        id:                     masterController
103
        Component.onCompleted:  start(false /* editMode */)
104 105
    }

106 107 108
    Connections {
        target:                 _missionController
        onResumeMissionReady:   guidedActionsController.confirmAction(guidedActionsController.actionResumeMissionReady)
109 110
    }

111 112
    MessageDialog {
        id:     px4JoystickSupport
113 114 115
        text:   qsTr("Joystick support requires MAVLink MANUAL_CONTROL support. ") +
                qsTr("The firmware you are running does not normally support this. ") +
                qsTr("It will only work if you have modified the firmware to add MANUAL_CONTROL support.")
116 117 118
    }

    Connections {
119
        target:                 QGroundControl.multiVehicleManager
120 121 122 123
        onActiveVehicleChanged: px4JoystickCheck()
    }

    Connections {
124 125
        target:         QGroundControl.settingsManager.appSettings.virtualJoystick
        onValueChanged: px4JoystickCheck()
126 127 128 129
    }

    onActiveVehicleJoystickEnabledChanged: px4JoystickCheck()

130 131
    Component.onCompleted: {
        setStates()
132
        px4JoystickCheck()
133 134 135
        if(QGroundControl.corePlugin.options.flyViewOverlay.toString().length) {
            flyViewOverlay.source = QGroundControl.corePlugin.options.flyViewOverlay
        }
136
    }
dogmaphobic's avatar
dogmaphobic committed
137

138 139 140 141 142 143 144 145 146 147 148 149 150 151
    // 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 {
152
            if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) {
153 154 155 156
                // 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)
                }
157 158 159 160 161 162 163 164 165 166 167 168
            }
            promptForMissionRemove = false
        }
    }

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

    Component {
169 170 171 172 173 174 175
        id: missionCompleteDialogComponent

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

176
                ColumnLayout {
177 178 179 180 181 182 183
                    id:                 column
                    anchors.margins:    _margins
                    anchors.left:       parent.left
                    anchors.right:      parent.right
                    spacing:            ScreenTools.defaultFontPixelHeight

                    QGCLabel {
184 185 186 187
                        Layout.fillWidth:       true
                        text:                   qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
                        horizontalAlignment:    Text.AlignHCenter
                        visible:                _activeVehicle.cameraTriggerPoints.count != 0
188 189 190
                    }

                    QGCButton {
191 192
                        Layout.fillWidth:   true
                        text:               qsTr("Remove plan from vehicle")
193 194 195 196 197
                        onClicked: {
                            _planMasterController.removeAllFromVehicle()
                            hideDialog()
                        }
                    }
198 199 200 201 202 203 204

                    QGCButton {
                        Layout.fillWidth:   true
                        text:               qsTr("Leave plan on vehicle")
                        anchors.horizontalCenter:   parent.horizontalCenter
                        onClicked:                  hideDialog()
                    }
205
                }
206 207 208 209
            }
        }
    }

210 211
    QGCMapPalette { id: mapPal; lightColors: _mainIsMap ? _flightMap.isSatelliteMap : true }

212 213 214 215 216 217 218 219 220 221 222 223 224
    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
            visible:        _mainIsMap || _isPipVisible
225 226
            width:          _mainIsMap ? _panel.width  : _pipSize
            height:         _mainIsMap ? _panel.height : _pipSize * (9/16)
227 228 229 230 231 232 233 234 235 236 237 238 239 240
            states: [
                State {
                    name:   "pipMode"
                    PropertyChanges {
                        target:             _flightMapContainer
                        anchors.margins:    ScreenTools.defaultFontPixelHeight
                    }
                },
                State {
                    name:   "fullMode"
                    PropertyChanges {
                        target:             _flightMapContainer
                        anchors.margins:    0
                    }
241
                }
242 243
            ]
            FlightDisplayViewMap {
244 245
                id:                         _flightMap
                anchors.fill:               parent
246
                planMasterController:       masterController
247 248 249 250 251
                guidedActionsController:    _guidedController
                flightWidgets:              flightDisplayViewWidgets
                rightPanelWidth:            ScreenTools.defaultFontPixelHeight * 9
                qgcView:                    root
                scaleState:                 (_mainIsMap && flyViewOverlay.item) ? (flyViewOverlay.item.scaleState ? flyViewOverlay.item.scaleState : "bottomMode") : "bottomMode"
252
            }
253
        }
254

255
        //-- Video View
256
        Item {
257 258
            id:             _flightVideo
            z:              _mainIsMap ? _panel.z + 2 : _panel.z + 1
259 260
            width:          !_mainIsMap ? _panel.width  : _pipSize
            height:         !_mainIsMap ? _panel.height : _pipSize * (9/16)
261 262
            anchors.left:   _panel.left
            anchors.bottom: _panel.bottom
263
            visible:        QGroundControl.videoManager.hasVideo && (!_mainIsMap || _isPipVisible)
264 265 266 267 268 269 270 271 272 273 274 275 276 277
            states: [
                State {
                    name:   "pipMode"
                    PropertyChanges {
                        target: _flightVideo
                        anchors.margins:    ScreenTools.defaultFontPixelHeight
                    }
                },
                State {
                    name:   "fullMode"
                    PropertyChanges {
                        target: _flightVideo
                        anchors.margins:    0
                    }
278
                }
279
            ]
280
            //-- Video Streaming
281 282 283 284 285
            FlightDisplayViewVideo {
                anchors.fill:   parent
                visible:        QGroundControl.videoManager.isGStreamer
            }
            //-- UVC Video (USB Camera or Video Device)
286 287
            Loader {
                id:             cameraLoader
288 289
                anchors.fill:   parent
                visible:        !QGroundControl.videoManager.isGStreamer
290
                source:         QGroundControl.videoManager.uvcEnabled ? "qrc:/qml/FlightDisplayViewUVC.qml" : "qrc:/qml/FlightDisplayViewDummy.qml"
291
            }
dogmaphobic's avatar
dogmaphobic committed
292
        }
293 294 295 296

        QGCPipable {
            id:                 _flightVideoPipControl
            z:                  _flightVideo.z + 3
297 298
            width:              _pipSize
            height:             _pipSize * (9/16)
299 300 301
            anchors.left:       _panel.left
            anchors.bottom:     _panel.bottom
            anchors.margins:    ScreenTools.defaultFontPixelHeight
302
            visible:            QGroundControl.videoManager.hasVideo
303 304 305 306 307 308 309 310 311
            isHidden:           !_isPipVisible
            isDark:             isBackgroundDark
            onActivated: {
                _mainIsMap = !_mainIsMap
                setStates()
            }
            onHideIt: {
                setPipVisibility(!state)
            }
dogmaphobic's avatar
dogmaphobic committed
312
        }
Don Gagne's avatar
Don Gagne committed
313

314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
        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
                text:           qsTr("Multi-Vehicle (WIP)")
                color:          mapPal.text
            }
        }

341
        FlightDisplayViewWidgets {
342 343 344 345
            id:                 flightDisplayViewWidgets
            z:                  _panel.z + 4
            height:             ScreenTools.availableHeight
            anchors.left:       parent.left
346
            anchors.right:      altitudeSlider.visible ? altitudeSlider.left : parent.right
347 348
            anchors.bottom:     parent.bottom
            qgcView:            root
349
            useLightColors:     isBackgroundDark
350
            missionController:  _missionController
351 352 353
            visible:            singleVehicleView.checked
        }

354 355 356 357 358 359 360 361 362
        //-------------------------------------------------------------------------
        //-- Loader helper for plugins to overlay elements over the fly view
        Loader {
            id:                 flyViewOverlay
            z:                  flightDisplayViewWidgets.z + 1
            height:             ScreenTools.availableHeight
            anchors.left:       parent.left
            anchors.right:      altitudeSlider.visible ? altitudeSlider.left : parent.right
            anchors.bottom:     parent.bottom
363 364

            property var qgcView: root
365 366
        }

367 368 369 370 371 372 373 374
        // 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
375
            visible:            QGroundControl.videoManager.videoReceiver.videoRunning && QGroundControl.settingsManager.videoSettings.showRecControl.rawValue && !_isCamera
376 377 378 379 380 381
            opacity:            0.75

            Rectangle {
                anchors.top:        parent.top
                anchors.bottom:     parent.bottom
                width:              height
382
                radius:             QGroundControl.videoManager && QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording ? 0 : height
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
                color:              "red"
            }

            QGCColoredImage {
                anchors.top:                parent.top
                anchors.bottom:             parent.bottom
                anchors.horizontalCenter:   parent.horizontalCenter
                width:                      height * 0.625
                sourceSize.width:           width
                source:                     "/qmlimages/CameraIcon.svg"
                fillMode:                   Image.PreserveAspectFit
                color:                      "white"
            }

            MouseArea {
                anchors.fill:   parent
399
                onClicked:      QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording ? QGroundControl.videoManager.videoReceiver.stopRecording() : QGroundControl.videoManager.videoReceiver.startRecording()
400 401 402
            }
        }

403 404 405 406 407 408 409 410
        MultiVehicleList {
            anchors.margins:    _margins
            anchors.top:        singleMultiSelector.bottom
            anchors.right:      parent.right
            anchors.bottom:     parent.bottom
            width:              ScreenTools.defaultFontPixelWidth * 30
            visible:            !singleVehicleView.checked
            z:                  _panel.z + 4
411
        }
dogmaphobic's avatar
dogmaphobic committed
412

413

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

427
            property bool useLightColors: isBackgroundDark
428 429

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

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

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

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

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

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

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

555 556 557 558 559 560
            onShowContinueMissionChanged: {
                if (showContinueMission) {
                    confirmAction(actionContinueMission)
                }
            }

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

            onShowLandAbortChanged: {
                if (showLandAbort) {
                    confirmAction(actionLandAbort)
                }
            }
572 573 574 575 576 577 578 579

            /// Close all dialogs
            function closeAll() {
                rootLoader.sourceComponent  = null
                guidedActionConfirm.visible = false
                guidedActionList.visible    = false
                altitudeSlider.visible      = false
            }
580 581
        }

582
        GuidedActionConfirm {
583 584 585 586
            id:                         guidedActionConfirm
            anchors.margins:            _margins
            anchors.bottom:             parent.bottom
            anchors.horizontalCenter:   parent.horizontalCenter
587 588
            guidedController:           _guidedController
            altitudeSlider:             _altitudeSlider
589 590
        }

591
        GuidedActionList {
592 593 594 595
            id:                         guidedActionList
            anchors.margins:            _margins
            anchors.bottom:             parent.bottom
            anchors.horizontalCenter:   parent.horizontalCenter
596
            guidedController:           _guidedController
597 598 599
        }

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