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
7f1d60e3
Commit
7f1d60e3
authored
May 25, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove X to close since it conflicts with QGCViewDialogs
parent
b8d25964
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
146 additions
and
95 deletions
+146
-95
AppMessages.qml
src/QmlControls/AppMessages.qml
+146
-95
No files found.
src/QmlControls/AppMessages.qml
View file @
7f1d60e3
...
@@ -26,115 +26,166 @@ import QtQuick.Controls 1.2
...
@@ -26,115 +26,166 @@ import QtQuick.Controls 1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
QGCView
{
id
:
logwindow
id
:
qgcView
anchors.fill
:
parent
viewPanel
:
panel
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
color
:
qgcPal
.
window
property
bool
loaded
:
false
property
bool
loaded
:
false
QGCPalette
{
id
:
qgcPal
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
Connections
{
Component
{
target
:
debugMessageModel
id
:
filtersDialogComponent
onDataChanged
:
{
QGCViewDialog
{
// Keep the view in sync if the button is checked
QGCFlickable
{
if
(
loaded
)
{
anchors.fill
:
parent
if
(
followTail
.
checked
)
{
contentHeight
:
categoryColumn
.
height
listview
.
positionViewAtEnd
();
clip
:
true
Column
{
id
:
categoryColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
Repeater
{
model
:
QGroundControl
.
loggingCategories
()
QGCCheckBox
{
text
:
modelData
checked
:
QGroundControl
.
categoryLoggingOn
(
modelData
)
onClicked
:
{
QGroundControl
.
setCategoryLoggingOn
(
modelData
,
checked
)
QGroundControl
.
updateLoggingFilterRules
()
}
}
}
}
}
}
}
}
}
// QGCViewDialog
}
}
// Component - filtersDialogComponent
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
Component
{
id
:
delegateItem
Rectangle
{
Rectangle
{
color
:
index
%
2
==
0
?
qgcPal
.
window
:
qgcPal
.
windowShade
id
:
logwindow
height
:
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
*
0.5
+
field
.
height
)
anchors.fill
:
parent
width
:
listview
.
width
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
color
:
qgcPal
.
window
Text
{
id
:
field
Connections
{
text
:
display
target
:
debugMessageModel
color
:
qgcPal
.
text
width
:
parent
.
width
onDataChanged
:
{
wrapMode
:
Text
.
Wrap
// Keep the view in sync if the button is checked
font.family
:
ScreenTools
.
normalFontFamily
if
(
loaded
)
{
anchors.verticalCenter
:
parent
.
verticalCenter
if
(
followTail
.
checked
)
{
listview
.
positionViewAtEnd
();
}
}
}
}
}
}
}
ListView
{
Component
{
Component.onCompleted
:
{
id
:
delegateItem
loaded
=
true
Rectangle
{
}
color
:
index
%
2
==
0
?
qgcPal
.
window
:
qgcPal
.
windowShade
anchors.top
:
parent
.
top
height
:
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
*
0.5
+
field
.
height
)
anchors.left
:
parent
.
left
width
:
listview
.
width
anchors.right
:
parent
.
right
anchors.bottom
:
followTail
.
top
Text
{
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
id
:
field
clip
:
true
text
:
display
id
:
listview
color
:
qgcPal
.
text
model
:
debugMessageModel
width
:
parent
.
width
delegate
:
delegateItem
wrapMode
:
Text
.
Wrap
}
font.family
:
ScreenTools
.
normalFontFamily
anchors.verticalCenter
:
parent
.
verticalCenter
FileDialog
{
}
id
:
writeDialog
}
folder
:
shortcuts
.
home
}
nameFilters
:
[
"
Log files (*.txt)
"
,
"
All Files (*)
"
]
selectExisting
:
false
ListView
{
title
:
"
Select log save file
"
Component.onCompleted
:
{
onAccepted
:
{
loaded
=
true
debugMessageModel
.
writeMessages
(
fileUrl
);
}
visible
=
false
;
anchors.top
:
parent
.
top
}
anchors.left
:
parent
.
left
onRejected
:
visible
=
false
anchors.right
:
parent
.
right
}
anchors.bottom
:
followTail
.
top
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
Connections
{
clip
:
true
target
:
debugMessageModel
id
:
listview
onWriteStarted
:
writeButton
.
enabled
=
false
;
model
:
debugMessageModel
onWriteFinished
:
writeButton
.
enabled
=
true
;
delegate
:
delegateItem
}
}
QGCButton
{
FileDialog
{
id
:
writeButton
id
:
writeDialog
anchors.bottom
:
parent
.
bottom
folder
:
shortcuts
.
home
anchors.left
:
parent
.
left
nameFilters
:
[
qsTr
(
"
Log files (*.txt)
"
),
qsTr
(
"
All Files (*)
"
)]
onClicked
:
writeDialog
.
visible
=
true
selectExisting
:
false
text
:
"
Save App Log
"
title
:
qsTr
(
"
Select log save file
"
)
}
onAccepted
:
{
debugMessageModel
.
writeMessages
(
fileUrl
);
BusyIndicator
{
visible
=
false
;
id
:
writeBusy
}
anchors.bottom
:
writeButton
.
bottom
onRejected
:
visible
=
false
anchors.left
:
writeButton
.
right
}
height
:
writeButton
.
height
visible
:
!
writeButton
.
enabled
Connections
{
}
target
:
debugMessageModel
onWriteStarted
:
writeButton
.
enabled
=
false
;
QGCButton
{
onWriteFinished
:
writeButton
.
enabled
=
true
;
id
:
followTail
}
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
QGCButton
{
text
:
"
Show Latest
"
id
:
writeButton
checkable
:
true
anchors.bottom
:
parent
.
bottom
checked
:
true
anchors.left
:
parent
.
left
onClicked
:
writeDialog
.
visible
=
true
onCheckedChanged
:
{
text
:
qsTr
(
"
Save App Log
"
)
if
(
checked
&&
loaded
)
{
}
listview
.
positionViewAtEnd
();
BusyIndicator
{
id
:
writeBusy
anchors.bottom
:
writeButton
.
bottom
anchors.left
:
writeButton
.
right
height
:
writeButton
.
height
visible
:
!
writeButton
.
enabled
}
QGCButton
{
id
:
followTail
anchors.right
:
filterButton
.
left
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottom
:
parent
.
bottom
text
:
qsTr
(
"
Show Latest
"
)
checkable
:
true
checked
:
true
onCheckedChanged
:
{
if
(
checked
&&
loaded
)
{
listview
.
positionViewAtEnd
();
}
}
}
QGCButton
{
id
:
filterButton
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Set logging
"
)
onClicked
:
showDialog
(
filtersDialogComponent
,
qsTr
(
"
Turn on logging categories
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Close
)
}
}
}
}
}
}
// QGCViewPanel
}
}
// QGCView
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