GeneralSettings.qml 34.2 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.
 *
 ****************************************************************************/
dogmaphobic's avatar
dogmaphobic committed
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
import QtMultimedia             5.5
import QtQuick.Layouts          1.2
dogmaphobic's avatar
dogmaphobic committed
17 18 19

import QGroundControl                       1.0
import QGroundControl.FactSystem            1.0
20
import QGroundControl.FactControls          1.0
dogmaphobic's avatar
dogmaphobic committed
21 22 23 24
import QGroundControl.Controls              1.0
import QGroundControl.ScreenTools           1.0
import QGroundControl.MultiVehicleManager   1.0
import QGroundControl.Palette               1.0
25
import QGroundControl.Controllers           1.0
26
import QGroundControl.SettingsManager       1.0
dogmaphobic's avatar
dogmaphobic committed
27

28
QGCView {
29
    id:                 _qgcView
30
    viewPanel:          panel
31
    color:              qgcPal.window
32 33
    anchors.fill:       parent
    anchors.margins:    ScreenTools.defaultFontPixelWidth
dogmaphobic's avatar
dogmaphobic committed
34

35
    property Fact _percentRemainingAnnounce:    QGroundControl.settingsManager.appSettings.batteryPercentRemainingAnnounce
36
    property Fact _savePath:                    QGroundControl.settingsManager.appSettings.savePath
37
    property Fact _appFontPointSize:            QGroundControl.settingsManager.appSettings.appFontPointSize
38 39
    property real _labelWidth:                  ScreenTools.defaultFontPixelWidth * 15
    property real _editFieldWidth:              ScreenTools.defaultFontPixelWidth * 30
40
    property Fact _videoPath:                   QGroundControl.settingsManager.videoSettings.videoSavePath
41 42
    property Fact _mapProvider:                 QGroundControl.settingsManager.flightMapSettings.mapProvider
    property Fact _mapType:                     QGroundControl.settingsManager.flightMapSettings.mapType
43 44

    readonly property string _requiresRestart:  qsTr("(Requires Restart)")
45

46
    QGCPalette { id: qgcPal }
dogmaphobic's avatar
dogmaphobic committed
47

48 49 50 51 52 53 54 55 56 57
    QGCViewPanel {
        id:             panel
        anchors.fill:   parent
        QGCFlickable {
            clip:               true
            anchors.fill:       parent
            contentHeight:      settingsColumn.height
            contentWidth:       settingsColumn.width
            Column {
                id:                 settingsColumn
58
                width:              _qgcView.width
59
                spacing:            ScreenTools.defaultFontPixelHeight * 0.5
60
                anchors.margins:    ScreenTools.defaultFontPixelWidth
61

62
                //-----------------------------------------------------------------
63 64
                //-- Units
                Item {
65
                    width:                      _qgcView.width * 0.8
66 67 68 69
                    height:                     unitLabel.height
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.unitsSettings.visible
70
                    QGCLabel {
71 72 73
                        id:             unitLabel
                        text:           qsTr("Units (Requires Restart)")
                        font.family:    ScreenTools.demiboldFontFamily
74
                    }
75 76
                }
                Rectangle {
77
                    height:                     unitsCol.height + (ScreenTools.defaultFontPixelHeight * 2)
78
                    width:                      _qgcView.width * 0.8
79 80 81 82
                    color:                      qgcPal.windowShade
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.unitsSettings.visible
83 84 85 86
                    Column {
                        id:         unitsCol
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.centerIn: parent
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108

                        Repeater {
                            id:     unitsRepeater
                            model:  [ QGroundControl.settingsManager.unitsSettings.distanceUnits, QGroundControl.settingsManager.unitsSettings.areaUnits, QGroundControl.settingsManager.unitsSettings.speedUnits ]

                            property var names: [ qsTr("Distance:"), qsTr("Area:"), qsTr("Speed:") ]

                            Row {
                                spacing:    ScreenTools.defaultFontPixelWidth
                                visible:    modelData.visible

                                QGCLabel {
                                    width:              _labelWidth
                                    anchors.baseline:   factCombo.baseline
                                    text:               unitsRepeater.names[index]
                                }
                                FactComboBox {
                                    id:                 factCombo
                                    width:              _editFieldWidth
                                    fact:               modelData
                                    indexModel:         false
                                }
109 110 111 112
                            }
                        }
                    }
                }
113

114
                //-----------------------------------------------------------------
115
                //-- Miscellanous
116
                Item {
117
                    width:                      _qgcView.width * 0.8
118 119 120 121
                    height:                     miscLabel.height
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.appSettings.visible
122
                    QGCLabel {
123
                        id:             miscLabel
124
                        text:           qsTr("Miscellaneous")
125
                        font.family:    ScreenTools.demiboldFontFamily
126
                    }
127 128
                }
                Rectangle {
129
                    height:                     miscCol.height + (ScreenTools.defaultFontPixelHeight * 2)
130
                    width:                      _qgcView.width * 0.8
131 132 133 134
                    color:                      qgcPal.windowShade
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.appSettings.visible
135 136 137 138 139 140 141
                    Column {
                        id:         miscCol
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.centerIn: parent
                        //-----------------------------------------------------------------
                        //-- Base UI Font Point Size
                        Row {
Gus Grubba's avatar
Gus Grubba committed
142
                            visible: _appFontPointSize ? _appFontPointSize.visible : false
143 144 145
                            spacing: ScreenTools.defaultFontPixelWidth
                            QGCLabel {
                                id:     baseFontLabel
146
                                text:   qsTr("Font size:")
147 148 149 150 151 152 153 154 155 156 157 158
                                anchors.verticalCenter: parent.verticalCenter
                            }
                            Row {
                                id:         baseFontRow
                                spacing:    ScreenTools.defaultFontPixelWidth / 2
                                anchors.verticalCenter: parent.verticalCenter
                                QGCButton {
                                    id:     decrementButton
                                    width:  height
                                    height: baseFontEdit.height
                                    text:   "-"
                                    onClicked: {
159 160
                                        if (_appFontPointSize.value > _appFontPointSize.min) {
                                            _appFontPointSize.value = _appFontPointSize.value - 1
161 162 163
                                        }
                                    }
                                }
164 165 166 167
                                FactTextField {
                                    id:     baseFontEdit
                                    width:  _editFieldWidth - (decrementButton.width * 2) - (baseFontRow.spacing * 2)
                                    fact:   QGroundControl.settingsManager.appSettings.appFontPointSize
168 169 170 171 172 173
                                }
                                QGCButton {
                                    width:  height
                                    height: baseFontEdit.height
                                    text:   "+"
                                    onClicked: {
174 175
                                        if (_appFontPointSize.value < _appFontPointSize.max) {
                                            _appFontPointSize.value = _appFontPointSize.value + 1
176 177 178 179 180 181
                                        }
                                    }
                                }
                            }
                            QGCLabel {
                                anchors.verticalCenter: parent.verticalCenter
182
                                text:                   _requiresRestart
183 184 185
                            }
                        }
                        //-----------------------------------------------------------------
186 187 188
                        //-- Palette Styles
                        Row {
                            spacing: ScreenTools.defaultFontPixelWidth
189
                            visible: QGroundControl.settingsManager.appSettings.indoorPalette.visible
190
                            QGCLabel {
Gus Grubba's avatar
Gus Grubba committed
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
                                text:           qsTr("Color scheme:")
                                width:          _labelWidth
                                anchors.verticalCenter: parent.verticalCenter
                            }
                            FactComboBox {
                                width:          _editFieldWidth
                                fact:           QGroundControl.settingsManager.appSettings.indoorPalette
                                indexModel:     false
                                anchors.verticalCenter: parent.verticalCenter
                            }
                        }
                        //-----------------------------------------------------------------
                        //-- Map Provider
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
                            visible:    _mapProvider.visible
                            QGCLabel {
                                text:       qsTr("Map Provider:")
                                width:      _labelWidth
                                anchors.verticalCenter: parent.verticalCenter
                            }
                            FactComboBox {
                                width:      _editFieldWidth
                                fact:       _mapProvider
                                indexModel: false
                                anchors.verticalCenter: parent.verticalCenter
                            }
                        }
                        //-----------------------------------------------------------------
                        //-- Map Type
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
                            visible:    _mapType.visible
                            QGCLabel {
                                text:               qsTr("Map Type:")
226
                                width:              _labelWidth
Gus Grubba's avatar
Gus Grubba committed
227
                                anchors.verticalCenter: parent.verticalCenter
228
                            }
229
                            FactComboBox {
Gus Grubba's avatar
Gus Grubba committed
230
                                id:         mapTypes
231
                                width:      _editFieldWidth
Gus Grubba's avatar
Gus Grubba committed
232
                                fact:       _mapType
233
                                indexModel: false
Gus Grubba's avatar
Gus Grubba committed
234 235 236 237 238 239 240
                                anchors.verticalCenter: parent.verticalCenter
                                Connections {
                                    target: QGroundControl.settingsManager.flightMapSettings
                                    onMapTypeChanged: {
                                        mapTypes.model = _mapType.enumStrings
                                    }
                                }
241 242 243
                            }
                        }
                        //-----------------------------------------------------------------
244
                        //-- Audio preferences
245
                        FactCheckBox {
246 247 248 249
                            text:       qsTr("Mute all audio output")
                            fact:       _audioMuted
                            visible:    _audioMuted.visible
                            property Fact _audioMuted: QGroundControl.settingsManager.appSettings.audioMuted
250 251
                        }
                        //-----------------------------------------------------------------
252
                        //-- Save telemetry log
253
                        FactCheckBox {
254
                            id:         promptSaveLog
255 256 257 258
                            text:       qsTr("Save telemetry log after each flight")
                            fact:       _telemetrySave
                            visible:    !ScreenTools.isMobile && _telemetrySave.visible
                            property Fact _telemetrySave: QGroundControl.settingsManager.appSettings.telemetrySave
259 260
                        }
                        //-----------------------------------------------------------------
261
                        //-- Save even if not armed
262
                        FactCheckBox {
263 264 265
                            text:       qsTr("Save telemetry log even if vehicle was not armed")
                            fact:       _telemetrySaveNotArmed
                            visible:    !ScreenTools.isMobile && _telemetrySaveNotArmed.visible
266
                            enabled:    promptSaveLog.checked
267
                            property Fact _telemetrySaveNotArmed: QGroundControl.settingsManager.appSettings.telemetrySaveNotArmed
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
                        }
                        //-----------------------------------------------------------------
                        //-- Clear settings
                        QGCCheckBox {
                            id:         clearCheck
                            text:       qsTr("Clear all settings on next start")
                            checked:    false
                            onClicked: {
                                checked ? clearDialog.visible = true : QGroundControl.clearDeleteAllSettingsNextBoot()
                            }
                            MessageDialog {
                                id:         clearDialog
                                visible:    false
                                icon:       StandardIcon.Warning
                                standardButtons: StandardButton.Yes | StandardButton.No
                                title:      qsTr("Clear Settings")
284
                                text:       qsTr("All saved settings will be reset the next time you start %1. Is this really what you want?").arg(QGroundControl.appName)
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
                                onYes: {
                                    QGroundControl.deleteAllSettingsNextBoot()
                                    clearDialog.visible = false
                                }
                                onNo: {
                                    clearCheck.checked  = false
                                    clearDialog.visible = false
                                }
                            }
                        }
                        //-----------------------------------------------------------------
                        //-- Battery talker
                        Row {
                            spacing: ScreenTools.defaultFontPixelWidth
                            QGCCheckBox {
                                id:                 announcePercentCheckbox
                                text:               qsTr("Announce battery lower than:")
Gus Grubba's avatar
Gus Grubba committed
302 303 304
                                checked:            _percentRemainingAnnounce.value !== 0
                                width:              (_labelWidth + _editFieldWidth) * 0.65
                                anchors.verticalCenter: parent.verticalCenter
305 306 307 308 309 310 311 312 313 314 315
                                onClicked: {
                                    if (checked) {
                                        _percentRemainingAnnounce.value = _percentRemainingAnnounce.defaultValueString
                                    } else {
                                        _percentRemainingAnnounce.value = 0
                                    }
                                }
                            }
                            FactTextField {
                                id:                 announcePercent
                                fact:               _percentRemainingAnnounce
Gus Grubba's avatar
Gus Grubba committed
316
                                width:              (_labelWidth + _editFieldWidth) * 0.35
317 318 319 320 321 322
                                enabled:            announcePercentCheckbox.checked
                                anchors.verticalCenter: parent.verticalCenter
                            }
                        }
                        //-----------------------------------------------------------------
                        //-- Virtual joystick settings
323
                        FactCheckBox {
324
                            text:       qsTr("Virtual Joystick")
325 326 327 328
                            visible:    _virtualJoystick.visible
                            fact:       _virtualJoystick

                            property Fact _virtualJoystick: QGroundControl.settingsManager.appSettings.virtualJoystick
329 330
                        }
                        //-----------------------------------------------------------------
331 332 333
                        //-- Default mission item altitude
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
Donald Gagne's avatar
Donald Gagne committed
334
                            visible:    QGroundControl.settingsManager.appSettings.defaultMissionItemAltitude.visible
335
                            QGCLabel {
Gus Grubba's avatar
Gus Grubba committed
336 337 338
                                anchors.verticalCenter: parent.verticalCenter
                                width:  (_labelWidth + _editFieldWidth) * 0.65
                                text:   qsTr("Default mission altitude:")
339 340 341
                            }
                            FactTextField {
                                id:     defaultItemAltitudeField
Gus Grubba's avatar
Gus Grubba committed
342
                                width:  (_labelWidth + _editFieldWidth) * 0.35
343
                                fact:   QGroundControl.settingsManager.appSettings.defaultMissionItemAltitude
Gus Grubba's avatar
Gus Grubba committed
344
                                anchors.verticalCenter: parent.verticalCenter
345 346
                            }
                        }
347

348
                        //-----------------------------------------------------------------
349
                        //-- Mission AutoLoad
350 351 352 353 354 355 356 357 358 359
                        FactCheckBox {
                            text:       qsTr("AutoLoad missions")
                            fact:       _autoLoad
                            visible:    _autoLoad.visible

                            property Fact _autoLoad: QGroundControl.settingsManager.appSettings.autoLoadMissions
                        }

                        //-----------------------------------------------------------------
                        //-- Save path
Don Gagne's avatar
Don Gagne committed
360
                        Row {
DonLakeFlyer's avatar
DonLakeFlyer committed
361
                            spacing:    ScreenTools.defaultFontPixelWidth
362
                            visible:    _savePath.visible
DonLakeFlyer's avatar
DonLakeFlyer committed
363

364 365 366
                            QGCLabel {
                                anchors.baseline:   savePathBrowse.baseline
                                text:               qsTr("File save path:")
Don Gagne's avatar
Don Gagne committed
367
                            }
368 369 370
                            QGCLabel {
                                anchors.baseline:   savePathBrowse.baseline
                                text:               _savePath.rawValue === "" ? qsTr("<not set>") : _savePath.value
371 372
                            }
                            QGCButton {
373 374 375 376 377 378 379 380 381 382
                                id:         savePathBrowse
                                text:       "Browse"
                                onClicked:  savePathBrowseDialog.openForLoad()

                                QGCFileDialog {
                                    id:             savePathBrowseDialog
                                    qgcView:        _qgcView
                                    title:          qsTr("Choose the location to save files:")
                                    folder:         _savePath.rawValue
                                    selectExisting: true
383
                                    selectFolder:   true
384 385

                                    onAcceptedForLoad: _savePath.rawValue = file
386
                                }
Don Gagne's avatar
Don Gagne committed
387 388
                            }
                        }
dogmaphobic's avatar
dogmaphobic committed
389 390
                    }
                }
391

Don Gagne's avatar
Don Gagne committed
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435
                //-----------------------------------------------------------------
                //-- RTK GPS
                Item {
                    width:                      _qgcView.width * 0.8
                    height:                     unitLabel.height
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.rtkSettings.visible
                    QGCLabel {
                        id:             rtkLabel
                        text:           qsTr("RTK GPS (Requires Restart)")
                        font.family:    ScreenTools.demiboldFontFamily
                    }
                }
                Rectangle {
                    height:                     rtkGrid.height + (ScreenTools.defaultFontPixelHeight * 2)
                    width:                      _qgcView.width * 0.8
                    color:                      qgcPal.windowShade
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.rtkSettings.visible
                    GridLayout {
                        id:                 rtkGrid
                        anchors.centerIn:   parent
                        columns:            2
                        rowSpacing:         ScreenTools.defaultFontPixelWidth
                        columnSpacing:      ScreenTools.defaultFontPixelWidth

                        QGCLabel {
                            text:               qsTr("Survey in accuracy:")
                        }
                        FactTextField {
                            fact:               QGroundControl.settingsManager.rtkSettings.surveyInAccuracyLimit
                        }

                        QGCLabel {
                            text:               qsTr("Minumum observation duration:")
                        }
                        FactTextField {
                            fact:               QGroundControl.settingsManager.rtkSettings.surveyInMinObservationDuration
                        }
                    }
                }

436 437 438
                //-----------------------------------------------------------------
                //-- Autoconnect settings
                Item {
439
                    width:                      _qgcView.width * 0.8
440 441 442 443
                    height:                     autoConnectLabel.height
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.autoConnectSettings.visible
444
                    QGCLabel {
445
                        id:             autoConnectLabel
Don Gagne's avatar
Don Gagne committed
446
                        text:           qsTr("AutoConnect to the following devices:")
447
                        font.family:    ScreenTools.demiboldFontFamily
448 449
                    }
                }
450
                Rectangle {
451
                    height:                     autoConnectCol.height + (ScreenTools.defaultFontPixelHeight * 2)
452
                    width:                      _qgcView.width * 0.8
453 454 455 456
                    color:                      qgcPal.windowShade
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.autoConnectSettings.visible
457

458 459 460 461
                    Column {
                        id:         autoConnectCol
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.centerIn: parent
462

463 464
                        Row {
                            spacing: ScreenTools.defaultFontPixelWidth * 2
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482

                            Repeater {
                                id:     autoConnectRepeater
                                model:  [ QGroundControl.settingsManager.autoConnectSettings.autoConnectPixhawk,
                                    QGroundControl.settingsManager.autoConnectSettings.autoConnectSiKRadio,
                                    QGroundControl.settingsManager.autoConnectSettings.autoConnectPX4Flow,
                                    QGroundControl.settingsManager.autoConnectSettings.autoConnectLibrePilot,
                                    QGroundControl.settingsManager.autoConnectSettings.autoConnectUDP,
                                    QGroundControl.settingsManager.autoConnectSettings.autoConnectRTKGPS
                                ]

                                property var names: [ qsTr("Pixhawk"), qsTr("SiK Radio"), qsTr("PX4 Flow"), qsTr("LibrePilot"), qsTr("UDP"), qsTr("RTK GPS") ]

                                FactCheckBox {
                                    text:       autoConnectRepeater.names[index]
                                    fact:       modelData
                                    visible:    !ScreenTools.isiOS && modelData.visible
                                }
483 484
                            }
                        }
485 486
                    }
                }
487

488 489 490
                //-----------------------------------------------------------------
                //-- Video Source
                Item {
491
                    width:                      _qgcView.width * 0.8
492 493 494 495
                    height:                     videoLabel.height
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.videoSettings.visible
496 497
                    QGCLabel {
                        id:             videoLabel
498
                        text:           qsTr("Video")
499 500 501 502
                        font.family:    ScreenTools.demiboldFontFamily
                    }
                }
                Rectangle {
503
                    height:                     videoCol.height + (ScreenTools.defaultFontPixelHeight * 2)
504
                    width:                      _qgcView.width * 0.8
505 506 507 508
                    color:                      qgcPal.windowShade
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.videoSettings.visible
509

510 511 512 513
                    Column {
                        id:         videoCol
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.centerIn: parent
514 515


516 517
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
518
                            visible:    QGroundControl.settingsManager.videoSettings.videoSource.visible
519 520 521 522 523
                            QGCLabel {
                                anchors.baseline:   videoSource.baseline
                                text:               qsTr("Video Source:")
                                width:              _labelWidth
                            }
524 525 526 527 528
                            FactComboBox {
                                id:         videoSource
                                width:      _editFieldWidth
                                indexModel: false
                                fact:       QGroundControl.settingsManager.videoSettings.videoSource
529 530 531 532
                            }
                        }
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
533
                            visible:    QGroundControl.settingsManager.videoSettings.udpPort.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 0
534 535 536 537 538
                            QGCLabel {
                                anchors.baseline:   udpField.baseline
                                text:               qsTr("UDP Port:")
                                width:              _labelWidth
                            }
539
                            FactTextField {
540 541
                                id:                 udpField
                                width:              _editFieldWidth
542
                                fact:               QGroundControl.settingsManager.videoSettings.udpPort
543 544 545 546
                            }
                        }
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
547
                            visible:    QGroundControl.settingsManager.videoSettings.rtspUrl.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 1
548 549 550 551 552
                            QGCLabel {
                                anchors.baseline:   rtspField.baseline
                                text:               qsTr("RTSP URL:")
                                width:              _labelWidth
                            }
553
                            FactTextField {
554 555
                                id:                 rtspField
                                width:              _editFieldWidth
556
                                fact:               QGroundControl.settingsManager.videoSettings.rtspUrl
557 558
                            }
                        }
559
                        Row {
560
                            spacing:    ScreenTools.defaultFontPixelWidth
561
                            visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex < 2 && QGroundControl.settingsManager.videoSettings.aspectRatio.visible
562 563 564 565 566 567 568 569 570 571 572 573
                            QGCLabel {
                                anchors.baseline:   aspectField.baseline
                                text:               qsTr("Aspect Ratio:")
                                width:              _labelWidth
                            }
                            FactTextField {
                                id:                 aspectField
                                width:              _editFieldWidth
                                fact:               QGroundControl.settingsManager.videoSettings.aspectRatio
                            }
                        }
                        Row {
574 575 576 577 578 579 580 581 582 583 584 585 586 587
                            spacing:    ScreenTools.defaultFontPixelWidth
                            visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex < 2 && QGroundControl.settingsManager.videoSettings.gridLines.visible
                            QGCLabel {
                                anchors.baseline:   gridField.baseline
                                text:               qsTr("Grid Lines:")
                                width:              _labelWidth
                            }
                            FactComboBox {
                                id:                 gridField
                                width:              _editFieldWidth
                                fact:               QGroundControl.settingsManager.videoSettings.gridLines
                            }
                        }
                        Row {
588
                            spacing:    ScreenTools.defaultFontPixelWidth
589
                            visible:    QGroundControl.settingsManager.videoSettings.videoSavePath.visible && QGroundControl.videoManager.isGStreamer && QGroundControl.videoManager.recordingEnabled
590

591
                            QGCLabel {
592 593 594
                                anchors.baseline:   videoBrowse.baseline
                                text:               qsTr("Save path:")
                                enabled:            promptSaveLog.checked
595
                            }
596 597 598
                            QGCLabel {
                                anchors.baseline:   videoBrowse.baseline
                                text:               _videoPath.value == "" ? qsTr("<not set>") : _videoPath.value
599
                            }
600
                            QGCButton {
601
                                id:         videoBrowse
602
                                text:       "Browse"
603
                                onClicked:  videoDialog.openForLoad()
604

605
                                QGCFileDialog {
606
                                    id:             videoDialog
607
                                    title:          "Choose a location to save video files."
608
                                    folder:         "file://" + _videoPath.value
609
                                    selectFolder:   true
610 611 612 613

                                    onAcceptedForLoad: {
                                        _videoPath.value = file
                                    }
614
                                }
615 616
                            }
                        }
617
                    }
618
                } // Video Source - Rectangle
619 620 621

                QGCLabel {
                    anchors.horizontalCenter:   parent.horizontalCenter
622
                    text:                       qsTr("%1 Version: %2").arg(QGroundControl.appName).arg(QGroundControl.qgcVersion)
623
                }
624 625
            } // settingsColumn
        } // QGCFlickable
626 627
    } // QGCViewPanel
} // QGCView