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
cfe2cf55
Commit
cfe2cf55
authored
May 06, 2016
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message Window Cleanup
parent
2896a075
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
19 deletions
+55
-19
qgcresources.qrc
qgcresources.qrc
+1
-2
TrashDelete.svg
resources/TrashDelete.svg
+8
-0
TrashDeleteBlack.svg
src/FlightMap/Images/TrashDeleteBlack.svg
+0
-11
Vehicle.cc
src/Vehicle/Vehicle.cc
+5
-0
Vehicle.h
src/Vehicle/Vehicle.h
+3
-0
MainWindowInner.qml
src/ui/MainWindowInner.qml
+33
-5
UASMessageView.cc
src/ui/uas/UASMessageView.cc
+5
-1
No files found.
qgcresources.qrc
View file @
cfe2cf55
...
...
@@ -126,8 +126,6 @@
<file alias="MapSyncChanged.svg">src/FlightMap/Images/MapSyncChanged.svg</file>
<file alias="MapType.svg">src/FlightMap/Images/MapType.svg</file>
<file alias="MapTypeBlack.svg">src/FlightMap/Images/MapTypeBlack.svg</file>
<file alias="TrashDelete.svg">src/FlightMap/Images/TrashDelete.svg</file>
<file alias="TrashDeleteBlack.svg">src/FlightMap/Images/TrashDeleteBlack.svg</file>
<file alias="Armed.svg">src/ui/toolbar/Images/Armed.svg</file>
<file alias="Battery.svg">src/ui/toolbar/Images/Battery.svg</file>
<file alias="Connect.svg">src/ui/toolbar/Images/Connect.svg</file>
...
...
@@ -174,6 +172,7 @@
<file alias="QGroundControlConnect">resources/QGroundControlConnect.svg</file>
<file alias="SplashScreen">resources/SplashScreen.png</file>
<file alias="Stop">resources/Stop.svg</file>
<file alias="TrashDelete.svg">resources/TrashDelete.svg</file>
<file alias="XDelete.svg">resources/XDelete.svg</file>
<file alias="XDeleteBlack.svg">resources/XDeleteBlack.svg</file>
</qresource>
...
...
src/FlightMap/Imag
es/TrashDelete.svg
→
resourc
es/TrashDelete.svg
View file @
cfe2cf55
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<g>
<path
fill=
"none"
d=
"M-71.309,68.986"
/>
</g>
<rect
x=
"-64.709"
y=
"65.8"
fill=
"#FFFFFF"
width=
"23.417"
height=
"4.797"
/>
<path
fill=
"#FFFFFF"
d=
"M-41.291,72.001h-23.417V98.2h23.417L-41.291,72.001L-41.291,72.001z M-44.381,94.749h-3.24V75.731h3.24
V94.749z M-51.38,94.749h-3.24V75.731h3.24V94.749z M-58.081,94.749h-3.24V75.731h3.24V94.749z"
/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<rect
x=
"-78.911"
y=
"46"
fill=
"#FFFFFF"
width=
"51.822"
height=
"10.66"
/>
<path
fill=
"#FFFFFF"
d=
"M-27.089,59.781h-51.822V118h51.822L-27.089,59.781L-27.089,59.781z M-33.927,110.332h-7.17V68.068h7.17
V110.332z M-49.416,110.332h-7.17V68.068h7.17V110.332z M-64.245,110.332h-7.17V68.068h7.17V110.332z"
/>
</svg>
src/FlightMap/Images/TrashDeleteBlack.svg
deleted
100644 → 0
View file @
2896a075
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<g>
<path
fill=
"none"
d=
"M-71.309,68.986"
/>
</g>
<rect
x=
"-64.709"
y=
"65.8"
fill=
"#231F20"
width=
"23.417"
height=
"4.797"
/>
<path
fill=
"#231F20"
d=
"M-41.291,72.001h-23.417V98.2h23.417L-41.291,72.001L-41.291,72.001z M-44.381,94.749h-3.24V75.731h3.24
V94.749z M-51.38,94.749h-3.24V75.731h3.24V94.749z M-58.081,94.749h-3.24V75.731h3.24V94.749z"
/>
</svg>
src/Vehicle/Vehicle.cc
View file @
cfe2cf55
...
...
@@ -922,6 +922,11 @@ QString Vehicle::formatedMessages()
return
messages
;
}
void
Vehicle
::
clearMessages
()
{
qgcApp
()
->
toolbox
()
->
uasMessageHandler
()
->
clearMessages
();
}
void
Vehicle
::
_handletextMessageReceived
(
UASMessage
*
message
)
{
if
(
message
)
...
...
src/Vehicle/Vehicle.h
View file @
cfe2cf55
...
...
@@ -363,6 +363,9 @@ public:
/// Reboot vehicle
Q_INVOKABLE
void
rebootVehicle
();
/// Clear Messages
Q_INVOKABLE
void
clearMessages
();
bool
guidedModeSupported
(
void
)
const
;
bool
pauseVehicleSupported
(
void
)
const
;
...
...
src/ui/MainWindowInner.qml
View file @
cfe2cf55
...
...
@@ -349,13 +349,11 @@ Item {
//-- System Message Area
Rectangle
{
id
:
messageArea
function
close
()
{
currentPopUp
=
null
messageText
.
text
=
""
messageArea
.
visible
=
false
}
width
:
mainWindow
.
width
*
0.5
height
:
mainWindow
.
height
*
0.5
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.8
)
...
...
@@ -366,6 +364,13 @@ Item {
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.top
:
parent
.
top
anchors.topMargin
:
tbHeight
+
ScreenTools
.
defaultFontPixelHeight
MouseArea
{
// This MouseArea prevents the Map below it from getting Mouse events. Without this
// things like mousewheel will scroll the Flickable and then scroll the map as well.
anchors.fill
:
parent
preventStealing
:
true
onWheel
:
wheel
.
accepted
=
true
}
QGCFlickable
{
id
:
messageFlick
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
...
...
@@ -383,7 +388,7 @@ Item {
}
//-- Dismiss System Message
Image
{
//anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
width
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
defaultFontPixelHeight
*
1.5
:
ScreenTools
.
defaultFontPixelHeight
...
...
@@ -400,7 +405,30 @@ Item {
}
}
}
//-- Clear Messages
Image
{
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
height
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
defaultFontPixelHeight
*
1.5
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
sourceSize.height
:
height
source
:
"
/res/TrashDelete.svg
"
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicleAvailable
)
{
activeVehicle
.
clearMessages
();
messageArea
.
close
()
}
}
}
}
}
//-------------------------------------------------------------------------
//-- Critical Message Area
Rectangle
{
...
...
@@ -468,7 +496,7 @@ Item {
//-- Dismiss Critical Message
QGCColoredImage
{
id
:
criticalClose
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
width
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
defaultFontPixelHeight
*
1.5
:
ScreenTools
.
defaultFontPixelHeight
...
...
@@ -487,7 +515,7 @@ Item {
//-- More text below indicator
QGCColoredImage
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
width
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
defaultFontPixelHeight
*
1.5
:
ScreenTools
.
defaultFontPixelHeight
...
...
src/ui/uas/UASMessageView.cc
View file @
cfe2cf55
...
...
@@ -87,7 +87,11 @@ void UASMessageViewWidget::handleTextMessage(UASMessage *message)
// Turn off updates while we're appending content to avoid breaking the autoscroll behavior
msgWidget
->
setUpdatesEnabled
(
false
);
QScrollBar
*
scroller
=
msgWidget
->
verticalScrollBar
();
msgWidget
->
appendHtml
(
message
->
getFormatedText
());
QString
messages
=
message
->
getFormatedText
();
messages
=
messages
.
replace
(
"<#E>"
,
"color: #f95e5e; font: monospace;"
);
messages
=
messages
.
replace
(
"<#I>"
,
"color: #f9b55e; font: monospace;"
);
messages
=
messages
.
replace
(
"<#N>"
,
"color: #ffffff; font: monospace;"
);
msgWidget
->
appendHtml
(
messages
);
// Ensure text area scrolls correctly
scroller
->
setValue
(
scroller
->
maximum
());
msgWidget
->
setUpdatesEnabled
(
true
);
...
...
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