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
Show 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 {
...
@@ -222,7 +222,7 @@ QGCView {
z
:
_mainIsMap
?
_panel
.
z
+
1
:
_panel
.
z
+
2
z
:
_mainIsMap
?
_panel
.
z
+
1
:
_panel
.
z
+
2
anchors.left
:
_panel
.
left
anchors.left
:
_panel
.
left
anchors.bottom
:
_panel
.
bottom
anchors.bottom
:
_panel
.
bottom
visible
:
_mainIsMap
||
_isPipVisible
visible
:
_mainIsMap
||
_isPipVisible
&&
!
QGroundControl
.
videoManager
.
fullScreen
width
:
_mainIsMap
?
_panel
.
width
:
_pipSize
width
:
_mainIsMap
?
_panel
.
width
:
_pipSize
height
:
_mainIsMap
?
_panel
.
height
:
_pipSize
*
(
9
/
16
)
height
:
_mainIsMap
?
_panel
.
height
:
_pipSize
*
(
9
/
16
)
states
:
[
states
:
[
...
@@ -300,7 +300,7 @@ QGCView {
...
@@ -300,7 +300,7 @@ QGCView {
anchors.left
:
_panel
.
left
anchors.left
:
_panel
.
left
anchors.bottom
:
_panel
.
bottom
anchors.bottom
:
_panel
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
visible
:
QGroundControl
.
videoManager
.
hasVideo
visible
:
QGroundControl
.
videoManager
.
hasVideo
&&
!
QGroundControl
.
videoManager
.
fullScreen
isHidden
:
!
_isPipVisible
isHidden
:
!
_isPipVisible
isDark
:
isBackgroundDark
isDark
:
isBackgroundDark
onActivated
:
{
onActivated
:
{
...
@@ -349,7 +349,7 @@ QGCView {
...
@@ -349,7 +349,7 @@ QGCView {
qgcView
:
root
qgcView
:
root
useLightColors
:
isBackgroundDark
useLightColors
:
isBackgroundDark
missionController
:
_missionController
missionController
:
_missionController
visible
:
singleVehicleView
.
checked
visible
:
singleVehicleView
.
checked
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -357,6 +357,7 @@ QGCView {
...
@@ -357,6 +357,7 @@ QGCView {
Loader
{
Loader
{
id
:
flyViewOverlay
id
:
flyViewOverlay
z
:
flightDisplayViewWidgets
.
z
+
1
z
:
flightDisplayViewWidgets
.
z
+
1
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
height
:
ScreenTools
.
availableHeight
height
:
ScreenTools
.
availableHeight
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
altitudeSlider
.
visible
?
altitudeSlider
.
left
:
parent
.
right
anchors.right
:
altitudeSlider
.
visible
?
altitudeSlider
.
left
:
parent
.
right
...
@@ -373,7 +374,7 @@ QGCView {
...
@@ -373,7 +374,7 @@ QGCView {
anchors.right
:
_flightVideo
.
right
anchors.right
:
_flightVideo
.
right
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
width
:
height
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
opacity
:
0.75
Rectangle
{
Rectangle
{
...
@@ -407,7 +408,7 @@ QGCView {
...
@@ -407,7 +408,7 @@ QGCView {
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
visible
:
!
singleVehicleView
.
checked
visible
:
!
singleVehicleView
.
checked
&&
!
QGroundControl
.
videoManager
.
fullScreen
z
:
_panel
.
z
+
4
z
:
_panel
.
z
+
4
}
}
...
@@ -418,7 +419,7 @@ QGCView {
...
@@ -418,7 +419,7 @@ QGCView {
z
:
_panel
.
z
+
5
z
:
_panel
.
z
+
5
width
:
parent
.
width
-
(
_flightVideoPipControl
.
width
/
2
)
width
:
parent
.
width
-
(
_flightVideoPipControl
.
width
/
2
)
height
:
Math
.
min
(
ScreenTools
.
availableHeight
*
0.25
,
ScreenTools
.
defaultFontPixelWidth
*
16
)
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.bottom
:
_flightVideoPipControl
.
top
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
2
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
2
anchors.horizontalCenter
:
flightDisplayViewWidgets
.
horizontalCenter
anchors.horizontalCenter
:
flightDisplayViewWidgets
.
horizontalCenter
...
@@ -431,7 +432,7 @@ QGCView {
...
@@ -431,7 +432,7 @@ QGCView {
}
}
ToolStrip
{
ToolStrip
{
visible
:
_activeVehicle
?
_activeVehicle
.
guidedModeSupported
:
true
visible
:
(
_activeVehicle
?
_activeVehicle
.
guidedModeSupported
:
true
)
&&
!
QGroundControl
.
videoManager
.
fullScreen
id
:
toolStrip
id
:
toolStrip
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
_panel
.
left
anchors.left
:
_panel
.
left
...
...
src/FlightDisplay/FlightDisplayViewVideo.qml
View file @
081d2ee9
...
@@ -39,6 +39,12 @@ Item {
...
@@ -39,6 +39,12 @@ Item {
font.pointSize
:
_mainIsMap
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
largeFontPointSize
font.pointSize
:
_mainIsMap
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
largeFontPointSize
anchors.centerIn
:
parent
anchors.centerIn
:
parent
}
}
MouseArea
{
anchors.fill
:
parent
onDoubleClicked
:
{
QGroundControl
.
videoManager
.
fullScreen
=
!
QGroundControl
.
videoManager
.
fullScreen
}
}
}
}
Rectangle
{
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -67,35 +73,41 @@ Item {
...
@@ -67,35 +73,41 @@ Item {
height
:
parent
.
height
height
:
parent
.
height
width
:
1
width
:
1
x
:
parent
.
width
*
0.33
x
:
parent
.
width
*
0.33
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
}
Rectangle
{
Rectangle
{
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
height
:
parent
.
height
height
:
parent
.
height
width
:
1
width
:
1
x
:
parent
.
width
*
0.66
x
:
parent
.
width
*
0.66
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
}
Rectangle
{
Rectangle
{
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
width
:
parent
.
width
width
:
parent
.
width
height
:
1
height
:
1
y
:
parent
.
height
*
0.33
y
:
parent
.
height
*
0.33
visible
:
_showGrid
visible
:
_showGrid
&&
!
QGroundControl
.
videoManager
.
fullScreen
}
}
Rectangle
{
Rectangle
{
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
width
:
parent
.
width
width
:
parent
.
width
height
:
1
height
:
1
y
:
parent
.
height
*
0.66
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
//-- Camera Controller
Loader
{
Loader
{
source
:
_dynamicCameras
?
_dynamicCameras
.
controllerSource
:
""
source
:
QGroundControl
.
videoManager
.
fullScreen
?
""
:
(
_dynamicCameras
?
_dynamicCameras
.
controllerSource
:
""
)
visible
:
!
_mainIsMap
&&
_dynamicCameras
&&
_dynamicCameras
.
cameras
.
count
&&
_connected
visible
:
!
_mainIsMap
&&
_dynamicCameras
&&
_dynamicCameras
.
cameras
.
count
&&
_connected
&&
!
QGroundControl
.
videoManager
.
fullScreen
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
...
...
src/FlightDisplay/VideoManager.cc
View file @
081d2ee9
...
@@ -34,6 +34,7 @@ VideoManager::VideoManager(QGCApplication* app, QGCToolbox* toolbox)
...
@@ -34,6 +34,7 @@ VideoManager::VideoManager(QGCApplication* app, QGCToolbox* toolbox)
:
QGCTool
(
app
,
toolbox
)
:
QGCTool
(
app
,
toolbox
)
,
_videoReceiver
(
NULL
)
,
_videoReceiver
(
NULL
)
,
_videoSettings
(
NULL
)
,
_videoSettings
(
NULL
)
,
_fullScreen
(
false
)
{
{
}
}
...
...
src/FlightDisplay/VideoManager.h
View file @
081d2ee9
...
@@ -35,10 +35,12 @@ public:
...
@@ -35,10 +35,12 @@ public:
Q_PROPERTY
(
bool
isGStreamer
READ
isGStreamer
NOTIFY
isGStreamerChanged
)
Q_PROPERTY
(
bool
isGStreamer
READ
isGStreamer
NOTIFY
isGStreamerChanged
)
Q_PROPERTY
(
QString
videoSourceID
READ
videoSourceID
NOTIFY
videoSourceIDChanged
)
Q_PROPERTY
(
QString
videoSourceID
READ
videoSourceID
NOTIFY
videoSourceIDChanged
)
Q_PROPERTY
(
bool
uvcEnabled
READ
uvcEnabled
CONSTANT
)
Q_PROPERTY
(
bool
uvcEnabled
READ
uvcEnabled
CONSTANT
)
Q_PROPERTY
(
bool
fullScreen
READ
fullScreen
WRITE
setfullScreen
NOTIFY
fullScreenChanged
)
Q_PROPERTY
(
VideoReceiver
*
videoReceiver
READ
videoReceiver
CONSTANT
)
Q_PROPERTY
(
VideoReceiver
*
videoReceiver
READ
videoReceiver
CONSTANT
)
bool
hasVideo
();
bool
hasVideo
();
bool
isGStreamer
();
bool
isGStreamer
();
bool
fullScreen
()
{
return
_fullScreen
;
}
QString
videoSourceID
()
{
return
_videoSourceID
;
}
QString
videoSourceID
()
{
return
_videoSourceID
;
}
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
;
}
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
;
}
...
@@ -49,6 +51,8 @@ public:
...
@@ -49,6 +51,8 @@ public:
bool
uvcEnabled
();
bool
uvcEnabled
();
#endif
#endif
void
setfullScreen
(
bool
f
)
{
_fullScreen
=
f
;
emit
fullScreenChanged
();
}
// Override from QGCTool
// Override from QGCTool
void
setToolbox
(
QGCToolbox
*
toolbox
);
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
@@ -56,6 +60,7 @@ signals:
...
@@ -56,6 +60,7 @@ signals:
void
hasVideoChanged
();
void
hasVideoChanged
();
void
isGStreamerChanged
();
void
isGStreamerChanged
();
void
videoSourceIDChanged
();
void
videoSourceIDChanged
();
void
fullScreenChanged
();
private
slots
:
private
slots
:
void
_videoSourceChanged
();
void
_videoSourceChanged
();
...
@@ -69,6 +74,7 @@ private:
...
@@ -69,6 +74,7 @@ private:
VideoReceiver
*
_videoReceiver
;
VideoReceiver
*
_videoReceiver
;
VideoSettings
*
_videoSettings
;
VideoSettings
*
_videoSettings
;
QString
_videoSourceID
;
QString
_videoSourceID
;
bool
_fullScreen
;
};
};
#endif
#endif
src/ui/MainWindowInner.qml
View file @
081d2ee9
...
@@ -204,7 +204,7 @@ Item {
...
@@ -204,7 +204,7 @@ Item {
property
var
messageQueue
:
[]
property
var
messageQueue
:
[]
function
showMessage
(
message
)
{
function
showMessage
(
message
)
{
if
(
criticalMmessageArea
.
visible
)
{
if
(
criticalMmessageArea
.
visible
||
QGroundControl
.
videoManager
.
fullScreen
)
{
messageQueue
.
push
(
message
)
messageQueue
.
push
(
message
)
}
else
{
}
else
{
criticalMessageText
.
text
=
message
criticalMessageText
.
text
=
message
...
@@ -271,6 +271,7 @@ Item {
...
@@ -271,6 +271,7 @@ Item {
MainToolBar
{
MainToolBar
{
id
:
toolBar
id
:
toolBar
height
:
ScreenTools
.
toolbarHeight
height
:
ScreenTools
.
toolbarHeight
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
...
...
src/ui/toolbar/MainToolBar.qml
View file @
081d2ee9
...
@@ -21,6 +21,7 @@ import QGroundControl.Controllers 1.0
...
@@ -21,6 +21,7 @@ import QGroundControl.Controllers 1.0
Rectangle
{
Rectangle
{
id
:
toolBar
id
:
toolBar
color
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
?
Qt
.
rgba
(
1
,
1
,
1
,
0.8
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
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
}
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