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
d299b1e0
Commit
d299b1e0
authored
Feb 10, 2020
by
DoinLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
a7774f1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
45 deletions
+58
-45
PreFlightCheckList.qml
src/FlightDisplay/PreFlightCheckList.qml
+58
-45
No files found.
src/FlightDisplay/PreFlightCheckList.qml
View file @
d299b1e0
...
@@ -19,10 +19,12 @@ import QGroundControl.Vehicle 1.0
...
@@ -19,10 +19,12 @@ import QGroundControl.Vehicle 1.0
Rectangle
{
Rectangle
{
width
:
mainColumn
.
width
+
ScreenTools
.
defaultFontPixelWidth
*
3
width
:
mainColumn
.
width
+
ScreenTools
.
defaultFontPixelWidth
*
3
height
:
mainColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
height
:
Math
.
min
(
availableHeight
-
(
_verticalMargin
*
2
),
mainColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
)
color
:
qgcPal
.
windowShade
color
:
qgcPal
.
windowShade
radius
:
3
radius
:
3
property
real
_verticalMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
Loader
{
Loader
{
id
:
modelContainer
id
:
modelContainer
source
:
"
/checklists/DefaultChecklist.qml
"
source
:
"
/checklists/DefaultChecklist.qml
"
...
@@ -94,56 +96,67 @@ Rectangle {
...
@@ -94,56 +96,67 @@ Rectangle {
onTriggered
:
_handleGroupPassedChanged
(
index
,
true
/* passed */
)
onTriggered
:
_handleGroupPassedChanged
(
index
,
true
/* passed */
)
}
}
Column
{
QGCFlickable
{
id
:
mainColumn
id
:
flickable
width
:
40
*
ScreenTools
.
defaultFontPixelWidth
anchors.topMargin
:
_verticalMargin
spacing
:
0.8
*
ScreenTools
.
defaultFontPixelWidth
anchors.bottomMargin
:
_verticalMargin
anchors.left
:
parent
.
left
anchors.leftMargin
:
_horizontalMargin
anchors.top
:
parent
.
top
anchors.rightMargin
:
_horizontalMargin
anchors.topMargin
:
0.6
*
ScreenTools
.
defaultFontPixelWidth
anchors.fill
:
parent
anchors.leftMargin
:
1.5
*
ScreenTools
.
defaultFontPixelWidth
flickableDirection
:
Flickable
.
VerticalFlick
contentWidth
:
mainColumn
.
width
function
groupPassedChanged
(
index
,
passed
)
{
contentHeight
:
mainColumn
.
height
if
(
passed
)
{
delayedGroupPassed
.
index
=
index
property
real
_horizontalMargin
:
1.5
*
ScreenTools
.
defaultFontPixelWidth
delayedGroupPassed
.
restart
()
property
real
_verticalMargin
:
0.6
*
ScreenTools
.
defaultFontPixelWidth
}
else
{
_handleGroupPassedChanged
(
index
,
passed
)
Column
{
id
:
mainColumn
width
:
40
*
ScreenTools
.
defaultFontPixelWidth
spacing
:
0.8
*
ScreenTools
.
defaultFontPixelWidth
function
groupPassedChanged
(
index
,
passed
)
{
if
(
passed
)
{
delayedGroupPassed
.
index
=
index
delayedGroupPassed
.
restart
()
}
else
{
_handleGroupPassedChanged
(
index
,
passed
)
}
}
}
}
// Header/title of checklist
// Header/title of checklist
Item
{
Item
{
width
:
parent
.
width
width
:
parent
.
width
height
:
1.75
*
ScreenTools
.
defaultFontPixelHeight
height
:
1.75
*
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Pre-Flight Checklist %1
"
).
arg
(
_passed
?
qsTr
(
"
(passed)
"
)
:
""
)
text
:
qsTr
(
"
Pre-Flight Checklist %1
"
).
arg
(
_passed
?
qsTr
(
"
(passed)
"
)
:
""
)
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
}
}
QGCButton
{
QGCButton
{
width
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
width
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
height
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
height
:
1.2
*
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
tooltip
:
qsTr
(
"
Reset the checklist (e.g. after a vehicle reboot)
"
)
tooltip
:
qsTr
(
"
Reset the checklist (e.g. after a vehicle reboot)
"
)
onClicked
:
checkListRepeater
.
model
.
reset
()
onClicked
:
checkListRepeater
.
model
.
reset
()
QGCColoredImage
{
QGCColoredImage
{
source
:
"
/qmlimages/MapSyncBlack.svg
"
source
:
"
/qmlimages/MapSyncBlack.svg
"
color
:
qgcPal
.
buttonText
color
:
qgcPal
.
buttonText
anchors.fill
:
parent
anchors.fill
:
parent
}
}
}
}
}
}
// All check list items
// All check list items
Repeater
{
Repeater
{
id
:
checkListRepeater
id
:
checkListRepeater
model
:
modelContainer
.
item
.
model
model
:
modelContainer
.
item
.
model
}
}
}
}
}
}
}
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