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
6865e01c
Commit
6865e01c
authored
Aug 19, 2013
by
tstellanova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support speaking critical messages
parent
2dfe72e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
QGCMessageView.cc
src/ui/uas/QGCMessageView.cc
+9
-4
No files found.
src/ui/uas/QGCMessageView.cc
View file @
6865e01c
#include "QGCMessageView.h"
#include "QGCMessageView.h"
#include "ui_QGCMessageView.h"
#include "UASManager.h"
#include "QGCUnconnectedInfoWidget.h"
#include <QMenu>
#include <QMenu>
#include <QScrollBar>
#include <QScrollBar>
#include "GAudioOutput.h"
#include "QGCUnconnectedInfoWidget.h"
#include "UASManager.h"
#include "ui_QGCMessageView.h"
QGCMessageView
::
QGCMessageView
(
QWidget
*
parent
)
:
QGCMessageView
::
QGCMessageView
(
QWidget
*
parent
)
:
QWidget
(
parent
),
QWidget
(
parent
),
activeUAS
(
NULL
),
activeUAS
(
NULL
),
...
@@ -68,7 +72,8 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr
...
@@ -68,7 +72,8 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr
QString
colorName
(
uas
->
getColor
().
name
());
QString
colorName
(
uas
->
getColor
().
name
());
//change styling based on severity
//change styling based on severity
if
(
160
==
severity
)
{
//TODO where is the constant for "critical" severity?
if
(
160
==
severity
)
{
//TODO where is the constant for "critical" severity?
msgWidget
->
appendHtml
(
QString
(
"<p style=
\"
color:#DC143C;background-color:#FFFACD;font-size:larger;font-weight:bold
\"
>[%1:%2] %3</p>"
).
arg
(
uasName
).
arg
(
compId
).
arg
(
text
));
GAudioOutput
::
instance
()
->
say
(
text
.
toLower
());
msgWidget
->
appendHtml
(
QString
(
"<p style=
\"
color:#DC143C;background-color:#FFFACD;font-size:large;font-weight:bold
\"
>[%1:%2] %3</p>"
).
arg
(
uasName
).
arg
(
compId
).
arg
(
text
));
}
}
else
{
else
{
msgWidget
->
appendHtml
(
QString
(
"<p style=
\"
color:%1;font-size:smaller
\"
>[%2:%3] %4</p>"
).
arg
(
colorName
).
arg
(
uasName
).
arg
(
compId
).
arg
(
text
));
msgWidget
->
appendHtml
(
QString
(
"<p style=
\"
color:%1;font-size:smaller
\"
>[%2:%3] %4</p>"
).
arg
(
colorName
).
arg
(
uasName
).
arg
(
compId
).
arg
(
text
));
...
...
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