MockLink.qml 2.54 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.
 *
 ****************************************************************************/
9 10


11
import QtQuick 2.3
12 13 14 15 16 17 18

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
19 20
    color:          qgcPal.window
    anchors.fill:   parent
21

22 23
    readonly property real _margins: ScreenTools.defaultFontPixelHeight

24 25
    QGCPalette { id: qgcPal; colorGroupEnabled: true }

Don Gagne's avatar
Don Gagne committed
26 27
    QGCFlickable {
        anchors.fill:   parent
28 29
        contentWidth:   column.width + (_margins * 2)
        contentHeight:  column.height + (_margins * 2)
Don Gagne's avatar
Don Gagne committed
30
        clip:           true
31

Don Gagne's avatar
Don Gagne committed
32 33
        Column {
            id:                 column
34
            anchors.margins:    _margins
Don Gagne's avatar
Don Gagne committed
35 36 37 38 39
            anchors.left:       parent.left
            anchors.top:        parent.top
            spacing:            ScreenTools.defaultFontPixelHeight

            QGCButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
40
                text:       qsTr("PX4 Vehicle")
Don Gagne's avatar
Don Gagne committed
41 42 43
                onClicked:  QGroundControl.startPX4MockLink(sendStatusText.checked)
            }
            QGCButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
44
                text:       qsTr("APM ArduCopter Vehicle")
Don Gagne's avatar
Don Gagne committed
45 46 47
                onClicked:  QGroundControl.startAPMArduCopterMockLink(sendStatusText.checked)
            }
            QGCButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
48
                text:       qsTr("APM ArduPlane Vehicle")
Don Gagne's avatar
Don Gagne committed
49 50
                onClicked:  QGroundControl.startAPMArduPlaneMockLink(sendStatusText.checked)
            }
51 52 53 54
            QGCButton {
                text:       qsTr("APM ArduSub Vehicle")
                onClicked:  QGroundControl.startAPMArduSubMockLink(sendStatusText.checked)
            }
55 56 57 58
            QGCButton {
                text:       qsTr("APM ArduRover Vehicle")
                onClicked:  QGroundControl.startAPMArduRoverMockLink(sendStatusText.checked)
            }
Don Gagne's avatar
Don Gagne committed
59
            QGCButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
60
                text:       qsTr("Generic Vehicle")
Don Gagne's avatar
Don Gagne committed
61 62 63 64
                onClicked:  QGroundControl.startGenericMockLink(sendStatusText.checked)
            }
            QGCCheckBox {
                id:     sendStatusText
Tomaz Canabrava's avatar
Tomaz Canabrava committed
65
                text:   qsTr("Send status text + voice")
Don Gagne's avatar
Don Gagne committed
66 67
            }
            QGCButton {
Don Gagne's avatar
Don Gagne committed
68 69
                text:       qsTr("Stop One MockLink")
                onClicked:  QGroundControl.stopOneMockLink()
Don Gagne's avatar
Don Gagne committed
70
            }
71 72 73
        }
    }
}