Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cd7a5f81
Commit
cd7a5f81
authored
Apr 21, 2020
by
Patrick José Pereira
Browse files
AppMessages: Add Set all categories buttom
Signed-off-by:
Patrick José Pereira
<
patrickelectric@gmail.com
>
parent
8300cdc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/QmlControls/AppMessages.qml
View file @
cd7a5f81
...
...
@@ -36,22 +36,33 @@ Item {
id
:
categoryColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
QGCButton
{
text
:
qsTr
(
"
Clear All
"
)
onClicked
:
{
var
logCats
=
QGroundControl
.
loggingCategories
()
for
(
var
i
=
0
;
i
<
logCats
.
length
;
i
++
)
{
QGroundControl
.
setCategoryLoggingOn
(
logCats
[
i
],
fals
e
)
}
QGroundControl
.
updateLoggingFilterRules
()
categoryRepeater
.
model
=
undefined
categoryRepeater
.
model
=
QGroundControl
.
loggingCategories
(
)
Row
{
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
QGCButton
{
text
:
qsTr
(
"
Set All
"
)
onClicked
:
categoryRepeater
.
setAllLogs
(
tru
e
)
}
QGCButton
{
text
:
qsTr
(
"
Clear All
"
)
onClicked
:
categoryRepeater
.
setAllLogs
(
false
)
}
}
Repeater
{
id
:
categoryRepeater
model
:
QGroundControl
.
loggingCategories
()
function
setAllLogs
(
value
)
{
var
logCategories
=
QGroundControl
.
loggingCategories
()
for
(
var
category
of
logCategories
)
{
QGroundControl
.
setCategoryLoggingOn
(
category
,
value
)
}
QGroundControl
.
updateLoggingFilterRules
()
// Update model for repeater
categoryRepeater
.
model
=
undefined
categoryRepeater
.
model
=
QGroundControl
.
loggingCategories
()
}
QGCCheckBox
{
text
:
modelData
checked
:
QGroundControl
.
categoryLoggingOn
(
modelData
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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