Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/****************************************************************************
*
* (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.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtMultimedia 5.5
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.MultiVehicleManager 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.SettingsManager 1.0
QGCView {
id: _qgcView
viewPanel: panel
color: qgcPal.window
anchors.fill: parent
anchors.margins: ScreenTools.defaultFontPixelWidth
property real _labelWidth: ScreenTools.defaultFontPixelWidth * 20
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30
property real _panelWidth: _qgcView.width * _internalWidthRatio
property Fact _enableAirMapFact: QGroundControl.settingsManager.airMapSettings.enableAirMap
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
property bool _airMapEnabled: _enableAirMapFact.rawValue
readonly property real _internalWidthRatio: 0.8
QGCPalette { id: qgcPal }
QGCViewPanel {
id: panel
anchors.fill: parent
QGCFlickable {
clip: true
anchors.fill: parent
contentHeight: settingsColumn.height
contentWidth: settingsColumn.width
Column {
id: settingsColumn
width: _qgcView.width
spacing: ScreenTools.defaultFontPixelHeight * 0.5
anchors.margins: ScreenTools.defaultFontPixelWidth
//-----------------------------------------------------------------
//-- General
Item {
width: _panelWidth
height: generalLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
visible: QGroundControl.settingsManager.unitsSettings.visible
QGCLabel {
id: generalLabel
text: qsTr("General")
font.family: ScreenTools.demiboldFontFamily
}
}
Rectangle {
height: generalCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
Column {
id: generalCol
spacing: ScreenTools.defaultFontPixelWidth
anchors.centerIn: parent
FactCheckBox {
text: qsTr("Enable AirMap Services")
fact: _enableAirMapFact
visible: _enableAirMapFact.visible
}
FactCheckBox {
text: qsTr("Enable Telemetry")
fact: _enableTelemetryFact
visible: _enableTelemetryFact.visible
property Fact _enableTelemetryFact: QGroundControl.settingsManager.airMapSettings.enableTelemetry
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
}
}
}
//-----------------------------------------------------------------
//-- Login / Registration
Item {
width: _panelWidth
height: loginLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
QGCLabel {
id: loginLabel
text: qsTr("Login / Registration")
font.family: ScreenTools.demiboldFontFamily
}
}
Rectangle {
height: loginGrid.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
GridLayout {
id: loginGrid
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.25
anchors.centerIn: parent
QGCLabel { text: qsTr("Email:") }
FactTextField {
fact: _loginEmailFact
enabled: _airMapEnabled
visible: _loginEmailFact.visible
property Fact _loginEmailFact: QGroundControl.settingsManager.airMapSettings.loginEmail
FactTextField {
fact: _loginPasswordFact
enabled: _airMapEnabled
visible: _loginPasswordFact.visible
property Fact _loginPasswordFact: QGroundControl.settingsManager.airMapSettings.loginPassword
}
Item {
width: 1
height: 1
Layout.columnSpan: 2
}
QGCLabel {
text: qsTr("Forgot Your AirMap Password?")
Layout.alignment: Qt.AlignHCenter
Layout.columnSpan: 2
}
Item {
width: 1
height: 1
Layout.columnSpan: 2
}
QGCButton {
text: qsTr("Register for an AirMap Account")
Layout.alignment: Qt.AlignHCenter
Layout.columnSpan: 2
enabled: _airMapEnabled
onClicked: {
Qt.openUrlExternally("https://www.airmap.com");
}
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
}
}
}
//-----------------------------------------------------------------
//-- Pilot Profile
Item {
width: _panelWidth
height: profileLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
visible: QGroundControl.settingsManager.appSettings.visible
QGCLabel {
id: profileLabel
text: qsTr("Pilot Profile")
font.family: ScreenTools.demiboldFontFamily
}
}
Rectangle {
height: profileGrid.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
GridLayout {
id: profileGrid
columns: 2
columnSpacing: ScreenTools.defaultFontPixelHeight * 2
rowSpacing: ScreenTools.defaultFontPixelWidth * 0.25
anchors.centerIn: parent
QGCLabel { text: qsTr("Name:") }
QGCLabel { text: qsTr("John Doe") }
QGCLabel { text: qsTr("User Name:") }
QGCLabel { text: qsTr("joe36") }
QGCLabel { text: qsTr("Email:") }
QGCLabel { text: qsTr("jonh@doe.com") }
QGCLabel { text: qsTr("Phone:") }
QGCLabel { text: qsTr("+1 212 555 1212") }
}
}
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
//-----------------------------------------------------------------
//-- License (Will this stay here?)
Item {
width: _panelWidth
height: licenseLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
visible: QGroundControl.settingsManager.appSettings.visible
QGCLabel {
id: licenseLabel
text: qsTr("License")
font.family: ScreenTools.demiboldFontFamily
}
}
Rectangle {
height: licenseGrid.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
GridLayout {
id: licenseGrid
columns: 2
columnSpacing: ScreenTools.defaultFontPixelHeight * 2
rowSpacing: ScreenTools.defaultFontPixelWidth * 0.25
anchors.centerIn: parent
QGCLabel { text: qsTr("API Key:") }
FactTextField { fact: QGroundControl.settingsManager.airMapSettings.apiKey; }
QGCLabel { text: qsTr("Client ID:") }
FactTextField { fact: QGroundControl.settingsManager.airMapSettings.clientID; }
QGCLabel { text: qsTr("User Name:") }
FactTextField { fact: QGroundControl.settingsManager.airMapSettings.userName; }
QGCLabel { text: qsTr("Password:") }
FactTextField { fact: QGroundControl.settingsManager.airMapSettings.password; echoMode: TextInput.Password }
}
}
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
//-----------------------------------------------------------------
//-- Flight List
Item {
width: _panelWidth
height: flightListLabel.height
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
visible: QGroundControl.settingsManager.appSettings.visible
QGCLabel {
id: flightListLabel
text: qsTr("Flight List")
font.family: ScreenTools.demiboldFontFamily
}
Component.onCompleted: {
QGroundControl.airspaceManager.flightPlan.loadFlightList()
}
}
Rectangle {
height: flightCol.height + (ScreenTools.defaultFontPixelHeight * 2)
width: _panelWidth
color: qgcPal.windowShade
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.horizontalCenter: parent.horizontalCenter
Column {
id: flightCol
spacing: ScreenTools.defaultFontPixelHeight
anchors.centerIn: parent
Repeater {
model: QGroundControl.airspaceManager.flightPlan.flightList
Row {
spacing: ScreenTools.defaultFontPixelWidth
QGCCheckBox {
text: object.flightID
checked: object.selected
onClicked: object.selected = checked
}
}
}
}
}