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
6e4127f8
Commit
6e4127f8
authored
Nov 08, 2018
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
5fe4a4a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
PreFlightCheckGroup.qml
src/QmlControls/PreFlightCheckGroup.qml
+1
-1
PreFlightCheckList.qml
src/QmlControls/PreFlightCheckList.qml
+23
-19
No files found.
src/QmlControls/PreFlightCheckGroup.qml
View file @
6e4127f8
...
...
@@ -22,7 +22,7 @@ Column {
property
alias
_checked
:
header
.
checked
onPassedChanged
:
parent
.
groupPassedChanged
(
ObjectModel
.
index
)
onPassedChanged
:
parent
.
groupPassedChanged
(
ObjectModel
.
index
,
passed
)
Component.onCompleted
:
{
enabled
=
_checked
...
...
src/QmlControls/PreFlightCheckList.qml
View file @
6e4127f8
...
...
@@ -23,31 +23,31 @@ Rectangle {
property
alias
model
:
checkListRepeater
.
model
property
bool
_passed
:
false
property
bool
_passed
:
false
// We delay the updates when a group passes so the user can see all items green for a moment prior to hiding
Timer
{
id
:
delayedGroupPassed
interval
:
750
property
int
index
onTriggered
:
{
function
_handleGroupPassedChanged
(
index
,
passed
)
{
if
(
passed
)
{
// Collapse current group
var
group
=
checkListRepeater
.
itemAt
(
index
)
group
.
_checked
=
false
// Expand next group
if
(
index
+
1
<
checkListRepeater
.
count
)
{
group
=
checkListRepeater
.
itemAt
(
index
+
1
)
group
.
enabled
=
true
group
.
_checked
=
true
}
for
(
var
i
=
0
;
i
<
checkListRepeater
.
count
;
i
++
)
{
if
(
!
checkListRepeater
.
itemAt
(
i
).
passed
)
{
_passed
=
false
return
}
}
_passed
=
true
}
_passed
=
passed
}
// We delay the updates when a group passes so the user can see all items green for a moment prior to hiding
Timer
{
id
:
delayedGroupPassed
interval
:
750
property
int
index
onTriggered
:
_handleGroupPassedChanged
(
index
,
true
/* passed */
)
}
Column
{
...
...
@@ -59,9 +59,13 @@ Rectangle {
anchors.topMargin
:
0.6
*
ScreenTools
.
defaultFontPixelWidth
anchors.leftMargin
:
1.5
*
ScreenTools
.
defaultFontPixelWidth
function
groupPassedChanged
(
index
)
{
delayedGroupPassed
.
index
=
index
delayedGroupPassed
.
restart
()
function
groupPassedChanged
(
index
,
passed
)
{
if
(
passed
)
{
delayedGroupPassed
.
index
=
index
delayedGroupPassed
.
restart
()
}
else
{
_handleGroupPassedChanged
(
index
,
passed
)
}
}
// Header/title of checklist
...
...
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