QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
OfflineVehicleFirstRunPrompt.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.FactControls
6import QGroundControl.Controls
7
8FirstRunPrompt {
9 title: qsTr("Vehicle Information")
10 promptId: QGroundControl.corePlugin.offlineVehicleFirstRunPromptId
11
12 property real _margins: ScreenTools.defaultFontPixelWidth
13 property var _appSettings: QGroundControl.settingsManager.appSettings
14 property bool _multipleFirmware: !QGroundControl.singleFirmwareSupport
15 property bool _multipleVehicleTypes: !QGroundControl.singleVehicleSupport
16 property real _fieldWidth: ScreenTools.defaultFontPixelWidth * 16
17
18 ColumnLayout {
19 spacing: ScreenTools.defaultFontPixelHeight
20
21 QGCLabel {
22 id: unitsSectionLabel
23 Layout.preferredWidth: valueRect.width
24 text: qsTr("Specify information about the vehicle you plan to fly. If you are unsure of the correct values leave them as is.")
25 wrapMode: Text.WordWrap
26 }
27
28 Rectangle {
29 id: valueRect
30 Layout.preferredHeight: valueGrid.height + (_margins * 2)
31 Layout.preferredWidth: valueGrid.width + (_margins * 2)
32 color: qgcPal.windowShade
33 Layout.fillWidth: true
34
35 GridLayout {
36 id: valueGrid
37 anchors.margins: _margins
38 anchors.top: parent.top
39 anchors.left: parent.left
40 columns: 2
41
42 QGCLabel {
43 Layout.fillWidth: true
44 text: qsTr("Firmware")
45 visible: _multipleFirmware
46 }
47 FactComboBox {
48 Layout.preferredWidth: _fieldWidth
49 fact: QGroundControl.settingsManager.appSettings.offlineEditingFirmwareClass
50 indexModel: false
51 visible: _multipleFirmware
52 }
53
54 QGCLabel {
55 Layout.fillWidth: true
56 text: qsTr("Vehicle")
57 visible: _multipleVehicleTypes
58 }
59 FactComboBox {
60 Layout.preferredWidth: _fieldWidth
61 fact: QGroundControl.settingsManager.appSettings.offlineEditingVehicleClass
62 indexModel: false
63 visible: _multipleVehicleTypes
64 }
65 }
66 }
67 }
68}