MavlinkSettings.qml 25.3 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 13 14 15 16 17 18 19 20 21 22 23


import QtQuick                  2.5
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2
import QtQuick.Dialogs          1.1

import QGroundControl                       1.0
import QGroundControl.FactSystem            1.0
import QGroundControl.Controls              1.0
import QGroundControl.ScreenTools           1.0
import QGroundControl.MultiVehicleManager   1.0
import QGroundControl.Palette               1.0

Rectangle {
24
    id:             __mavlinkRoot
25
    color:          qgcPal.window
26
    anchors.fill:   parent
dogmaphobic's avatar
dogmaphobic committed
27

28 29 30 31 32
    property real _labelWidth:          ScreenTools.defaultFontPixelWidth * 28
    property real _valueWidth:          ScreenTools.defaultFontPixelWidth * 24
    property int  _selectedCount:       0
    property real _columnSpacing:       ScreenTools.defaultFontPixelHeight * 0.25
    property bool _uploadedSelected:    false
Gus Grubba's avatar
Gus Grubba committed
33

34
    QGCPalette { id: qgcPal }
dogmaphobic's avatar
dogmaphobic committed
35

Gus Grubba's avatar
Gus Grubba committed
36 37 38
    Connections {
        target: QGroundControl.mavlinkLogManager
        onSelectedCountChanged: {
39
            _uploadedSelected = false
Gus Grubba's avatar
Gus Grubba committed
40 41 42
            var selected = 0
            for(var i = 0; i < QGroundControl.mavlinkLogManager.logFiles.count; i++) {
                var logFile = QGroundControl.mavlinkLogManager.logFiles.get(i)
43
                if(logFile.selected) {
Gus Grubba's avatar
Gus Grubba committed
44
                    selected++
45 46 47 48 49
                    //-- If an uploaded file is selected, disable "Upload" button
                    if(logFile.uploaded) {
                        _uploadedSelected = true
                    }
                }
Gus Grubba's avatar
Gus Grubba committed
50 51 52 53 54 55 56 57 58 59
            }
            _selectedCount = selected
        }
    }

    MessageDialog {
        id:         emptyEmailDialog
        visible:    false
        icon:       StandardIcon.Warning
        standardButtons: StandardButton.Close
60 61
        title:      qsTr("MAVLink Logging")
        text:       qsTr("Please enter an email address before uploading MAVLink log files.")
Gus Grubba's avatar
Gus Grubba committed
62 63
    }

Don Gagne's avatar
Don Gagne committed
64
    QGCFlickable {
dogmaphobic's avatar
dogmaphobic committed
65 66 67 68
        clip:               true
        anchors.fill:       parent
        anchors.margins:    ScreenTools.defaultFontPixelWidth
        contentHeight:      settingsColumn.height
Don Gagne's avatar
Don Gagne committed
69
        contentWidth:       settingsColumn.width
Gus Grubba's avatar
Gus Grubba committed
70
        flickableDirection: Flickable.VerticalFlick
dogmaphobic's avatar
dogmaphobic committed
71 72 73

        Column {
            id:                 settingsColumn
Gus Grubba's avatar
Gus Grubba committed
74 75
            width:              __mavlinkRoot.width
            spacing:            ScreenTools.defaultFontPixelHeight * 0.5
dogmaphobic's avatar
dogmaphobic committed
76 77
            anchors.margins:    ScreenTools.defaultFontPixelWidth
            //-----------------------------------------------------------------
Gus Grubba's avatar
Gus Grubba committed
78 79 80 81 82 83
            //-- Ground Station
            Item {
                width:              __mavlinkRoot.width * 0.8
                height:             gcsLabel.height
                anchors.margins:    ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
84
                QGCLabel {
Gus Grubba's avatar
Gus Grubba committed
85 86 87
                    id:             gcsLabel
                    text:           qsTr("Ground Station")
                    font.family:    ScreenTools.demiboldFontFamily
88
                }
Gus Grubba's avatar
Gus Grubba committed
89 90 91 92 93 94 95 96 97
            }
            Rectangle {
                height:         gcsColumn.height + (ScreenTools.defaultFontPixelHeight * 2)
                width:          __mavlinkRoot.width * 0.8
                color:          qgcPal.windowShade
                anchors.margins: ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                Column {
                    id:         gcsColumn
Gus Grubba's avatar
Gus Grubba committed
98
                    spacing:    _columnSpacing
Gus Grubba's avatar
Gus Grubba committed
99 100 101 102 103 104
                    anchors.centerIn: parent
                    Row {
                        spacing:    ScreenTools.defaultFontPixelWidth
                        QGCLabel {
                            width:              _labelWidth
                            anchors.baseline:   sysidField.baseline
105
                            text:               qsTr("MAVLink System ID:")
Gus Grubba's avatar
Gus Grubba committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
                        }
                        QGCTextField {
                            id:     sysidField
                            text:   QGroundControl.mavlinkSystemID.toString()
                            width:  _valueWidth
                            inputMethodHints:       Qt.ImhFormattedNumbersOnly
                            anchors.verticalCenter: parent.verticalCenter
                            onEditingFinished: {
                                QGroundControl.mavlinkSystemID = parseInt(sysidField.text)
                            }
                        }
                    }
                    //-----------------------------------------------------------------
                    //-- Mavlink Heartbeats
                    QGCCheckBox {
                        text:       qsTr("Emit heartbeat")
                        checked:    QGroundControl.multiVehicleManager.gcsHeartBeatEnabled
                        onClicked: {
                            QGroundControl.multiVehicleManager.gcsHeartBeatEnabled = checked
                        }
                    }
                    //-----------------------------------------------------------------
                    //-- Mavlink Version Check
                    QGCCheckBox {
                        text:       qsTr("Only accept MAVs with same protocol version")
                        checked:    QGroundControl.isVersionCheckEnabled
                        onClicked: {
                            QGroundControl.isVersionCheckEnabled = checked
                        }
135 136 137 138
                    }
                }
            }
            //-----------------------------------------------------------------
Gus Grubba's avatar
Gus Grubba committed
139
            //-- Mavlink Logging
140 141 142 143 144 145 146
            Item {
                width:              __mavlinkRoot.width * 0.8
                height:             mavlogLabel.height
                anchors.margins:    ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                QGCLabel {
                    id:             mavlogLabel
Gus Grubba's avatar
Gus Grubba committed
147
                    text:           qsTr("Vehicle MAVLink Logging")
148 149 150 151 152 153 154 155 156 157 158 159
                    font.family:    ScreenTools.demiboldFontFamily
                }
            }
            Rectangle {
                height:         mavlogColumn.height + (ScreenTools.defaultFontPixelHeight * 2)
                width:          __mavlinkRoot.width * 0.8
                color:          qgcPal.windowShade
                anchors.margins: ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                Column {
                    id:         mavlogColumn
                    width:      gcsColumn.width
Gus Grubba's avatar
Gus Grubba committed
160
                    spacing:    _columnSpacing
161 162 163 164 165 166
                    anchors.centerIn: parent
                    //-----------------------------------------------------------------
                    //-- Manual Start/Stop
                    Row {
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.horizontalCenter: parent.horizontalCenter
Gus Grubba's avatar
Gus Grubba committed
167 168 169 170 171
                        QGCLabel {
                            width:              _labelWidth
                            text:               qsTr("Manual Start/Stop:")
                            anchors.verticalCenter: parent.verticalCenter
                        }
172
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
173 174 175 176 177
                            text:               qsTr("Start Logging")
                            width:              (_valueWidth * 0.5) - (ScreenTools.defaultFontPixelWidth * 0.5)
                            enabled:            !QGroundControl.mavlinkLogManager.logRunning && QGroundControl.mavlinkLogManager.canStartLog
                            onClicked:          QGroundControl.mavlinkLogManager.startLogging()
                            anchors.verticalCenter: parent.verticalCenter
178 179
                        }
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
180 181 182 183 184 185 186 187 188 189 190 191 192 193
                            text:               qsTr("Stop Logging")
                            width:              (_valueWidth * 0.5) - (ScreenTools.defaultFontPixelWidth * 0.5)
                            enabled:            QGroundControl.mavlinkLogManager.logRunning
                            onClicked:          QGroundControl.mavlinkLogManager.stopLogging()
                            anchors.verticalCenter: parent.verticalCenter
                        }
                    }
                    //-----------------------------------------------------------------
                    //-- Enable auto log on arming
                    QGCCheckBox {
                        text:       qsTr("Enable automatic logging")
                        checked:    QGroundControl.mavlinkLogManager.enableAutoStart
                        onClicked: {
                            QGroundControl.mavlinkLogManager.enableAutoStart = checked
194 195 196 197 198 199
                        }
                    }
                }
            }
            //-----------------------------------------------------------------
            //-- Mavlink Logging
Gus Grubba's avatar
Gus Grubba committed
200 201 202 203 204 205 206
            Item {
                width:              __mavlinkRoot.width * 0.8
                height:             logLabel.height
                anchors.margins:    ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                QGCLabel {
                    id:             logLabel
207
                    text:           qsTr("MAVLink Log Uploads")
Gus Grubba's avatar
Gus Grubba committed
208 209 210 211 212 213 214 215 216 217 218
                    font.family:    ScreenTools.demiboldFontFamily
                }
            }
            Rectangle {
                height:         logColumn.height + (ScreenTools.defaultFontPixelHeight * 2)
                width:          __mavlinkRoot.width * 0.8
                color:          qgcPal.windowShade
                anchors.margins: ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                Column {
                    id:         logColumn
Gus Grubba's avatar
Gus Grubba committed
219
                    spacing:    _columnSpacing
Gus Grubba's avatar
Gus Grubba committed
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
                    anchors.centerIn: parent
                    //-----------------------------------------------------------------
                    //-- Email address Field
                    Row {
                        spacing:    ScreenTools.defaultFontPixelWidth
                        QGCLabel {
                            width:              _labelWidth
                            anchors.baseline:   emailField.baseline
                            text:               qsTr("Email address for Log Upload:")
                        }
                        QGCTextField {
                            id:     emailField
                            text:   QGroundControl.mavlinkLogManager.emailAddress
                            width:  _valueWidth
                            inputMethodHints:       Qt.ImhNoAutoUppercase | Qt.ImhEmailCharactersOnly
                            anchors.verticalCenter: parent.verticalCenter
                            onEditingFinished: {
                                QGroundControl.mavlinkLogManager.emailAddress = emailField.text
238 239 240 241
                                if(emailField.text === "") {
                                    autoUploadCheck.checked = false
                                    QGroundControl.mavlinkLogManager.enableAutoUpload = false
                                }
Gus Grubba's avatar
Gus Grubba committed
242 243 244 245 246 247 248 249 250 251 252 253 254 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
                            }
                        }
                    }
                    //-----------------------------------------------------------------
                    //-- Description Field
                    Row {
                        spacing:    ScreenTools.defaultFontPixelWidth
                        QGCLabel {
                            width:              _labelWidth
                            anchors.baseline:   descField.baseline
                            text:               qsTr("Default Description:")
                        }
                        QGCTextField {
                            id:     descField
                            text:   QGroundControl.mavlinkLogManager.description
                            width:  _valueWidth
                            anchors.verticalCenter: parent.verticalCenter
                            onEditingFinished: {
                                QGroundControl.mavlinkLogManager.description = descField.text
                            }
                        }
                    }
                    //-----------------------------------------------------------------
                    //-- Upload URL
                    Row {
                        spacing:    ScreenTools.defaultFontPixelWidth
                        QGCLabel {
                            width:              _labelWidth
                            anchors.baseline:   urlField.baseline
                            text:               qsTr("Default Upload URL")
                        }
                        QGCTextField {
                            id:     urlField
                            text:   QGroundControl.mavlinkLogManager.uploadURL
                            width:  _valueWidth
                            inputMethodHints:       Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly
                            anchors.verticalCenter: parent.verticalCenter
                            onEditingFinished: {
                                QGroundControl.mavlinkLogManager.uploadURL = urlField.text
                            }
                        }
                    }
                    //-----------------------------------------------------------------
                    //-- Automatic Upload
                    QGCCheckBox {
287
                        id:         autoUploadCheck
Gus Grubba's avatar
Gus Grubba committed
288
                        text:       qsTr("Enable automatic log uploads")
289
                        checked:    QGroundControl.mavlinkLogManager.enableAutoUpload
Gus Grubba's avatar
Gus Grubba committed
290
                        onClicked: {
291 292 293 294 295 296 297
                            QGroundControl.mavlinkLogManager.emailAddress = emailField.text
                            if(checked && QGroundControl.mavlinkLogManager.emailAddress === "") {
                                checked = false
                                emptyEmailDialog.open()
                            } else {
                                QGroundControl.mavlinkLogManager.enableAutoUpload = checked
                            }
Gus Grubba's avatar
Gus Grubba committed
298 299
                        }
                    }
300 301 302 303 304
                    //-----------------------------------------------------------------
                    //-- Delete log after upload
                    QGCCheckBox {
                        text:       qsTr("Delete log file after uploading")
                        checked:    QGroundControl.mavlinkLogManager.deleteAfterUpload
305
                        enabled:    autoUploadCheck.checked
306 307 308 309
                        onClicked: {
                            QGroundControl.mavlinkLogManager.deleteAfterUpload = checked
                        }
                    }
dogmaphobic's avatar
dogmaphobic committed
310 311 312
                }
            }
            //-----------------------------------------------------------------
Gus Grubba's avatar
Gus Grubba committed
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
            //-- Log Files
            Item {
                width:              __mavlinkRoot.width * 0.8
                height:             logFilesLabel.height
                anchors.margins:    ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                QGCLabel {
                    id:             logFilesLabel
                    text:           qsTr("Saved Log Files")
                    font.family:    ScreenTools.demiboldFontFamily
                }
            }
            Rectangle {
                height:         logFilesColumn.height + (ScreenTools.defaultFontPixelHeight * 2)
                width:          __mavlinkRoot.width * 0.8
                color:          qgcPal.windowShade
                anchors.margins: ScreenTools.defaultFontPixelWidth
                anchors.horizontalCenter: parent.horizontalCenter
                Column {
                    id:         logFilesColumn
Gus Grubba's avatar
Gus Grubba committed
333
                    spacing:    _columnSpacing * 4
Gus Grubba's avatar
Gus Grubba committed
334
                    anchors.centerIn: parent
Gus Grubba's avatar
Gus Grubba committed
335
                    width:          ScreenTools.defaultFontPixelWidth * 68
Gus Grubba's avatar
Gus Grubba committed
336
                    Rectangle {
Gus Grubba's avatar
Gus Grubba committed
337
                        width:          ScreenTools.defaultFontPixelWidth  * 64
Gus Grubba's avatar
Gus Grubba committed
338
                        height:         ScreenTools.defaultFontPixelHeight * 14
Gus Grubba's avatar
Gus Grubba committed
339
                        anchors.horizontalCenter: parent.horizontalCenter
Gus Grubba's avatar
Gus Grubba committed
340
                        color:          qgcPal.window
Gus Grubba's avatar
Gus Grubba committed
341 342
                        border.color:   qgcPal.text
                        border.width:   0.5
Don Gagne's avatar
Don Gagne committed
343
                        QGCListView {
Gus Grubba's avatar
Gus Grubba committed
344
                            width:          ScreenTools.defaultFontPixelWidth  * 56
Gus Grubba's avatar
Gus Grubba committed
345
                            height:         ScreenTools.defaultFontPixelHeight * 12
Gus Grubba's avatar
Gus Grubba committed
346 347 348
                            anchors.centerIn: parent
                            orientation:    ListView.Vertical
                            model:          QGroundControl.mavlinkLogManager.logFiles
Gus Grubba's avatar
Gus Grubba committed
349
                            clip:           true
Gus Grubba's avatar
Gus Grubba committed
350
                            delegate: Rectangle {
Gus Grubba's avatar
Gus Grubba committed
351
                                width:          ScreenTools.defaultFontPixelWidth  * 52
Gus Grubba's avatar
Gus Grubba committed
352
                                height:         selectCheck.height
Gus Grubba's avatar
Gus Grubba committed
353
                                color:          qgcPal.window
Gus Grubba's avatar
Gus Grubba committed
354
                                Row {
Gus Grubba's avatar
Gus Grubba committed
355
                                    width:  ScreenTools.defaultFontPixelWidth  * 50
Gus Grubba's avatar
Gus Grubba committed
356 357 358
                                    anchors.centerIn: parent
                                    spacing: ScreenTools.defaultFontPixelWidth
                                    QGCCheckBox {
Gus Grubba's avatar
Gus Grubba committed
359
                                        id:         selectCheck
Gus Grubba's avatar
Gus Grubba committed
360 361
                                        width:      ScreenTools.defaultFontPixelWidth * 4
                                        checked:    object.selected
Gus Grubba's avatar
Gus Grubba committed
362
                                        enabled:    !object.writing && !object.uploading
Gus Grubba's avatar
Gus Grubba committed
363
                                        anchors.verticalCenter: parent.verticalCenter
Gus Grubba's avatar
Gus Grubba committed
364 365 366 367 368 369
                                        onClicked:  {
                                            object.selected = checked
                                        }
                                    }
                                    QGCLabel {
                                        text:       object.name
Gus Grubba's avatar
Gus Grubba committed
370
                                        width:      ScreenTools.defaultFontPixelWidth * 28
371
                                        color:      object.writing ? qgcPal.warningText : qgcPal.text
Gus Grubba's avatar
Gus Grubba committed
372
                                        anchors.verticalCenter: parent.verticalCenter
Gus Grubba's avatar
Gus Grubba committed
373 374
                                    }
                                    QGCLabel {
Gus Grubba's avatar
Gus Grubba committed
375
                                        text:       Number(object.size).toLocaleString(Qt.locale(), 'f', 0)
Gus Grubba's avatar
Gus Grubba committed
376
                                        visible:    !object.uploading && !object.uploaded
Gus Grubba's avatar
Gus Grubba committed
377
                                        width:      ScreenTools.defaultFontPixelWidth * 20;
378
                                        color:      object.writing ? qgcPal.warningText : qgcPal.text
Gus Grubba's avatar
Gus Grubba committed
379
                                        horizontalAlignment: Text.AlignRight
Gus Grubba's avatar
Gus Grubba committed
380 381 382
                                        anchors.verticalCenter: parent.verticalCenter
                                    }
                                    QGCLabel {
Gus Grubba's avatar
Gus Grubba committed
383
                                        text:      qsTr("Uploaded")
Gus Grubba's avatar
Gus Grubba committed
384 385 386 387
                                        visible:    object.uploaded
                                        width:      ScreenTools.defaultFontPixelWidth * 20;
                                        horizontalAlignment: Text.AlignRight
                                        anchors.verticalCenter: parent.verticalCenter
Gus Grubba's avatar
Gus Grubba committed
388 389
                                    }
                                    ProgressBar {
Gus Grubba's avatar
Gus Grubba committed
390
                                        visible:    object.uploading && !object.uploaded
Gus Grubba's avatar
Gus Grubba committed
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
                                        width:      ScreenTools.defaultFontPixelWidth * 20;
                                        height:     ScreenTools.defaultFontPixelHeight
                                        anchors.verticalCenter: parent.verticalCenter
                                        minimumValue:   0
                                        maximumValue:   100
                                        value:          object.progress * 100.0
                                    }
                                }
                            }
                        }
                    }
                    Row {
                        spacing:    ScreenTools.defaultFontPixelWidth
                        anchors.horizontalCenter: parent.horizontalCenter
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
406
                            text:      qsTr("Check All")
407
                            enabled:    !QGroundControl.mavlinkLogManager.uploading && !QGroundControl.mavlinkLogManager.logRunning
Gus Grubba's avatar
Gus Grubba committed
408 409 410 411 412 413 414 415
                            onClicked: {
                                for(var i = 0; i < QGroundControl.mavlinkLogManager.logFiles.count; i++) {
                                    var logFile = QGroundControl.mavlinkLogManager.logFiles.get(i)
                                    logFile.selected = true
                                }
                            }
                        }
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
416
                            text:      qsTr("Check None")
417
                            enabled:    !QGroundControl.mavlinkLogManager.uploading && !QGroundControl.mavlinkLogManager.logRunning
Gus Grubba's avatar
Gus Grubba committed
418 419 420 421 422 423 424 425
                            onClicked: {
                                for(var i = 0; i < QGroundControl.mavlinkLogManager.logFiles.count; i++) {
                                    var logFile = QGroundControl.mavlinkLogManager.logFiles.get(i)
                                    logFile.selected = false
                                }
                            }
                        }
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
426
                            text:      qsTr("Delete Selected")
427
                            enabled:    _selectedCount > 0 && !QGroundControl.mavlinkLogManager.uploading && !QGroundControl.mavlinkLogManager.logRunning
Gus Grubba's avatar
Gus Grubba committed
428 429 430 431 432 433 434 435 436 437 438 439 440 441
                            onClicked:  deleteDialog.open()
                            MessageDialog {
                                id:         deleteDialog
                                visible:    false
                                icon:       StandardIcon.Warning
                                standardButtons: StandardButton.Yes | StandardButton.No
                                title:      qsTr("Delete Selected Log Files")
                                text:       qsTr("Confirm deleting selected log files?")
                                onYes: {
                                    QGroundControl.mavlinkLogManager.deleteLog()
                                }
                            }
                        }
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
442
                            text:      qsTr("Upload Selected")
443
                            enabled:    _selectedCount > 0 && !QGroundControl.mavlinkLogManager.uploading && !QGroundControl.mavlinkLogManager.logRunning && !_uploadedSelected
444
                            visible:    !QGroundControl.mavlinkLogManager.uploading
Gus Grubba's avatar
Gus Grubba committed
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464
                            onClicked:  {
                                QGroundControl.mavlinkLogManager.emailAddress = emailField.text
                                if(QGroundControl.mavlinkLogManager.emailAddress === "")
                                    emptyEmailDialog.open()
                                else
                                    uploadDialog.open()
                            }
                            MessageDialog {
                                id:         uploadDialog
                                visible:    false
                                icon:       StandardIcon.Question
                                standardButtons: StandardButton.Yes | StandardButton.No
                                title:      qsTr("Upload Selected Log Files")
                                text:       qsTr("Confirm uploading selected log files?")
                                onYes: {
                                    QGroundControl.mavlinkLogManager.uploadLog()
                                }
                            }
                        }
                        QGCButton {
Gus Grubba's avatar
Gus Grubba committed
465
                            text:      qsTr("Cancel")
466 467
                            enabled:    QGroundControl.mavlinkLogManager.uploading && !QGroundControl.mavlinkLogManager.logRunning
                            visible:    QGroundControl.mavlinkLogManager.uploading
Gus Grubba's avatar
Gus Grubba committed
468 469 470 471 472 473 474 475 476 477 478 479 480 481
                            onClicked:  cancelDialog.open()
                            MessageDialog {
                                id:         cancelDialog
                                visible:    false
                                icon:       StandardIcon.Warning
                                standardButtons: StandardButton.Yes | StandardButton.No
                                title:      qsTr("Cancel Upload")
                                text:       qsTr("Confirm canceling the upload process?")
                                onYes: {
                                    QGroundControl.mavlinkLogManager.cancelUpload()
                                }
                            }
                        }
                    }
dogmaphobic's avatar
dogmaphobic committed
482 483 484 485 486
                }
            }
        }
    }
}