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
6af4274d
Commit
6af4274d
authored
Jul 20, 2017
by
dheideman
Committed by
Jacob Walser
Jul 24, 2017
Browse files
Flight display: Flash record button when recording
parent
667c1e12
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/FlightDisplay/FlightDisplayView.qml
View file @
6af4274d
...
...
@@ -374,12 +374,22 @@ QGCView {
visible
:
_videoReceiver
&&
_videoReceiver
.
videoRunning
&&
QGroundControl
.
settingsManager
.
videoSettings
.
showRecControl
.
rawValue
opacity
:
0.75
readonly
property
string
recordBtnBackground
:
"
BackgroundName
"
Rectangle
{
id
:
recordBtnBackground
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
height
radius
:
QGroundControl
.
videoManager
&&
_videoReceiver
&&
_videoReceiver
.
recording
?
0
:
height
color
:
"
red
"
SequentialAnimation
on
visible
{
running
:
QGroundControl
.
videoManager
&&
QGroundControl
.
videoManager
.
videoReceiver
&&
QGroundControl
.
videoManager
.
videoReceiver
.
recording
loops
:
Animation
.
Infinite
PropertyAnimation
{
to
:
false
;
duration
:
1000
}
PropertyAnimation
{
to
:
true
;
duration
:
1000
}
}
}
QGCColoredImage
{
...
...
@@ -389,13 +399,23 @@ QGCView {
width
:
height
*
0.625
sourceSize.width
:
width
source
:
"
/qmlimages/CameraIcon.svg
"
visible
:
recordBtnBackground
.
visible
fillMode
:
Image
.
PreserveAspectFit
color
:
"
white
"
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
_videoReceiver
&&
_videoReceiver
.
recording
?
_videoReceiver
.
stopRecording
()
:
_videoReceiver
.
startRecording
()
onClicked
:
{
if
(
QGroundControl
.
videoManager
&&
QGroundControl
.
videoManager
.
videoReceiver
)
{
if
(
QGroundControl
.
videoManager
.
videoReceiver
.
recording
)
{
QGroundControl
.
videoManager
.
videoReceiver
.
stopRecording
()
recordBtnBackground
.
visible
=
true
}
else
{
QGroundControl
.
videoManager
.
videoReceiver
.
startRecording
()
}
}
}
}
}
...
...
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