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
081d2ee9
Commit
081d2ee9
authored
Sep 03, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toggle video stream full screen
parent
ac99b3fe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
15 deletions
+37
-15
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+8
-7
FlightDisplayViewVideo.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
+18
-6
VideoManager.cc
src/FlightDisplay/VideoManager.cc
+1
-0
VideoManager.h
src/FlightDisplay/VideoManager.h
+6
-0
MainWindowInner.qml
src/ui/MainWindowInner.qml
+3
-2
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+1
-0
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
081d2ee9
...
...
@@ -222,7 +222,7 @@ QGCView {
z
:
_mainIsMap
?
_panel
.
z
+
1
:
_panel
.
z
+
2
anchors.left
:
_panel
.
left
anchors.bottom
:
_panel
.
bottom
visible
:
_mainIsMap
||
_isPipVisible
visible
:
_mainIsMap
||
_isPipVisible
&&
!
QGroundControl
.
videoManager
.
fullScreen
width
:
_mainIsMap
?
_panel
.
width
:
_pipSize
height
:
_mainIsMap
?
_panel
.
height
:
_pipSize
*
(
9
/
16
)
states
:
[
...
...
@@ -300,7 +300,7 @@ QGCView {
anchors.left
:
_panel
.
left
anchors.bottom
:
_panel
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
visible
:
QGroundControl
.
videoManager
.
hasVideo
visible
:
QGroundControl
.
videoManager
.
hasVideo
&&
!
QGroundControl
.
videoManager
.
fullScreen
isHidden
:
!
_isPipVisible
isDark
:
isBackgroundDark
onActivated
:
{
...
...
@@ -349,7 +349,7 @@ QGCView {
qgcView
:
root
useLightColors
:
isBackgroundDark
missionController
:
_missionController
visible
:
singleVehicleView
.
checked
visible
:
singleVehicleView
.
checked
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
//-------------------------------------------------------------------------
...
...
@@ -357,6 +357,7 @@ QGCView {
Loader
{
id
:
flyViewOverlay
z
:
flightDisplayViewWidgets
.
z
+
1
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
height
:
ScreenTools
.
availableHeight
anchors.left
:
parent
.
left
anchors.right
:
altitudeSlider
.
visible
?
altitudeSlider
.
left
:
parent
.
right
...
...
@@ -373,7 +374,7 @@ QGCView {
anchors.right
:
_flightVideo
.
right
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
width
:
height
visible
:
QGroundControl
.
videoManager
.
videoReceiver
.
videoRunning
&&
QGroundControl
.
settingsManager
.
videoSettings
.
showRecControl
.
rawValue
&&
!
_isCamera
visible
:
QGroundControl
.
videoManager
.
videoReceiver
.
videoRunning
&&
QGroundControl
.
settingsManager
.
videoSettings
.
showRecControl
.
rawValue
&&
!
_isCamera
&&
!
QGroundControl
.
videoManager
.
fullScreen
opacity
:
0.75
Rectangle
{
...
...
@@ -407,7 +408,7 @@ QGCView {
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
visible
:
!
singleVehicleView
.
checked
visible
:
!
singleVehicleView
.
checked
&&
!
QGroundControl
.
videoManager
.
fullScreen
z
:
_panel
.
z
+
4
}
...
...
@@ -418,7 +419,7 @@ QGCView {
z
:
_panel
.
z
+
5
width
:
parent
.
width
-
(
_flightVideoPipControl
.
width
/
2
)
height
:
Math
.
min
(
ScreenTools
.
availableHeight
*
0.25
,
ScreenTools
.
defaultFontPixelWidth
*
16
)
visible
:
_virtualJoystick
?
_virtualJoystick
.
value
:
false
visible
:
(
_virtualJoystick
?
_virtualJoystick
.
value
:
false
)
&&
!
QGroundControl
.
videoManager
.
fullScreen
anchors.bottom
:
_flightVideoPipControl
.
top
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
2
anchors.horizontalCenter
:
flightDisplayViewWidgets
.
horizontalCenter
...
...
@@ -431,7 +432,7 @@ QGCView {
}
ToolStrip
{
visible
:
_activeVehicle
?
_activeVehicle
.
guidedModeSupported
:
true
visible
:
(
_activeVehicle
?
_activeVehicle
.
guidedModeSupported
:
true
)
&&
!
QGroundControl
.
videoManager
.
fullScreen
id
:
toolStrip
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
_panel
.
left
...
...
src/FlightDisplay/FlightDisplayViewVideo.qml
View file @
081d2ee9
...
...
@@ -39,6 +39,12 @@ Item {
font.pointSize
:
_mainIsMap
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
largeFontPointSize
anchors.centerIn
:
parent
}
MouseArea
{
anchors.fill
:
parent
onDoubleClicked
:
{
QGroundControl
.
videoManager
.
fullScreen
=
!
QGroundControl
.
videoManager
.
fullScreen
}
}
}
Rectangle
{
anchors.fill
:
parent
...
...
@@ -67,35 +73,41 @@ Item {
height
:
parent
.
height
width
:
1
x
:
parent
.
width
*
0.33
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
Rectangle
{
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
height
:
parent
.
height
width
:
1
x
:
parent
.
width
*
0.66
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
Rectangle
{
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
width
:
parent
.
width
height
:
1
y
:
parent
.
height
*
0.33
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
Rectangle
{
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
width
:
parent
.
width
height
:
1
y
:
parent
.
height
*
0.66
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
}
MouseArea
{
anchors.fill
:
parent
onDoubleClicked
:
{
QGroundControl
.
videoManager
.
fullScreen
=
!
QGroundControl
.
videoManager
.
fullScreen
}
}
}
//-- Camera Controller
Loader
{
source
:
_dynamicCameras
?
_dynamicCameras
.
controllerSource
:
""
visible
:
!
_mainIsMap
&&
_dynamicCameras
&&
_dynamicCameras
.
cameras
.
count
&&
_connected
source
:
QGroundControl
.
videoManager
.
fullScreen
?
""
:
(
_dynamicCameras
?
_dynamicCameras
.
controllerSource
:
""
)
visible
:
!
_mainIsMap
&&
_dynamicCameras
&&
_dynamicCameras
.
cameras
.
count
&&
_connected
&&
!
QGroundControl
.
videoManager
.
fullScreen
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottom
:
parent
.
bottom
...
...
src/FlightDisplay/VideoManager.cc
View file @
081d2ee9
...
...
@@ -34,6 +34,7 @@ VideoManager::VideoManager(QGCApplication* app, QGCToolbox* toolbox)
:
QGCTool
(
app
,
toolbox
)
,
_videoReceiver
(
NULL
)
,
_videoSettings
(
NULL
)
,
_fullScreen
(
false
)
{
}
...
...
src/FlightDisplay/VideoManager.h
View file @
081d2ee9
...
...
@@ -35,10 +35,12 @@ public:
Q_PROPERTY
(
bool
isGStreamer
READ
isGStreamer
NOTIFY
isGStreamerChanged
)
Q_PROPERTY
(
QString
videoSourceID
READ
videoSourceID
NOTIFY
videoSourceIDChanged
)
Q_PROPERTY
(
bool
uvcEnabled
READ
uvcEnabled
CONSTANT
)
Q_PROPERTY
(
bool
fullScreen
READ
fullScreen
WRITE
setfullScreen
NOTIFY
fullScreenChanged
)
Q_PROPERTY
(
VideoReceiver
*
videoReceiver
READ
videoReceiver
CONSTANT
)
bool
hasVideo
();
bool
isGStreamer
();
bool
fullScreen
()
{
return
_fullScreen
;
}
QString
videoSourceID
()
{
return
_videoSourceID
;
}
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
;
}
...
...
@@ -49,6 +51,8 @@ public:
bool
uvcEnabled
();
#endif
void
setfullScreen
(
bool
f
)
{
_fullScreen
=
f
;
emit
fullScreenChanged
();
}
// Override from QGCTool
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
@@ -56,6 +60,7 @@ signals:
void
hasVideoChanged
();
void
isGStreamerChanged
();
void
videoSourceIDChanged
();
void
fullScreenChanged
();
private
slots
:
void
_videoSourceChanged
();
...
...
@@ -69,6 +74,7 @@ private:
VideoReceiver
*
_videoReceiver
;
VideoSettings
*
_videoSettings
;
QString
_videoSourceID
;
bool
_fullScreen
;
};
#endif
src/ui/MainWindowInner.qml
View file @
081d2ee9
...
...
@@ -204,7 +204,7 @@ Item {
property
var
messageQueue
:
[]
function
showMessage
(
message
)
{
if
(
criticalMmessageArea
.
visible
)
{
if
(
criticalMmessageArea
.
visible
||
QGroundControl
.
videoManager
.
fullScreen
)
{
messageQueue
.
push
(
message
)
}
else
{
criticalMessageText
.
text
=
message
...
...
@@ -271,6 +271,7 @@ Item {
MainToolBar
{
id
:
toolBar
height
:
ScreenTools
.
toolbarHeight
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
...
...
@@ -593,7 +594,7 @@ Item {
//-- Loader helper for any child, no matter how deep can display an element
// in the middle of the main window.
Loader
{
id
:
rootLoader
id
:
rootLoader
anchors.centerIn
:
parent
}
...
...
src/ui/toolbar/MainToolBar.qml
View file @
081d2ee9
...
...
@@ -21,6 +21,7 @@ import QGroundControl.Controllers 1.0
Rectangle
{
id
:
toolBar
color
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
?
Qt
.
rgba
(
1
,
1
,
1
,
0.8
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
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