GeneralSettings.qml 36.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.
 *
 ****************************************************************************/
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 41
    property Fact _mapProvider:                 QGroundControl.settingsManager.flightMapSettings.mapProvider
    property Fact _mapType:                     QGroundControl.settingsManager.flightMapSettings.mapType
42 43

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

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

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

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

                        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
                                }
108 109 110 111
                            }
                        }
                    }
                }
112

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

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

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

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

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

363 364
                            QGCLabel {
                                anchors.baseline:   savePathBrowse.baseline
365
                                text:               qsTr("File Save Path:")
Don Gagne's avatar
Don Gagne committed
366
                            }
367 368 369
                            QGCLabel {
                                anchors.baseline:   savePathBrowse.baseline
                                text:               _savePath.rawValue === "" ? qsTr("<not set>") : _savePath.value
370 371
                            }
                            QGCButton {
372 373 374 375 376 377 378 379 380 381
                                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
382
                                    selectFolder:   true
383 384

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

Don Gagne's avatar
Don Gagne committed
391 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
                //-----------------------------------------------------------------
                //-- 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 {
Patrick José Pereira's avatar
Patrick José Pereira committed
427
                            text:               qsTr("Minimum observation duration:")
Don Gagne's avatar
Don Gagne committed
428 429 430 431 432 433 434
                        }
                        FactTextField {
                            fact:               QGroundControl.settingsManager.rtkSettings.surveyInMinObservationDuration
                        }
                    }
                }

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

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

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

                            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
                                }
482 483
                            }
                        }
484 485
                    }
                }
486

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

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

514 515
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
516
                            visible:    QGroundControl.settingsManager.videoSettings.videoSource.visible
517 518 519
                            QGCLabel {
                                text:               qsTr("Video Source:")
                                width:              _labelWidth
520
                                anchors.verticalCenter: parent.verticalCenter
521
                            }
522 523 524 525 526
                            FactComboBox {
                                id:         videoSource
                                width:      _editFieldWidth
                                indexModel: false
                                fact:       QGroundControl.settingsManager.videoSettings.videoSource
527
                                anchors.verticalCenter: parent.verticalCenter
528 529 530 531
                            }
                        }
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
532
                            visible:    QGroundControl.settingsManager.videoSettings.udpPort.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 1
533 534 535
                            QGCLabel {
                                text:               qsTr("UDP Port:")
                                width:              _labelWidth
536
                                anchors.verticalCenter: parent.verticalCenter
537
                            }
538
                            FactTextField {
539
                                width:              _editFieldWidth
540
                                fact:               QGroundControl.settingsManager.videoSettings.udpPort
541
                                anchors.verticalCenter: parent.verticalCenter
542 543 544 545
                            }
                        }
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
546
                            visible:    QGroundControl.settingsManager.videoSettings.rtspUrl.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 2
547
                            QGCLabel {
548
                                anchors.verticalCenter: parent.verticalCenter
549 550 551
                                text:               qsTr("RTSP URL:")
                                width:              _labelWidth
                            }
552
                            FactTextField {
553
                                width:              _editFieldWidth
554
                                fact:               QGroundControl.settingsManager.videoSettings.rtspUrl
555
                                anchors.verticalCenter: parent.verticalCenter
556 557
                            }
                        }
558
                        Row {
559
                            spacing:    ScreenTools.defaultFontPixelWidth
560
                            visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.aspectRatio.visible
561 562 563
                            QGCLabel {
                                text:               qsTr("Aspect Ratio:")
                                width:              _labelWidth
564
                                anchors.verticalCenter: parent.verticalCenter
565 566 567 568
                            }
                            FactTextField {
                                width:              _editFieldWidth
                                fact:               QGroundControl.settingsManager.videoSettings.aspectRatio
569
                                anchors.verticalCenter: parent.verticalCenter
570 571 572
                            }
                        }
                        Row {
573
                            spacing:    ScreenTools.defaultFontPixelWidth
574
                            visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.gridLines.visible
575 576 577
                            QGCLabel {
                                text:               qsTr("Grid Lines:")
                                width:              _labelWidth
578
                                anchors.verticalCenter: parent.verticalCenter
579 580 581 582
                            }
                            FactComboBox {
                                width:              _editFieldWidth
                                fact:               QGroundControl.settingsManager.videoSettings.gridLines
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615
                                anchors.verticalCenter: parent.verticalCenter
                            }
                        }
                    }
                } // Video Source - Rectangle
                //-----------------------------------------------------------------
                //-- Video Source
                Item {
                    width:                      _qgcView.width * 0.8
                    height:                     videoRecLabel.height
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.videoSettings.visible
                    QGCLabel {
                        id:             videoRecLabel
                        text:           qsTr("Video Recording")
                        font.family:    ScreenTools.demiboldFontFamily
                    }
                }
                Rectangle {
                    height:                     videoRecCol.height + (ScreenTools.defaultFontPixelHeight * 2)
                    width:                      _qgcView.width * 0.8
                    color:                      qgcPal.windowShade
                    anchors.margins:            ScreenTools.defaultFontPixelWidth
                    anchors.horizontalCenter:   parent.horizontalCenter
                    visible:                    QGroundControl.settingsManager.videoSettings.visible

                    Column {
                        id:         videoRecCol
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.centerIn: parent
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
616
                            visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.maxVideoSize.visible
617 618 619 620 621 622 623 624 625 626 627 628 629
                            QGCLabel {
                                text:               qsTr("Max Storage Usage:")
                                width:              _labelWidth
                                anchors.verticalCenter: parent.verticalCenter
                            }
                            FactTextField {
                                width:              _editFieldWidth
                                fact:               QGroundControl.settingsManager.videoSettings.maxVideoSize
                                anchors.verticalCenter: parent.verticalCenter
                            }
                        }
                        Row {
                            spacing:    ScreenTools.defaultFontPixelWidth
630
                            visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.recordingFormat.visible
631 632 633 634 635 636 637 638 639
                            QGCLabel {
                                text:               qsTr("Video File Format:")
                                width:              _labelWidth
                                anchors.verticalCenter: parent.verticalCenter
                            }
                            FactComboBox {
                                width:              _editFieldWidth
                                fact:               QGroundControl.settingsManager.videoSettings.recordingFormat
                                anchors.verticalCenter: parent.verticalCenter
640 641
                            }
                        }
642
                    }
643
                }
644 645 646

                QGCLabel {
                    anchors.horizontalCenter:   parent.horizontalCenter
647
                    text:                       qsTr("%1 Version: %2").arg(QGroundControl.appName).arg(QGroundControl.qgcVersion)
648
                }
649 650
            } // settingsColumn
        } // QGCFlickable
651 652
    } // QGCViewPanel
} // QGCView