Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ffd803ac
Commit
ffd803ac
authored
Jun 14, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the preflight checklist to a proper, modal dialog.
parent
d2ab2510
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
25 deletions
+42
-25
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+19
-4
PreFlightCheckButton.qml
src/QmlControls/PreFlightCheckButton.qml
+3
-4
PreFlightCheckList.qml
src/QmlControls/PreFlightCheckList.qml
+20
-17
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
ffd803ac
...
...
@@ -627,7 +627,6 @@ Item {
{
name
:
"
Checklist
"
,
iconSource
:
"
/qmlimages/check.svg
"
,
dropPanelComponent
:
checklistDropPanel
},
{
name
:
_guidedController
.
takeoffTitle
,
...
...
@@ -660,6 +659,8 @@ Item {
guidedActionsController
.
closeAll
()
if
(
index
===
0
)
{
mainWindow
.
showPlanView
()
}
else
if
(
index
===
1
)
{
checklistDropPanel
.
open
()
}
else
{
var
action
=
model
[
index
].
action
if
(
action
===
-
1
)
{
...
...
@@ -795,10 +796,24 @@ Item {
}
//-- Checklist GUI
Component
{
id
:
checklistDropPanel
Popup
{
id
:
checklistDropPanel
x
:
Math
.
round
((
mainWindow
.
width
-
width
)
*
0.5
)
y
:
Math
.
round
((
mainWindow
.
height
-
height
)
*
0.5
)
height
:
checkList
.
height
width
:
checkList
.
width
modal
:
true
focus
:
true
closePolicy
:
Popup
.
CloseOnEscape
|
Popup
.
CloseOnPressOutside
background
:
Rectangle
{
anchors.fill
:
parent
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
clip
:
true
}
PreFlightCheckList
{
model
:
preFlightCheckModel
id
:
checkList
model
:
preFlightCheckModel
}
}
}
src/QmlControls/PreFlightCheckButton.qml
View file @
ffd803ac
...
...
@@ -43,9 +43,9 @@ QGCButton {
readonly
property
int
_stateFailed
:
1
///< Telemetry check is failing, user cannot click to make it pass
readonly
property
int
_statePassed
:
2
///< Check has passed
readonly
property
color
_passedColor
:
Qt
.
rgba
(
0.27
,
0.67
,
0.42
,
1
)
readonly
property
color
_pendingColor
:
Qt
.
rgba
(
0.9
,
0.47
,
0.2
,
1
)
readonly
property
color
_failedColor
:
Qt
.
rgba
(
0.92
,
0.22
,
0.22
,
1
)
readonly
property
color
_passedColor
:
"
#86cc6a
"
readonly
property
color
_pendingColor
:
"
#f7a81f
"
readonly
property
color
_failedColor
:
"
#c31818
"
property
string
_text
:
"
<b>
"
+
name
+
"
</b>:
"
+
((
_telemetryState
!==
_statePassed
)
?
...
...
@@ -136,5 +136,4 @@ QGCButton {
}
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
}
src/QmlControls/PreFlightCheckList.qml
View file @
ffd803ac
...
...
@@ -16,10 +16,10 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
width
:
mainColumn
.
width
+
3
*
ScreenTools
.
defaultFontPixelWidth
height
:
mainColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
radius
:
3
width
:
mainColumn
.
width
+
ScreenTools
.
defaultFontPixelWidth
*
3
height
:
mainColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
radius
:
3
property
alias
model
:
checkListRepeater
.
model
...
...
@@ -52,12 +52,12 @@ Rectangle {
Column
{
id
:
mainColumn
width
:
40
*
ScreenTools
.
defaultFontPixelWidth
spacing
:
0.8
*
ScreenTools
.
defaultFontPixelWidth
width
:
40
*
ScreenTools
.
defaultFontPixelWidth
spacing
:
0.8
*
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
anchors.topMargin
:
0.6
*
ScreenTools
.
defaultFontPixelWidth
anchors.leftMargin
:
1.5
*
ScreenTools
.
defaultFontPixelWidth
anchors.topMargin
:
0.6
*
ScreenTools
.
defaultFontPixelWidth
anchors.leftMargin
:
1.5
*
ScreenTools
.
defaultFontPixelWidth
function
groupPassedChanged
(
index
,
passed
)
{
if
(
passed
)
{
...
...
@@ -70,8 +70,8 @@ Rectangle {
// Header/title of checklist
Item
{
width
:
parent
.
width
height
:
1.75
*
ScreenTools
.
defaultFontPixelHeight
width
:
parent
.
width
height
:
1.75
*
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
text
:
qsTr
(
"
Pre-Flight Checklist %1
"
).
arg
(
_passed
?
qsTr
(
"
(passed)
"
)
:
""
)
...
...
@@ -80,16 +80,19 @@ Rectangle {
font.pointSize
:
ScreenTools
.
mediumFontPointSize
}
QGCButton
{
width
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
height
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
width
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
height
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
opacity
:
0.2
+
0.8
*
(
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
0
)
tooltip
:
qsTr
(
"
Reset the checklist (e.g. after a vehicle reboot)
"
)
onClicked
:
model
.
reset
()
onClicked
:
model
.
reset
()
Image
{
source
:
"
/qmlimages/MapSyncBlack.svg
"
;
anchors.fill
:
parent
}
QGCColoredImage
{
source
:
"
/qmlimages/MapSyncBlack.svg
"
color
:
qgcPal
.
buttonText
anchors.fill
:
parent
}
}
}
...
...
@@ -97,5 +100,5 @@ Rectangle {
Repeater
{
id
:
checkListRepeater
}
}
// Column
}
//Rectangle
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment