MockLink.qml 2.35 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 12 13 14 15 16 17 18


import QtQuick 2.3

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)
            }
Don Gagne's avatar
Don Gagne committed
55
            QGCButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
56
                text:       qsTr("Generic Vehicle")
Don Gagne's avatar
Don Gagne committed
57 58 59 60
                onClicked:  QGroundControl.startGenericMockLink(sendStatusText.checked)
            }
            QGCCheckBox {
                id:     sendStatusText
Tomaz Canabrava's avatar
Tomaz Canabrava committed
61
                text:   qsTr("Send status text + voice")
Don Gagne's avatar
Don Gagne committed
62 63
            }
            QGCButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
64
                text:       qsTr("Stop All MockLinks")
Don Gagne's avatar
Don Gagne committed
65 66
                onClicked:  QGroundControl.stopAllMockLinks()
            }
67 68 69
        }
    }
}