GeneralSettings.qml 42 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
import QtQuick.Layouts          1.2
dogmaphobic's avatar
dogmaphobic committed
16 17 18

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

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

34
    property Fact _percentRemainingAnnounce:    QGroundControl.settingsManager.appSettings.batteryPercentRemainingAnnounce
35
    property Fact _savePath:                    QGroundControl.settingsManager.appSettings.savePath
36
    property Fact _appFontPointSize:            QGroundControl.settingsManager.appSettings.appFontPointSize
37 38
    property Fact _userBrandImageIndoor:        QGroundControl.settingsManager.brandImageSettings.userBrandImageIndoor
    property Fact _userBrandImageOutdoor:       QGroundControl.settingsManager.brandImageSettings.userBrandImageOutdoor
39
    property real _labelWidth:                  ScreenTools.defaultFontPixelWidth * 20
40 41
    property real _comboFieldWidth:             ScreenTools.defaultFontPixelWidth * 25
    property real _valueFieldWidth:             ScreenTools.defaultFontPixelWidth * 8
42 43
    property Fact _mapProvider:                 QGroundControl.settingsManager.flightMapSettings.mapProvider
    property Fact _mapType:                     QGroundControl.settingsManager.flightMapSettings.mapType
44
    property Fact _followTarget:                QGroundControl.settingsManager.appSettings.followTarget
Don Gagne's avatar
Don Gagne committed
45
    property real _panelWidth:                  _qgcView.width * _internalWidthRatio
46
    property real _margins:                     ScreenTools.defaultFontPixelWidth
Don Gagne's avatar
Don Gagne committed
47 48

    readonly property real _internalWidthRatio:          0.8
49 50

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

52
    QGCPalette { id: qgcPal }
dogmaphobic's avatar
dogmaphobic committed
53

54 55 56
    QGCViewPanel {
        id:             panel
        anchors.fill:   parent
57

58 59 60
        QGCFlickable {
            clip:               true
            anchors.fill:       parent
61 62
            contentHeight:      outerItem.height
            contentWidth:       outerItem.width
63

64 65 66 67
            Item {
                id:     outerItem
                width:  Math.max(panel.width, settingsColumn.width)
                height: settingsColumn.height
68

69 70 71
                ColumnLayout {
                    id:                         settingsColumn
                    anchors.horizontalCenter:   parent.horizontalCenter
72

73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
                    QGCLabel {
                        id:         unitsSectionLabel
                        text:       qsTr("Units (Requires Restart)")
                        visible:    QGroundControl.settingsManager.unitsSettings.visible
                    }
                    Rectangle {
                        Layout.preferredHeight: unitsGrid.height + (_margins * 2)
                        Layout.preferredWidth:  unitsGrid.width + (_margins * 2)
                        color:                  qgcPal.windowShade
                        visible:                miscSectionLabel.visible
                        Layout.fillWidth:       true

                        GridLayout {
                            id:                         unitsGrid
                            anchors.topMargin:          _margins
                            anchors.top:                parent.top
                            Layout.fillWidth:           false
                            anchors.horizontalCenter:   parent.horizontalCenter
                            flow:                       GridLayout.TopToBottom
                            rows:                       4
93

94 95 96 97 98 99
                            Repeater {
                                model: [ qsTr("Distance"), qsTr("Area"), qsTr("Speed"), qsTr("Temperature") ]
                                QGCLabel { text: modelData }
                            }
                            Repeater {
                                model:  [ QGroundControl.settingsManager.unitsSettings.distanceUnits, QGroundControl.settingsManager.unitsSettings.areaUnits, QGroundControl.settingsManager.unitsSettings.speedUnits, QGroundControl.settingsManager.unitsSettings.temperatureUnits ]
100
                                FactComboBox {
101 102 103
                                    Layout.preferredWidth:  _comboFieldWidth
                                    fact:                   modelData
                                    indexModel:             false
104
                                }
105 106 107
                            }
                        }
                    }
108 109 110

                    Item { width: 1; height: _margins }

111
                    QGCLabel {
112 113 114
                        id:         miscSectionLabel
                        text:       qsTr("Miscellaneous")
                        visible:    QGroundControl.settingsManager.appSettings.visible
115
                    }
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
                    Rectangle {
                        Layout.preferredWidth:  Math.max(comboGrid.width, miscCol.width) + (_margins * 2)
                        Layout.preferredHeight: (pathRow.visible ? pathRow.y + pathRow.height : miscColItem.y + miscColItem.height)  + (_margins * 2)
                        Layout.fillWidth:       true
                        color:                  qgcPal.windowShade
                        visible:                miscSectionLabel.visible

                        Item {
                            id:                 comboGridItem
                            anchors.margins:    _margins
                            anchors.top:        parent.top
                            anchors.left:       parent.left
                            anchors.right:      parent.right
                            height:             comboGrid.height

                            GridLayout {
                                id:                         comboGrid
                                anchors.horizontalCenter:   parent.horizontalCenter
                                columns:                    2

                                QGCLabel {
                                    text:           qsTr("Color Scheme")
                                    visible: QGroundControl.settingsManager.appSettings.indoorPalette.visible
139
                                }
140 141 142 143 144
                                FactComboBox {
                                    Layout.preferredWidth:  _comboFieldWidth
                                    fact:                   QGroundControl.settingsManager.appSettings.indoorPalette
                                    indexModel:             false
                                    visible:                QGroundControl.settingsManager.appSettings.indoorPalette.visible
145
                                }
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172

                                QGCLabel {
                                    text:       qsTr("Map Provider")
                                    width:      _labelWidth
                                    visible:    _mapProvider.visible
                                }
                                FactComboBox {
                                    Layout.preferredWidth:  _comboFieldWidth
                                    fact:                   _mapProvider
                                    indexModel:             false
                                    visible:                _mapProvider.visible
                                }

                                QGCLabel {
                                    text:       qsTr("Map Type")
                                    visible:    _mapType.visible
                                }
                                FactComboBox {
                                    id:                     mapTypes
                                    Layout.preferredWidth:  _comboFieldWidth
                                    fact:                   _mapType
                                    indexModel:             false
                                    visible:                _mapType.visible
                                    Connections {
                                        target: QGroundControl.settingsManager.flightMapSettings
                                        onMapTypeChanged: {
                                            mapTypes.model = _mapType.enumStrings
173 174 175
                                        }
                                    }
                                }
176 177 178 179 180 181 182 183 184 185 186

                                QGCLabel {
                                    text:       qsTr("Stream GCS Position")
                                    visible:    _followTarget.visible
                                }
                                FactComboBox {
                                    Layout.preferredWidth:  _comboFieldWidth
                                    fact:                   _followTarget
                                    indexModel:             false
                                    visible:                _followTarget.visible
                                }
Gus Grubba's avatar
Gus Grubba committed
187 188
                            }
                        }
189 190 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 226 227 228 229 230 231 232 233 234 235 236 237

                        Item {
                            id:                 miscColItem
                            anchors.margins:    _margins
                            anchors.left:       parent.left
                            anchors.right:      parent.right
                            anchors.top:        comboGridItem.bottom
                            height:             miscCol.height

                            ColumnLayout {
                                id:                         miscCol
                                anchors.horizontalCenter:   parent.horizontalCenter
                                spacing:                    _margins

                                RowLayout {
                                    Layout.fillWidth:   false
                                    Layout.alignment:   Qt.AlignHCenter
                                    visible:            _appFontPointSize ? _appFontPointSize.visible : false

                                    QGCLabel {
                                        text:   qsTr("Font Size:")
                                    }
                                    QGCButton {
                                        Layout.preferredWidth:  height
                                        Layout.preferredHeight: baseFontEdit.height
                                        text:                   "-"
                                        onClicked: {
                                            if (_appFontPointSize.value > _appFontPointSize.min) {
                                                _appFontPointSize.value = _appFontPointSize.value - 1
                                            }
                                        }
                                    }
                                    FactTextField {
                                        id:                     baseFontEdit
                                        Layout.preferredWidth:  _valueFieldWidth
                                        fact:                   QGroundControl.settingsManager.appSettings.appFontPointSize
                                    }
                                    QGCButton {
                                        Layout.preferredWidth:  height
                                        Layout.preferredHeight: baseFontEdit.height
                                        text:                   "+"
                                        onClicked: {
                                            if (_appFontPointSize.value < _appFontPointSize.max) {
                                                _appFontPointSize.value = _appFontPointSize.value + 1
                                            }
                                        }
                                    }
                                    QGCLabel {
                                        text: _requiresRestart
Gus Grubba's avatar
Gus Grubba committed
238 239
                                    }
                                }
240 241 242 243 244 245 246


                                FactCheckBox {
                                    text:       qsTr("Mute all audio output")
                                    fact:       _audioMuted
                                    visible:    _audioMuted.visible
                                    property Fact _audioMuted: QGroundControl.settingsManager.appSettings.audioMuted
247
                                }
248 249 250 251 252 253 254

                                FactCheckBox {
                                    id:         promptSaveLog
                                    text:       qsTr("Save telemetry log after each flight")
                                    fact:       _telemetrySave
                                    visible:    _telemetrySave.visible
                                    property Fact _telemetrySave: QGroundControl.settingsManager.appSettings.telemetrySave
255
                                }
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310

                                FactCheckBox {
                                    text:       qsTr("Save telemetry log even if vehicle was not armed")
                                    fact:       _telemetrySaveNotArmed
                                    visible:    _telemetrySaveNotArmed.visible
                                    enabled:    promptSaveLog.checked
                                    property Fact _telemetrySaveNotArmed: QGroundControl.settingsManager.appSettings.telemetrySaveNotArmed
                                }

                                FactCheckBox {
                                    text:       qsTr("Use preflight checklist")
                                    fact:       _useChecklist
                                    visible:    _useChecklist.visible

                                    property Fact _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist
                                }

                                FactCheckBox {
                                    text:       qsTr("Virtual Joystick")
                                    visible:    _virtualJoystick.visible
                                    fact:       _virtualJoystick

                                    property Fact _virtualJoystick: QGroundControl.settingsManager.appSettings.virtualJoystick
                                }

                                FactCheckBox {
                                    text:       qsTr("AutoLoad Missions")
                                    fact:       _autoLoad
                                    visible:    _autoLoad.visible

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

                                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")
                                        text:               qsTr("All saved settings will be reset the next time you start %1. Is this really what you want?").arg(QGroundControl.appName)
                                        onYes: {
                                            QGroundControl.deleteAllSettingsNextBoot()
                                            clearDialog.visible = false
                                        }
                                        onNo: {
                                            clearCheck.checked  = false
                                            clearDialog.visible = false
                                        }
311 312
                                    }
                                }
313

314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
                                RowLayout {
                                    visible: QGroundControl.settingsManager.appSettings.batteryPercentRemainingAnnounce.visible

                                    QGCCheckBox {
                                        id:         announcePercentCheckbox
                                        text:       qsTr("Announce battery lower than")
                                        checked:    _percentRemainingAnnounce.value !== 0
                                        onClicked: {
                                            if (checked) {
                                                _percentRemainingAnnounce.value = _percentRemainingAnnounce.defaultValueString
                                            } else {
                                                _percentRemainingAnnounce.value = 0
                                            }
                                        }
                                    }
                                    FactTextField {
                                        fact:                   _percentRemainingAnnounce
                                        Layout.preferredWidth:  _valueFieldWidth
                                        enabled:                announcePercentCheckbox.checked
                                    }
                                }
335

336 337 338
                                RowLayout {
                                    spacing:    ScreenTools.defaultFontPixelWidth
                                    visible:    QGroundControl.settingsManager.appSettings.defaultMissionItemAltitude.visible
339

340 341 342 343 344 345 346
                                    QGCLabel { text: qsTr("Default Mission Altitude") }
                                    FactTextField {
                                        Layout.preferredWidth:  _valueFieldWidth
                                        fact:                   QGroundControl.settingsManager.appSettings.defaultMissionItemAltitude
                                    }
                                }
                            }
347 348 349 350
                        }

                        //-----------------------------------------------------------------
                        //-- Save path
Don Gagne's avatar
Don Gagne committed
351
                        RowLayout {
352 353 354 355 356 357 358 359 360 361 362 363
                            id:                 pathRow
                            anchors.margins:    _margins
                            anchors.left:       parent.left
                            anchors.right:      parent.right
                            anchors.top:        miscColItem.bottom
                            visible:            _savePath.visible && !ScreenTools.isMobile

                            QGCLabel { text: qsTr("Application Load/Save Path") }
                            QGCTextField {
                                Layout.fillWidth:   true
                                readOnly:           true
                                text:               _savePath.rawValue === "" ? qsTr("<not set>") : _savePath.value
364 365
                            }
                            QGCButton {
366
                                text:       qsTr("Browse")
367 368 369 370 371
                                onClicked:  savePathBrowseDialog.openForLoad()

                                QGCFileDialog {
                                    id:             savePathBrowseDialog
                                    qgcView:        _qgcView
372
                                    title:          qsTr("Choose the location to save/load files")
373 374
                                    folder:         _savePath.rawValue
                                    selectExisting: true
375
                                    selectFolder:   true
376 377

                                    onAcceptedForLoad: _savePath.rawValue = file
378
                                }
Don Gagne's avatar
Don Gagne committed
379 380
                            }
                        }
381
                    }
382

383
                    Item { width: 1; height: _margins }
384

Don Gagne's avatar
Don Gagne committed
385
                    QGCLabel {
386 387 388
                        id:         rtkSectionLabel
                        text:       qsTr("RTK GPS (Requires Restart)")
                        visible:    QGroundControl.settingsManager.rtkSettings.visible
Don Gagne's avatar
Don Gagne committed
389
                    }
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
                    Rectangle {
                        Layout.preferredHeight: rtkGrid.height + (_margins * 2)
                        Layout.preferredWidth:  rtkGrid.width + (_margins * 2)
                        color:                  qgcPal.windowShade
                        visible:                rtkSectionLabel.visible
                        Layout.fillWidth:       true

                        GridLayout {
                            id:                         rtkGrid
                            anchors.topMargin:          _margins
                            anchors.top:                parent.top
                            Layout.fillWidth:           false
                            anchors.horizontalCenter:   parent.horizontalCenter
                            columns:                    2

405
                            QGCLabel { text: qsTr("Survey in accuracy (U-blox only)") }
406 407 408 409
                            FactTextField {
                                Layout.preferredWidth:  _valueFieldWidth
                                fact:                   QGroundControl.settingsManager.rtkSettings.surveyInAccuracyLimit
                            }
Don Gagne's avatar
Don Gagne committed
410

411 412 413 414 415
                            QGCLabel { text: qsTr("Minimum observation duration") }
                            FactTextField {
                                Layout.preferredWidth:  _valueFieldWidth
                                fact:                   QGroundControl.settingsManager.rtkSettings.surveyInMinObservationDuration
                            }
Don Gagne's avatar
Don Gagne committed
416 417
                        }
                    }
418

419
                    Item { width: 1; height: _margins }
420

421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
                    QGCLabel {
                        id:         autoConnectSectionLabel
                        text:       qsTr("AutoConnect to the following devices")
                        visible:    QGroundControl.settingsManager.autoConnectSettings.visible
                    }
                    Rectangle {
                        Layout.preferredWidth:  autoConnectCol.width + (_margins * 2)
                        Layout.preferredHeight: autoConnectCol.height + (_margins * 2)
                        color:                  qgcPal.windowShade
                        visible:                autoConnectSectionLabel.visible
                        Layout.fillWidth:       true

                        ColumnLayout {
                            id:                 autoConnectCol
                            anchors.margins:    _margins
                            anchors.left:       parent.left
                            anchors.top:        parent.top
                            spacing:            _margins

                            RowLayout {
                                spacing: _margins

                                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:    modelData.visible
                                    }
460
                                }
461
                            }
462

463 464 465 466 467 468 469
                            GridLayout {
                                Layout.fillWidth:   false
                                Layout.alignment:   Qt.AlignHCenter
                                columns:            2
                                visible:            !ScreenTools.isMobile
                                                    && QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaPort.visible
                                                    && QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaBaud.visible
470

471 472 473 474 475 476
                                QGCLabel {
                                    text: qsTr("NMEA GPS Device")
                                }
                                QGCComboBox {
                                    id:                     nmeaPortCombo
                                    Layout.preferredWidth:  _comboFieldWidth
477

478 479 480
                                    model:  ListModel {
                                        ListElement { text: "disabled" }
                                    }
481

482 483 484 485
                                    onActivated: {
                                        if (index != -1) {
                                            QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaPort.value = textAt(index);
                                        }
486
                                    }
487 488 489 490 491 492
                                    Component.onCompleted: {
                                        for (var i in QGroundControl.linkManager.serialPorts) {
                                            nmeaPortCombo.model.append({text:QGroundControl.linkManager.serialPorts[i]})
                                        }
                                        var index = nmeaPortCombo.find(QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaPort.valueString);
                                        nmeaPortCombo.currentIndex = index;
493 494 495
                                    }
                                }

496 497
                                QGCLabel {
                                    text:             qsTr("NMEA GPS Baudrate")
498
                                }
499 500 501 502 503 504 505 506 507 508 509 510 511 512
                                QGCComboBox {
                                    id:                     nmeaBaudCombo
                                    Layout.preferredWidth:  _comboFieldWidth
                                    model:                  [4800, 9600, 19200, 38400, 57600, 115200]

                                    onActivated: {
                                        if (index != -1) {
                                            QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaBaud.value = textAt(index);
                                        }
                                    }
                                    Component.onCompleted: {
                                        var index = nmeaBaudCombo.find(QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaBaud.valueString);
                                        nmeaBaudCombo.currentIndex = index;
                                    }
513 514 515
                                }
                            }
                        }
516
                    }
517 518 519

                    Item { width: 1; height: _margins }

520
                    QGCLabel {
521 522 523
                        id:         videoSectionLabel
                        text:       qsTr("Video")
                        visible:    QGroundControl.settingsManager.videoSettings.visible
524
                    }
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539
                    Rectangle {
                        Layout.preferredWidth:  videoGrid.width + (_margins * 2)
                        Layout.preferredHeight: videoGrid.height + (_margins * 2)
                        Layout.fillWidth:       true
                        color:                  qgcPal.windowShade
                        visible:                videoSectionLabel.visible

                        GridLayout {
                            id:                         videoGrid
                            anchors.margins:            _margins
                            anchors.top:                parent.top
                            anchors.horizontalCenter:   parent.horizontalCenter
                            Layout.fillWidth:           false
                            Layout.fillHeight:          false
                            columns:                    2
540

541
                            QGCLabel {
542 543
                                text:       qsTr("Video Source")
                                visible:    QGroundControl.settingsManager.videoSettings.videoSource.visible
544
                            }
545
                            FactComboBox {
546 547 548 549 550
                                id:                     videoSource
                                Layout.preferredWidth:  _comboFieldWidth
                                indexModel:             false
                                fact:                   QGroundControl.settingsManager.videoSettings.videoSource
                                visible:                QGroundControl.settingsManager.videoSettings.videoSource.visible
551
                            }
552

553
                            QGCLabel {
554 555
                                text:       qsTr("UDP Port")
                                visible:    QGroundControl.settingsManager.videoSettings.udpPort.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 1
556
                            }
557
                            FactTextField {
558 559 560
                                Layout.preferredWidth:  _comboFieldWidth
                                fact:                   QGroundControl.settingsManager.videoSettings.udpPort
                                visible:                QGroundControl.settingsManager.videoSettings.udpPort.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 1
561
                            }
562

563
                            QGCLabel {
564 565
                                text:       qsTr("RTSP URL")
                                visible:    QGroundControl.settingsManager.videoSettings.rtspUrl.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 2
566
                            }
567
                            FactTextField {
568 569 570
                                Layout.preferredWidth:  _comboFieldWidth
                                fact:                   QGroundControl.settingsManager.videoSettings.rtspUrl
                                visible:                QGroundControl.settingsManager.videoSettings.rtspUrl.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 2
571
                            }
572

573
                            QGCLabel {
574 575
                                text:       qsTr("TCP URL")
                                visible:    QGroundControl.settingsManager.videoSettings.tcpUrl.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 3
576 577
                            }
                            FactTextField {
578 579 580
                                Layout.preferredWidth:  _comboFieldWidth
                                fact:                   QGroundControl.settingsManager.videoSettings.tcpUrl
                                visible:                QGroundControl.settingsManager.videoSettings.tcpUrl.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex === 3
581
                            }
582

583
                            QGCLabel {
584 585
                                text:       qsTr("Aspect Ratio")
                                visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.aspectRatio.visible
586 587
                            }
                            FactTextField {
588 589 590
                                Layout.preferredWidth:  _comboFieldWidth
                                fact:                   QGroundControl.settingsManager.videoSettings.aspectRatio
                                visible:                QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.aspectRatio.visible
591
                            }
592

593
                            QGCLabel {
594 595
                                text:       qsTr("Disable When Disarmed")
                                visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.gridLines.visible
596
                            }
597
                            FactCheckBox {
598 599 600
                                text:       ""
                                fact:       QGroundControl.settingsManager.videoSettings.disableWhenDisarmed
                                visible:    QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 3 && QGroundControl.settingsManager.videoSettings.gridLines.visible
601 602 603
                            }
                        }
                    }
604 605 606

                    Item { width: 1; height: _margins }

607
                    QGCLabel {
608 609 610
                        id:         videoRecSectionLabel
                        text:       qsTr("Video Recording")
                        visible:    QGroundControl.settingsManager.videoSettings.visible && QGroundControl.videoManager.isGStreamer && videoSource.currentIndex && videoSource.currentIndex < 4
611
                    }
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
                    Rectangle {
                        Layout.preferredWidth:  videoRecCol.width + (_margins * 2)
                        Layout.preferredHeight: videoRecCol.height + (_margins * 2)
                        Layout.fillWidth:       true
                        color:                  qgcPal.windowShade
                        visible:                videoRecSectionLabel.visible

                        GridLayout {
                            id:                         videoRecCol
                            anchors.margins:            _margins
                            anchors.top:                parent.top
                            anchors.horizontalCenter:   parent.horizontalCenter
                            Layout.fillWidth:           false
                            columns:                    2

627
                            QGCLabel {
628 629
                                text:       qsTr("Auto-Delete Files")
                                visible:    QGroundControl.settingsManager.videoSettings.enableStorageLimit.visible
630 631
                            }
                            FactCheckBox {
632 633 634
                                text:       ""
                                fact:       QGroundControl.settingsManager.videoSettings.enableStorageLimit
                                visible:    QGroundControl.settingsManager.videoSettings.enableStorageLimit.visible
635
                            }
636

637
                            QGCLabel {
638 639
                                text:       qsTr("Max Storage Usage")
                                visible:    QGroundControl.settingsManager.videoSettings.maxVideoSize.visible && QGroundControl.settingsManager.videoSettings.enableStorageLimit.value
640 641
                            }
                            FactTextField {
642 643 644
                                Layout.preferredWidth:  _comboFieldWidth
                                fact:                   QGroundControl.settingsManager.videoSettings.maxVideoSize
                                visible:                QGroundControl.settingsManager.videoSettings.maxVideoSize.visible && QGroundControl.settingsManager.videoSettings.enableStorageLimit.value
645
                            }
646

647
                            QGCLabel {
648 649
                                text:       qsTr("Video File Format")
                                visible:    QGroundControl.settingsManager.videoSettings.recordingFormat.visible
650 651
                            }
                            FactComboBox {
652 653 654
                                Layout.preferredWidth:  _comboFieldWidth
                                fact:                   QGroundControl.settingsManager.videoSettings.recordingFormat
                                visible:                QGroundControl.settingsManager.videoSettings.recordingFormat.visible
655 656
                            }
                        }
657
                    }
658 659 660

                    Item { width: 1; height: _margins; visible: videoRecSectionLabel.visible }

661
                    QGCLabel {
662 663 664
                        id:         brandImageSectionLabel
                        text:       qsTr("Brand Image")
                        visible:    QGroundControl.settingsManager.brandImageSettings.visible && !ScreenTools.isMobile
665
                    }
666 667 668 669 670 671 672 673 674 675 676 677 678 679
                    Rectangle {
                        Layout.preferredWidth:  brandImageGrid.width + (_margins * 2)
                        Layout.preferredHeight: brandImageGrid.height + (_margins * 2)
                        Layout.fillWidth:       true
                        color:                  qgcPal.windowShade
                        visible:                brandImageSectionLabel.visible

                        GridLayout {
                            id:                 brandImageGrid
                            anchors.margins:    _margins
                            anchors.top:        parent.top
                            anchors.left:       parent.left
                            anchors.right:      parent.right
                            columns:            3
680 681

                            QGCLabel {
682 683
                                text:       qsTr("Indoor Image")
                                visible:    _userBrandImageIndoor.visible
684 685 686
                            }
                            QGCTextField {
                                readOnly:           true
687
                                Layout.fillWidth:   true
688
                                text:               _userBrandImageIndoor.valueString.replace("file:///","")
689 690
                            }
                            QGCButton {
691
                                text:       qsTr("Browse")
692 693 694 695 696
                                onClicked:  userBrandImageIndoorBrowseDialog.openForLoad()

                                QGCFileDialog {
                                    id:             userBrandImageIndoorBrowseDialog
                                    qgcView:        _qgcView
697
                                    title:          qsTr("Choose custom brand image file")
698 699 700 701
                                    folder:         _userBrandImageIndoor.rawValue.replace("file:///","")
                                    selectExisting: true
                                    selectFolder:   false

702
                                    onAcceptedForLoad: _userBrandImageIndoor.rawValue = "file:///" + file
703 704 705 706
                                }
                            }

                            QGCLabel {
707 708
                                text:       qsTr("Outdoor Image")
                                visible:    _userBrandImageOutdoor.visible
709 710 711
                            }
                            QGCTextField {
                                readOnly:           true
712
                                Layout.fillWidth:   true
713
                                text:               _userBrandImageOutdoor.valueString.replace("file:///","")
714 715
                            }
                            QGCButton {
716
                                text:       qsTr("Browse")
717 718 719 720 721
                                onClicked:  userBrandImageOutdoorBrowseDialog.openForLoad()

                                QGCFileDialog {
                                    id:             userBrandImageOutdoorBrowseDialog
                                    qgcView:        _qgcView
722
                                    title:          qsTr("Choose custom brand image file")
723 724 725 726 727 728 729 730 731
                                    folder:         _userBrandImageOutdoor.rawValue.replace("file:///","")
                                    selectExisting: true
                                    selectFolder:   false

                                    onAcceptedForLoad: _userBrandImageOutdoor.rawValue = "file:///" + file
                                }
                            }

                            QGCButton {
732 733 734 735
                                text:               qsTr("Reset Default Brand Image")
                                Layout.columnSpan:  3
                                Layout.alignment:   Qt.AlignHCenter

736 737 738 739 740 741 742 743
                                onClicked:  {
                                    _userBrandImageIndoor.rawValue = ""
                                    _userBrandImageOutdoor.rawValue = ""
                                }
                            }
                        }
                    }

744 745 746 747 748 749 750 751 752 753 754 755
                    Item { width: 1; height: _margins }

                    QGCLabel {
                        text:               qsTr("%1 Version").arg(QGroundControl.appName)
                        Layout.alignment:   Qt.AlignHCenter
                    }
                    QGCLabel {
                        text:               QGroundControl.qgcVersion
                        Layout.alignment:   Qt.AlignHCenter
                    }
                } // settingsColumn
            }
756
        } // QGCFlickable
757 758
    } // QGCViewPanel
} // QGCView