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
128ff820
Commit
128ff820
authored
Oct 28, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding button to close PIP
parent
7d3cb138
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
43 deletions
+102
-43
qgcresources.qrc
qgcresources.qrc
+1
-0
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+54
-8
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+39
-1
PiP.svg
src/FlightMap/Images/PiP.svg
+3
-3
QGCInstrumentWidget.qml
src/FlightMap/Widgets/QGCInstrumentWidget.qml
+5
-31
No files found.
qgcresources.qrc
View file @
128ff820
...
...
@@ -50,6 +50,7 @@
<file alias="compassInstrumentAirplane.svg">src/FlightMap/Images/compassInstrumentAirplane.svg</file>
<file alias="compassInstrumentDial.svg">src/FlightMap/Images/compassInstrumentDial.svg</file>
<file alias="crossHair.svg">src/FlightMap/Images/crossHair.svg</file>
<file alias="PIP.svg">src/FlightMap/Images/PIP.svg</file>
<file alias="rollDialWhite.svg">src/FlightMap/Images/rollDialWhite.svg</file>
<file alias="rollPointerWhite.svg">src/FlightMap/Images/rollPointerWhite.svg</file>
<file alias="scale.png">src/FlightMap/Images/scale.png</file>
...
...
src/FlightDisplay/FlightDisplayView.qml
View file @
128ff820
...
...
@@ -57,8 +57,10 @@ Item {
readonly
property
string
_mapName
:
"
FlightDisplayView
"
readonly
property
string
_showMapBackgroundKey
:
"
/showMapBackground
"
readonly
property
string
_mainIsMapKey
:
"
MainFlyWindowIsMap
"
readonly
property
string
_PIPVisibleKey
:
"
IsPIPVisible
"
property
bool
_mainIsMap
:
QGroundControl
.
loadBoolGlobalSetting
(
_mainIsMapKey
,
true
)
property
bool
_mainIsMap
:
QGroundControl
.
loadBoolGlobalSetting
(
_mainIsMapKey
,
true
)
property
bool
_isPipVisible
:
QGroundControl
.
loadBoolGlobalSetting
(
_PIPVisibleKey
,
true
)
property
real
_roll
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
roll
)
?
_defaultRoll
:
_activeVehicle
.
roll
)
:
_defaultRoll
property
real
_pitch
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
pitch
)
?
_defaultPitch
:
_activeVehicle
.
pitch
)
:
_defaultPitch
...
...
@@ -71,6 +73,9 @@ Item {
property
real
_airSpeed
:
_activeVehicle
?
_activeVehicle
.
airSpeed
:
_defaultAirSpeed
property
real
_climbRate
:
_activeVehicle
?
_activeVehicle
.
climbRate
:
_defaultClimbRate
property
bool
_isBackgroundDark
:
_mainIsMap
?
(
_flightMap
?
_flightMap
.
isSatelliteMap
:
true
)
:
true
property
var
_flightMap
:
null
property
var
_flightVideo
:
null
property
var
_savedZoomLevel
:
0
...
...
@@ -123,7 +128,7 @@ Item {
//-- PIP Window
Rectangle
{
id
:
pip
visible
:
_controller
.
hasVideo
visible
:
_controller
.
hasVideo
&&
_isPipVisible
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
...
...
@@ -132,12 +137,7 @@ Item {
color
:
"
#000010
"
border.width
:
4
radius
:
4
border.color
:
{
if
(
_mainIsMap
&&
_flightMap
!=
null
)
return
_flightMap
.
isSatelliteMap
?
Qt
.
rgba
(
1
,
1
,
1
,
0.75
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
else
return
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
}
border.color
:
_isBackgroundDark
?
Qt
.
rgba
(
1
,
1
,
1
,
0.75
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
Loader
{
id
:
pipLoader
anchors.fill
:
parent
...
...
@@ -160,6 +160,52 @@ Item {
QGroundControl
.
saveBoolGlobalSetting
(
_mainIsMapKey
,
_mainIsMap
)
}
}
Image
{
id
:
closePIP
source
:
"
/qmlimages/PIP.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
height
:
ScreenTools
.
defaultFontPixelSize
*
2.5
width
:
ScreenTools
.
defaultFontPixelSize
*
2.5
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isPipVisible
=
false
QGroundControl
.
saveBoolGlobalSetting
(
_PIPVisibleKey
,
false
)
}
}
}
}
//-- Show PIP
Rectangle
{
id
:
openPIP
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
height
:
ScreenTools
.
defaultFontPixelSize
*
2
width
:
ScreenTools
.
defaultFontPixelSize
*
2
radius
:
ScreenTools
.
defaultFontPixelSize
/
3
visible
:
_controller
.
hasVideo
&&
!
_isPipVisible
color
:
_isBackgroundDark
?
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
Image
{
width
:
parent
.
width
*
0.75
height
:
parent
.
height
*
0.75
source
:
"
/qmlimages/buttonRight.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isPipVisible
=
true
QGroundControl
.
saveBoolGlobalSetting
(
_PIPVisibleKey
,
true
)
}
}
}
//-- Widgets
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
128ff820
...
...
@@ -39,6 +39,10 @@ import QGroundControl.FlightMap 1.0
/// FlightDisplayViewControl.
Item
{
readonly
property
string
_InstrumentVisibleKey
:
"
IsInstrumentPanelVisible
"
property
bool
_isInstrumentVisible
:
QGroundControl
.
loadBoolGlobalSetting
(
_InstrumentVisibleKey
,
true
)
ExclusiveGroup
{
id
:
_dropButtonsExclusiveGroup
}
...
...
@@ -74,11 +78,12 @@ Item {
}
}
//-- Instrument Pan
n
el
//-- Instrument Panel
QGCInstrumentWidget
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
visible
:
_isInstrumentVisible
size
:
ScreenTools
.
defaultFontPixelSize
*
(
9
)
active
:
_activeVehicle
!=
null
heading
:
_heading
...
...
@@ -89,6 +94,39 @@ Item {
airSpeed
:
_airSpeed
isSatellite
:
_mainIsMap
?
_flightMap
?
_flightMap
.
isSatelliteMap
:
true
:
true
z
:
QGroundControl
.
zOrderWidgets
onClicked
:
{
_isInstrumentVisible
=
false
QGroundControl
.
saveBoolGlobalSetting
(
_InstrumentVisibleKey
,
false
)
}
}
//-- Show (Hidden) Instrument Panel
Rectangle
{
id
:
openButton
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
height
:
ScreenTools
.
defaultFontPixelSize
*
2
width
:
ScreenTools
.
defaultFontPixelSize
*
2
radius
:
ScreenTools
.
defaultFontPixelSize
/
3
visible
:
!
_isInstrumentVisible
color
:
_isBackgroundDark
?
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
Image
{
width
:
parent
.
width
*
0.75
height
:
parent
.
height
*
0.75
source
:
"
/qmlimages/buttonLeft.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isInstrumentVisible
=
true
QGroundControl
.
saveBoolGlobalSetting
(
_InstrumentVisibleKey
,
false
)
}
}
}
//-- Vertical Tool Buttons
...
...
src/FlightMap/Images/PiP.svg
View file @
128ff820
...
...
@@ -2,9 +2,9 @@
<!-- 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=
"0 0 72 72"
enable-background=
"new 0 0 72 72"
xml:space=
"preserve"
>
<path
opacity=
"0.
85"
d=
"M0,72V0l72,0C72,39.797,39.797,72,0,72
z"
/>
<path
opacity=
"0.
5"
d=
"M0,0v72h72C72,32.203,39.797,0,0,0
z"
/>
<g>
<rect
x=
"14.4"
y=
"
15.401
"
stroke=
"#FFFFFF"
stroke-width=
"2"
stroke-miterlimit=
"10"
width=
"36"
height=
"27"
/>
<rect
x=
"5.4"
y=
"
6.401
"
stroke=
"#FFFFFF"
stroke-width=
"2"
stroke-miterlimit=
"10"
width=
"36"
height=
"27"
/>
<rect
x=
"14.4"
y=
"
29.599
"
stroke=
"#FFFFFF"
stroke-width=
"2"
stroke-miterlimit=
"10"
width=
"36"
height=
"27"
/>
<rect
x=
"5.4"
y=
"
38.599
"
stroke=
"#FFFFFF"
stroke-width=
"2"
stroke-miterlimit=
"10"
width=
"36"
height=
"27"
/>
</g>
</svg>
src/FlightMap/Widgets/QGCInstrumentWidget.qml
View file @
128ff820
...
...
@@ -36,6 +36,8 @@ Item {
id
:
root
height
:
size
signal
clicked
property
alias
heading
:
compass
.
heading
property
alias
rollAngle
:
attitude
.
rollAngle
property
alias
pitchAngle
:
attitude
.
pitchAngle
...
...
@@ -48,9 +50,9 @@ Item {
property
bool
_isVisible
:
true
//-- Instrument Pan
n
el
//-- Instrument Panel
Rectangle
{
id
:
instrumentPan
n
el
id
:
instrumentPanel
height
:
instruments
.
height
+
ScreenTools
.
defaultFontPixelSize
width
:
root
.
size
radius
:
root
.
size
/
2
...
...
@@ -162,36 +164,8 @@ Item {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isVisible
=
!
_isVisible
onClicked
:
root
.
clicked
()
}
}
}
//-- Show Instruments
Rectangle
{
id
:
openButton
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
ScreenTools
.
defaultFontPixelSize
*
2
width
:
ScreenTools
.
defaultFontPixelSize
*
2
radius
:
ScreenTools
.
defaultFontPixelSize
/
3
visible
:
!
_isVisible
color
:
isSatellite
?
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
Image
{
width
:
parent
.
width
*
0.75
height
:
parent
.
height
*
0.75
source
:
"
/qmlimages/buttonLeft.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isVisible
=
!
_isVisible
}
}
}
}
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