Skip to content
MockLink.qml 3.27 KiB
Newer Older
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
 * (c) 2009-2020 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.
 *
 ****************************************************************************/
import QtQuick          2.11
import QtQuick.Controls 2.4
import QtQuick.Layouts  1.11

import QGroundControl               1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
import QGroundControl.ScreenTools   1.0

Rectangle {
Don Gagne's avatar
Don Gagne committed
    color:          qgcPal.window
    anchors.fill:   parent
    readonly property real _margins: ScreenTools.defaultFontPixelHeight

    QGCPalette { id: qgcPal; colorGroupEnabled: true }

Don Gagne's avatar
Don Gagne committed
    QGCFlickable {
        anchors.fill:   parent
        contentWidth:   column.width  + (_margins * 2)
        contentHeight:  column.height + (_margins * 2)
Don Gagne's avatar
Don Gagne committed
        clip:           true
        ColumnLayout {
Don Gagne's avatar
Don Gagne committed
            id:                 column
            anchors.margins:    _margins
Don Gagne's avatar
Don Gagne committed
            anchors.left:       parent.left
            anchors.top:        parent.top
            spacing:            ScreenTools.defaultFontPixelHeight

            QGCCheckBox {
                id:             sendStatusText
                text:           qsTr("Send status text + voice")
Don Gagne's avatar
Don Gagne committed
            }
            QGCButton {
                text:               qsTr("PX4 Vehicle")
                Layout.fillWidth:   true
                onClicked:          QGroundControl.startPX4MockLink(sendStatusText.checked)
Don Gagne's avatar
Don Gagne committed
            }
            QGCButton {
                text:               qsTr("APM ArduCopter Vehicle")
                visible:            QGroundControl.hasAPMSupport
                Layout.fillWidth:   true
                onClicked:          QGroundControl.startAPMArduCopterMockLink(sendStatusText.checked)
Don Gagne's avatar
Don Gagne committed
            }
            QGCButton {
                text:               qsTr("APM ArduPlane Vehicle")
                visible:            QGroundControl.hasAPMSupport
                Layout.fillWidth:   true
                onClicked:          QGroundControl.startAPMArduPlaneMockLink(sendStatusText.checked)
Don Gagne's avatar
 
Don Gagne committed
            QGCButton {
                text:               qsTr("APM ArduSub Vehicle")
                visible:            QGroundControl.hasAPMSupport
                Layout.fillWidth:   true
                onClicked:          QGroundControl.startAPMArduSubMockLink(sendStatusText.checked)
Don Gagne's avatar
 
Don Gagne committed
            }
Don Gagne's avatar
Don Gagne committed
            QGCButton {
                text:               qsTr("APM ArduRover Vehicle")
                visible:            QGroundControl.hasAPMSupport
                Layout.fillWidth:   true
                onClicked:          QGroundControl.startAPMArduRoverMockLink(sendStatusText.checked)
Don Gagne's avatar
Don Gagne committed
            }
            QGCButton {
                text:               qsTr("Generic Vehicle")
                Layout.fillWidth:   true
                onClicked:          QGroundControl.startGenericMockLink(sendStatusText.checked)
Don Gagne's avatar
Don Gagne committed
            }
            QGCButton {
                text:               qsTr("Stop One MockLink")
                Layout.fillWidth:   true
                onClicked:          QGroundControl.stopOneMockLink()
Don Gagne's avatar
Don Gagne committed
            }