QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MockLink.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7
8Rectangle {
9 color: qgcPal.window
10 anchors.fill: parent
11
12 readonly property real _margins: ScreenTools.defaultFontPixelHeight
13
14 QGCPalette { id: qgcPal; colorGroupEnabled: true }
15
16 QGCFlickable {
17 anchors.fill: parent
18 contentWidth: column.width + (_margins * 2)
19 contentHeight: column.height + (_margins * 2)
20 clip: true
21
22 ColumnLayout {
23 id: column
24 anchors.margins: _margins
25 anchors.left: parent.left
26 anchors.top: parent.top
27 spacing: ScreenTools.defaultFontPixelHeight / 4
28
29 QGCCheckBox {
30 id: sendStatusText
31 text: qsTr("Send status text + voice")
32 }
33 QGCCheckBox {
34 id: enableCamera
35 text: qsTr("Enable camera")
36 }
37 QGCCheckBox {
38 id: enableGimbal
39 text: qsTr("Enable gimbal")
40 }
41 QGCButton {
42 text: qsTr("PX4 Vehicle")
43 Layout.fillWidth: true
44 onClicked: QGroundControl.startPX4MockLink(sendStatusText.checked, enableCamera.checked, enableGimbal.checked)
45 }
46 QGCButton {
47 text: qsTr("APM ArduCopter Vehicle")
48 visible: QGroundControl.hasAPMSupport
49 Layout.fillWidth: true
50 onClicked: QGroundControl.startAPMArduCopterMockLink(sendStatusText.checked, enableCamera.checked, enableGimbal.checked)
51 }
52 QGCButton {
53 text: qsTr("APM ArduPlane Vehicle")
54 visible: QGroundControl.hasAPMSupport
55 Layout.fillWidth: true
56 onClicked: QGroundControl.startAPMArduPlaneMockLink(sendStatusText.checked, enableCamera.checked, enableGimbal.checked)
57 }
58 QGCButton {
59 text: qsTr("APM ArduSub Vehicle")
60 visible: QGroundControl.hasAPMSupport
61 Layout.fillWidth: true
62 onClicked: QGroundControl.startAPMArduSubMockLink(sendStatusText.checked, enableCamera.checked, enableGimbal.checked)
63 }
64 QGCButton {
65 text: qsTr("APM ArduRover Vehicle")
66 visible: QGroundControl.hasAPMSupport
67 Layout.fillWidth: true
68 onClicked: QGroundControl.startAPMArduRoverMockLink(sendStatusText.checked, enableCamera.checked, enableGimbal.checked)
69 }
70 QGCButton {
71 text: qsTr("Generic Vehicle")
72 Layout.fillWidth: true
73 onClicked: QGroundControl.startGenericMockLink(sendStatusText.checked, enableCamera.checked, enableGimbal.checked)
74 }
75 QGCButton {
76 text: qsTr("Stop One MockLink")
77 Layout.fillWidth: true
78 onClicked: QGroundControl.stopOneMockLink()
79 }
80 }
81 }
82}