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
af086fa5
Commit
af086fa5
authored
Feb 21, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message view improvements
parent
ca5c4862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
QGCMessageView.cc
src/ui/uas/QGCMessageView.cc
+13
-13
No files found.
src/ui/uas/QGCMessageView.cc
View file @
af086fa5
...
...
@@ -104,14 +104,14 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr
case
MAV_SEVERITY_ERROR
:
// TODO: Move this audio output to UAS.cc, as it doesn't make sense to put audio output in a message logger widget.
GAudioOutput
::
instance
()
->
say
(
text
.
toLower
());
style
=
QString
(
"color:#DC143C;"
);
style
=
QString
(
"color:#DC143C;
font-weight:bold
"
);
break
;
case
MAV_SEVERITY_WARNING
:
case
MAV_SEVERITY_NOTICE
:
style
=
QString
(
"color:%1;"
).
arg
(
colorName
);
style
=
QString
(
"color:%1;
font-weight:bold
"
).
arg
(
colorName
);
break
;
default:
style
=
QString
(
"color:%1;"
).
arg
(
colorName
);
style
=
QString
(
"color:%1;
font-weight:bold
"
).
arg
(
colorName
);
break
;
}
...
...
@@ -120,37 +120,37 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr
switch
(
severity
)
{
case
MAV_SEVERITY_EMERGENCY
:
severityText
=
QString
(
tr
(
"
EMERGENCY
"
));
severityText
=
QString
(
tr
(
"
EMERGENCY:
"
));
break
;
case
MAV_SEVERITY_ALERT
:
severityText
=
QString
(
tr
(
"
ALERT
"
));
severityText
=
QString
(
tr
(
"
ALERT:
"
));
break
;
case
MAV_SEVERITY_CRITICAL
:
severityText
=
QString
(
tr
(
"
Critical
"
));
severityText
=
QString
(
tr
(
"
Critical:
"
));
break
;
case
MAV_SEVERITY_ERROR
:
severityText
=
QString
(
tr
(
"
Error
"
));
severityText
=
QString
(
tr
(
"
Error:
"
));
break
;
case
MAV_SEVERITY_WARNING
:
severityText
=
QString
(
tr
(
"
Warning
"
));
severityText
=
QString
(
tr
(
"
Warning:
"
));
break
;
case
MAV_SEVERITY_NOTICE
:
severityText
=
QString
(
tr
(
"
Notice
"
));
severityText
=
QString
(
tr
(
"
Notice:
"
));
break
;
case
MAV_SEVERITY_INFO
:
severityText
=
QString
(
tr
(
"
Info
"
));
severityText
=
QString
(
tr
(
"
Info:
"
));
break
;
case
MAV_SEVERITY_DEBUG
:
severityText
=
QString
(
tr
(
"
Debug
"
));
severityText
=
QString
(
tr
(
"
Debug:
"
));
break
;
default:
severityText
=
QString
(
tr
(
"
Unknown
"
));
severityText
=
QString
(
tr
(
""
));
break
;
}
// Finally append the properly-styled text with a timestamp.
QString
dateString
=
QDateTime
::
currentDateTime
().
toString
(
Qt
::
SystemLocaleShortDate
);
msgWidget
->
appendHtml
(
QString
(
"<p style=
\"
%1
\"
>[%2][%3:%4] %5 - %6
</p>"
).
arg
(
style
).
arg
(
dateString
).
arg
(
uasName
).
arg
(
compId
).
arg
(
severityText
).
arg
(
text
));
msgWidget
->
appendHtml
(
QString
(
"<p style=
\"
color:#CCCCCC
\"
>[%2 - %3:%4]<font style=
\"
%1
\"
>%5 %6</font>
</p>"
).
arg
(
style
).
arg
(
dateString
).
arg
(
uasName
).
arg
(
compId
).
arg
(
severityText
).
arg
(
text
));
// Ensure text area scrolls correctly
scroller
->
setValue
(
scroller
->
maximum
());
...
...
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