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
cab1d265
Commit
cab1d265
authored
Oct 25, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pushing before merge
parent
60a46a22
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
261 additions
and
305 deletions
+261
-305
qgroundcontrol.qrc
qgroundcontrol.qrc
+2
-2
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+2
-8
FlightDisplayViewDelayLoad.qml
src/FlightDisplay/FlightDisplayViewDelayLoad.qml
+79
-16
FlightDisplayViewDelayLoadOuter.qml
src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
+0
-145
qmldir
src/FlightDisplay/qmldir
+2
-3
attitudeInstrument.svg
src/FlightMap/Images/attitudeInstrument.svg
+7
-4
buttonLeft.svg
src/FlightMap/Images/buttonLeft.svg
+9
-15
buttonRight.svg
src/FlightMap/Images/buttonRight.svg
+9
-15
QGCAttitudeWidget.qml
src/FlightMap/Widgets/QGCAttitudeWidget.qml
+78
-55
QGCCompassWidget.qml
src/FlightMap/Widgets/QGCCompassWidget.qml
+68
-39
QGCPitchIndicator.qml
src/FlightMap/Widgets/QGCPitchIndicator.qml
+3
-2
qmldir
src/FlightMap/qmldir
+2
-1
No files found.
qgroundcontrol.qrc
View file @
cab1d265
...
@@ -81,8 +81,7 @@
...
@@ -81,8 +81,7 @@
<!-- FlightDisplay module -->
<!-- FlightDisplay module -->
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewDelayLoadInner.qml">src/FlightDisplay/FlightDisplayViewDelayLoadInner.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewDelayLoad.qml">src/FlightDisplay/FlightDisplayViewDelayLoad.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml">src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml</file>
<!-- FlightMap module -->
<!-- FlightMap module -->
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
...
@@ -96,6 +95,7 @@
...
@@ -96,6 +95,7 @@
<file alias="QGroundControl/FlightMap/QGCCompassHUD.qml">src/FlightMap/Widgets/QGCCompassHUD.qml</file>
<file alias="QGroundControl/FlightMap/QGCCompassHUD.qml">src/FlightMap/Widgets/QGCCompassHUD.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentAltitude.qml">src/FlightMap/Widgets/QGCCurrentAltitude.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentAltitude.qml">src/FlightMap/Widgets/QGCCurrentAltitude.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentSpeed.qml">src/FlightMap/Widgets/QGCCurrentSpeed.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentSpeed.qml">src/FlightMap/Widgets/QGCCurrentSpeed.qml</file>
<file alias="QGroundControl/FlightMap/QGCInstrumentWidget.qml">src/FlightMap/Widgets/QGCInstrumentWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCPitchIndicator.qml">src/FlightMap/Widgets/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightMap/QGCPitchIndicator.qml">src/FlightMap/Widgets/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightMap/QGCSlider.qml">src/FlightMap/Widgets/QGCSlider.qml</file>
<file alias="QGroundControl/FlightMap/QGCSlider.qml">src/FlightMap/Widgets/QGCSlider.qml</file>
<file alias="QGroundControl/FlightMap/QGCSpeedWidget.qml">src/FlightMap/Widgets/QGCSpeedWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCSpeedWidget.qml">src/FlightMap/Widgets/QGCSpeedWidget.qml</file>
...
...
src/FlightDisplay/FlightDisplayView.qml
View file @
cab1d265
...
@@ -96,7 +96,7 @@ Item {
...
@@ -96,7 +96,7 @@ Item {
// Validate _showMap setting
// Validate _showMap setting
Component.onCompleted
:
{
Component.onCompleted
:
{
delayLoader
.
source
=
"
FlightDisplayViewDelayLoad
Outer
.qml
"
delayLoader
.
source
=
"
FlightDisplayViewDelayLoad.qml
"
// We have to be careful to not reference root properties in a function which is in a subcomponent
// We have to be careful to not reference root properties in a function which is in a subcomponent
// until the root component has completed loading. Otherwise you get undefined references.
// until the root component has completed loading. Otherwise you get undefined references.
...
@@ -133,14 +133,13 @@ Item {
...
@@ -133,14 +133,13 @@ Item {
onRootVehicleCoordinateChanged
:
updateMapPosition
(
false
/* force */
)
onRootVehicleCoordinateChanged
:
updateMapPosition
(
false
/* force */
)
Component.onCompleted
:
flightMapDelayLoader
.
source
=
"
FlightDisplayViewDelayLoadInner.qml
"
function
updateMapPosition
(
force
)
{
function
updateMapPosition
(
force
)
{
if
((
_followVehicle
||
force
)
&&
rootLoadCompleted
)
{
if
((
_followVehicle
||
force
)
&&
rootLoadCompleted
)
{
flightMap
.
latitude
=
root
.
_vehicleCoordinate
.
latitude
flightMap
.
latitude
=
root
.
_vehicleCoordinate
.
latitude
flightMap
.
longitude
=
root
.
_vehicleCoordinate
.
longitude
flightMap
.
longitude
=
root
.
_vehicleCoordinate
.
longitude
}
}
}
}
// Home position
// Home position
MissionItemIndicator
{
MissionItemIndicator
{
label
:
"
H
"
label
:
"
H
"
...
@@ -190,11 +189,6 @@ Item {
...
@@ -190,11 +189,6 @@ Item {
model
:
_missionController
.
waypointLines
model
:
_missionController
.
waypointLines
}
}
Loader
{
id
:
flightMapDelayLoader
anchors.fill
:
parent
}
// Used to make pinch zoom work
// Used to make pinch zoom work
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
...
...
src/FlightDisplay/FlightDisplayViewDelayLoad
Inner
.qml
→
src/FlightDisplay/FlightDisplayViewDelayLoad.qml
View file @
cab1d265
...
@@ -35,10 +35,39 @@ import QGroundControl.Palette 1.0
...
@@ -35,10 +35,39 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
FlightMap
1.0
/// This component is used to delay load the controls which are children of the inner FlightMap
/// This component is used to delay load the items which are direct children of the
/// control of FlightDisplayView.
/// FlightDisplayViewControl.
// Vehicle GPS lock display
Item
{
Item
{
QGCVideoBackground
{
anchors.fill
:
parent
display
:
_controller
.
videoSurface
receiver
:
_controller
.
videoReceiver
visible
:
!
_showMap
QGCCompassHUD
{
id
:
compassHUD
y
:
root
.
height
*
0.7
x
:
root
.
width
*
0.5
-
ScreenTools
.
defaultFontPixelSize
*
(
5
)
width
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
heading
:
_heading
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
}
QGCAttitudeHUD
{
id
:
attitudeHUD
rollAngle
:
_roll
pitchAngle
:
_pitch
width
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
}
}
//-- Vehicle GPS lock display
Column
{
Column
{
id
:
gpsLockColumn
id
:
gpsLockColumn
y
:
(
parent
.
height
-
height
)
/
2
y
:
(
parent
.
height
-
height
)
/
2
...
@@ -58,27 +87,19 @@ Item {
...
@@ -58,27 +87,19 @@ Item {
}
}
}
}
QGCCompassWidget
{
//-- Instrument Pannel
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
QGCInstrumentWidget
{
anchors.topMargin
:
topMargin
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
size
:
ScreenTools
.
defaultFontPixelSize
*
(
13.3
)
heading
:
_heading
z
:
QGroundControl
.
zOrderWidgets
}
QGCAttitudeWidget
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
size
:
ScreenTools
.
defaultFontPixelSize
*
(
13.3
)
size
:
ScreenTools
.
defaultFontPixelSize
*
(
9
)
heading
:
_heading
rollAngle
:
_roll
rollAngle
:
_roll
pitchAngle
:
_pitch
pitchAngle
:
_pitch
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
z
:
QGroundControl
.
zOrderWidgets
}
}
//-- Map Center Control
DropButton
{
DropButton
{
id
:
centerMapDropButton
id
:
centerMapDropButton
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
...
@@ -123,6 +144,7 @@ Item {
...
@@ -123,6 +144,7 @@ Item {
}
}
}
}
//-- Map Type Control
DropButton
{
DropButton
{
id
:
mapTypeButton
id
:
mapTypeButton
anchors.topMargin
:
topMargin
anchors.topMargin
:
topMargin
...
@@ -156,4 +178,45 @@ Item {
...
@@ -156,4 +178,45 @@ Item {
}
}
}
}
}
}
//-- Temporary Options Button
QGCButton
{
id
:
optionsButton
x
:
_flightMap
.
mapWidgets
.
x
y
:
_flightMap
.
mapWidgets
.
y
-
height
-
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
z
:
QGroundControl
.
zOrderWidgets
width
:
_flightMap
.
mapWidgets
.
width
text
:
"
Options
"
menu
:
optionsMenu
visible
:
_controller
.
hasVideo
&&
!
hideWidgets
ExclusiveGroup
{
id
:
backgroundTypeGroup
}
Menu
{
id
:
optionsMenu
MenuItem
{
id
:
mapBackgroundMenuItem
exclusiveGroup
:
backgroundTypeGroup
checkable
:
true
checked
:
_showMap
text
:
"
Show map as background
"
onTriggered
:
_setShowMap
(
true
)
}
MenuItem
{
id
:
videoBackgroundMenuItem
exclusiveGroup
:
backgroundTypeGroup
checkable
:
true
checked
:
!
_showMap
text
:
"
Show video as background
"
onTriggered
:
_setShowMap
(
false
)
}
}
}
}
}
src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
deleted
100644 → 0
View file @
60a46a22
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import
QtQuick
2.4
import
QtQuick
.
Controls
1.3
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QtLocation
5.3
import
QtPositioning
5.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
FlightMap
1.0
/// This component is used to delay load the items which are direct children of the
/// FlightDisplayViewControl.
Item
{
QGCVideoBackground
{
anchors.fill
:
parent
display
:
_controller
.
videoSurface
receiver
:
_controller
.
videoReceiver
visible
:
!
_showMap
QGCCompassHUD
{
id
:
compassHUD
y
:
root
.
height
*
0.7
x
:
root
.
width
*
0.5
-
ScreenTools
.
defaultFontPixelSize
*
(
5
)
width
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
heading
:
_heading
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
}
QGCAttitudeHUD
{
id
:
attitudeHUD
rollAngle
:
_roll
pitchAngle
:
_pitch
width
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
}
}
QGCAltitudeWidget
{
anchors.right
:
parent
.
right
height
:
parent
.
height
*
0.65
>
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
?
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
:
parent
.
height
*
0.65
width
:
ScreenTools
.
defaultFontPixelSize
*
(
5
)
altitude
:
_altitudeWGS84
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCSpeedWidget
{
anchors.left
:
parent
.
left
width
:
ScreenTools
.
defaultFontPixelSize
*
(
5
)
height
:
parent
.
height
*
0.65
>
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
?
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
:
parent
.
height
*
0.65
speed
:
_groundSpeed
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCCurrentSpeed
{
anchors.left
:
parent
.
left
width
:
ScreenTools
.
defaultFontPixelSize
*
(
6.25
)
airspeed
:
_airSpeed
groundspeed
:
_groundSpeed
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCCurrentAltitude
{
anchors.right
:
parent
.
right
width
:
ScreenTools
.
defaultFontPixelSize
*
(
6.25
)
altitude
:
_altitudeWGS84
vertZ
:
_climbRate
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCButton
{
id
:
optionsButton
x
:
_flightMap
.
mapWidgets
.
x
y
:
_flightMap
.
mapWidgets
.
y
-
height
-
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
z
:
QGroundControl
.
zOrderWidgets
width
:
_flightMap
.
mapWidgets
.
width
text
:
"
Options
"
menu
:
optionsMenu
visible
:
_controller
.
hasVideo
&&
!
hideWidgets
ExclusiveGroup
{
id
:
backgroundTypeGroup
}
Menu
{
id
:
optionsMenu
MenuItem
{
id
:
mapBackgroundMenuItem
exclusiveGroup
:
backgroundTypeGroup
checkable
:
true
checked
:
_showMap
text
:
"
Show map as background
"
onTriggered
:
_setShowMap
(
true
)
}
MenuItem
{
id
:
videoBackgroundMenuItem
exclusiveGroup
:
backgroundTypeGroup
checkable
:
true
checked
:
!
_showMap
text
:
"
Show video as background
"
onTriggered
:
_setShowMap
(
false
)
}
}
}
}
src/FlightDisplay/qmldir
View file @
cab1d265
Module QGroundControl.FlightDisplay
Module QGroundControl.FlightDisplay
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewDelayLoadInner 1.0 FlightDisplayViewDelayLoadInner.qml
FlightDisplayViewDelayLoad 1.0 FlightDisplayViewDelayLoad.qml
FlightDisplayViewDelayLoadOuter 1.0 FlightDisplayViewDelayLoadOuter.qml
src/FlightMap/Images/attitudeInstrument.svg
View file @
cab1d265
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 1
8.1.1
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 1
9.1.0
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_4"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<svg
version=
"1.1"
id=
"Layer_4"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 288 288"
enable-background=
"new 0 0 288 288"
xml:space=
"preserve"
>
viewBox=
"-161 253 288 288"
style=
"enable-background:new -161 253 288 288;"
xml:space=
"preserve"
>
<path
fill=
"#333333"
d=
"M0-0.002v288h288v-288H0z M144,270c-69.588,0-126-56.412-126-126S74.412,18,144,18s126,56.412,126,126
<style
type=
"text/css"
>
S213.588,270,144,270z"
/>
.st0{fill:#202020;}
</style>
<path
class=
"st0"
d=
"M-161,253v288h288V253L-161,253L-161,253z M-17,523c-69.6,0-126-56.4-126-126s56.4-126,126-126
s126,56.4,126,126S52.6,523-17,523z"
/>
</svg>
</svg>
src/FlightMap/Images/buttonLeft.svg
View file @
cab1d265
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 1
8.1.1
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 1
9.1.0
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<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 288 288"
enable-background=
"new 0 0 288 288
"
xml:space=
"preserve"
>
viewBox=
"
-161 253 288 288"
style=
"enable-background:new -161 253 288 288;
"
xml:space=
"preserve"
>
<
g
id=
"Layer_1
"
>
<
style
type=
"text/css
"
>
<rect
fill=
"#58595B"
width=
"288"
height=
"288"
/>
.st0{fill:none;stroke:#231F20;stroke-width:24;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</
g
>
</
style
>
<g
id=
"Layer_2"
>
<g
id=
"Layer_2"
>
<polyline
class=
"st0"
points=
"-59.8,282 -126.1,397 -59.8,512 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
<polyline
class=
"st0"
points=
"16.2,282 -50.2,397 16.2,512 "
/>
110.541,54 58.58,144 110.541,234 "
/>
<polyline
class=
"st0"
points=
"92.1,282 25.8,397 92.1,512 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
169.981,54 118.019,144 169.981,234 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
229.42,54 177.459,144 229.42,234 "
/>
</g>
</g>
</svg>
</svg>
src/FlightMap/Images/buttonRight.svg
View file @
cab1d265
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 1
8.1.1
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 1
9.1.0
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<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 288 288"
enable-background=
"new 0 0 288 288
"
xml:space=
"preserve"
>
viewBox=
"
-161 253 288 288"
style=
"enable-background:new -161 253 288 288;
"
xml:space=
"preserve"
>
<
g
id=
"Layer_1
"
>
<
style
type=
"text/css
"
>
<rect
fill=
"#58595B"
width=
"288"
height=
"288"
/>
.st0{fill:none;stroke:#231F20;stroke-width:24;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</
g
>
</
style
>
<g
id=
"Layer_2"
>
<g
id=
"Layer_2"
>
<polyline
class=
"st0"
points=
"15.8,512 82.1,397 15.8,282 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
<polyline
class=
"st0"
points=
"-60.2,512 6.2,397 -60.2,282 "
/>
177.459,234 229.42,144 177.459,54 "
/>
<polyline
class=
"st0"
points=
"-136.1,512 -69.8,397 -136.1,282 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
118.019,234 169.981,144 118.019,54 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
58.58,234 110.541,144 58.58,54 "
/>
</g>
</g>
</svg>
</svg>
src/FlightMap/Widgets/QGCAttitudeWidget.qml
View file @
cab1d265
...
@@ -28,9 +28,11 @@ This file is part of the QGROUNDCONTROL project
...
@@ -28,9 +28,11 @@ This file is part of the QGROUNDCONTROL project
*/
*/
import
QtQuick
2.4
import
QtQuick
2.4
import
QtGraphicalEffects
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
QGCMovable
Item
{
Item
{
id
:
root
id
:
root
property
bool
active
:
false
///< true: actively connected to data provider, false: show inactive control
property
bool
active
:
false
///< true: actively connected to data provider, false: show inactive control
...
@@ -48,6 +50,11 @@ QGCMovableItem {
...
@@ -48,6 +50,11 @@ QGCMovableItem {
width
:
size
width
:
size
height
:
size
height
:
size
Item
{
id
:
instrument
anchors.fill
:
parent
visible
:
false
//----------------------------------------------------
//----------------------------------------------------
//-- Artificial Horizon
//-- Artificial Horizon
QGCArtificialHorizon
{
QGCArtificialHorizon
{
...
@@ -99,13 +106,29 @@ QGCMovableItem {
...
@@ -99,13 +106,29 @@ QGCMovableItem {
width
:
size
*
0.75
width
:
size
*
0.75
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
}
}
//----------------------------------------------------
}
//-- Instrument Pannel
Image
{
Rectangle
{
id
:
pannel
id
:
mask
source
:
"
/qmlimages/attitudeInstrument.svg
"
anchors.fill
:
instrument
mipmap
:
true
radius
:
width
/
2
fillMode
:
Image
.
PreserveAspectFit
color
:
"
black
"
visible
:
false
}
OpacityMask
{
anchors.fill
:
instrument
source
:
instrument
maskSource
:
mask
}
Rectangle
{
id
:
borderRect
anchors.fill
:
parent
anchors.fill
:
parent
radius
:
width
/
2
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
border.color
:
"
black
"
border.width
:
2
}
}
}
}
src/FlightMap/Widgets/QGCCompassWidget.qml
View file @
cab1d265
...
@@ -28,25 +28,37 @@ This file is part of the QGROUNDCONTROL project
...
@@ -28,25 +28,37 @@ This file is part of the QGROUNDCONTROL project
*/
*/
import
QtQuick
2.4
import
QtQuick
2.4
import
QtGraphicalEffects
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCMovable
Item
{
Item
{
id
:
root
id
:
root
property
real
heading
:
_defaultHeading
property
bool
active
:
false
///< true: actively connected to data provider, false: show inactive control
property
real
heading
:
0
property
real
size
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
property
real
size
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
property
int
_fontSize
:
ScreenTools
.
defaultFontPixelSize
readonly
property
real
_defaultHeading
:
0
property
int
_fontSize
:
ScreenTools
.
defaultFontPixelSize
*
0.8
width
:
size
width
:
size
height
:
size
height
:
size
Rectangle
{
Rectangle
{
id
:
compassBack
id
:
borderRect
anchors.fill
:
parent
anchors.fill
:
parent
color
:
"
#212121
"
radius
:
width
/
2
color
:
"
#202020
"
border.color
:
"
black
"
border.width
:
2
}
}
Item
{
id
:
instrument
anchors.fill
:
parent
visible
:
false
Image
{
Image
{
id
:
pointer
id
:
pointer
source
:
"
/qmlimages/compassInstrumentAirplane.svg
"
source
:
"
/qmlimages/compassInstrumentAirplane.svg
"
...
@@ -60,6 +72,7 @@ QGCMovableItem {
...
@@ -60,6 +72,7 @@ QGCMovableItem {
angle
:
heading
angle
:
heading
}
}
}
}
Image
{
Image
{
id
:
compassDial
id
:
compassDial
source
:
"
/qmlimages/compassInstrumentDial.svg
"
source
:
"
/qmlimages/compassInstrumentDial.svg
"
...
@@ -67,20 +80,36 @@ QGCMovableItem {
...
@@ -67,20 +80,36 @@ QGCMovableItem {
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
anchors.fill
:
parent
}
}
Rectangle
{
Rectangle
{
anchors.centerIn
:
roo
t
anchors.centerIn
:
paren
t
width
:
size
*
0.35
width
:
size
*
0.35
height
:
size
*
0.2
height
:
size
*
0.2
border.color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.15
)
border.color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.15
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
QGCLabel
{
QGCLabel
{
text
:
_heading
.
toFixed
(
0
)
text
:
active
?
heading
.
toFixed
(
0
)
:
"
OFF
"
font.weight
:
Font
.
DemiBold
font.weight
:
active
?
Font
.
DemiBold
:
Font
.
Light
font.pixelSize
:
_fontSize
<
1
?
1
:
_fontSize
;
font.pixelSize
:
_fontSize
<
1
?
1
:
_fontSize
;
color
:
"
white
"
color
:
"
white
"
anchors.centerIn
:
parent
anchors.centerIn
:
parent
visible
:
active
}
}
}
}
}
Rectangle
{
id
:
mask
anchors.fill
:
instrument
radius
:
width
/
2
color
:
"
black
"
visible
:
false
}
OpacityMask
{
anchors.fill
:
instrument
source
:
instrument
maskSource
:
mask
}
}
}
src/FlightMap/Widgets/QGCPitchIndicator.qml
View file @
cab1d265
...
@@ -34,13 +34,14 @@ import QGroundControl.Controls 1.0
...
@@ -34,13 +34,14 @@ import QGroundControl.Controls 1.0
Rectangle
{
Rectangle
{
property
real
pitchAngle
:
0
property
real
pitchAngle
:
0
property
real
rollAngle
:
0
property
real
rollAngle
:
0
property
real
size
:
1
2
0
property
real
size
:
1
0
0
property
real
_reticleHeight
:
1
property
real
_reticleHeight
:
1
property
real
_reticleSpacing
:
size
*
0.15
property
real
_reticleSpacing
:
size
*
0.15
property
real
_reticleSlot
:
_reticleSpacing
+
_reticleHeight
property
real
_reticleSlot
:
_reticleSpacing
+
_reticleHeight
property
real
_longDash
:
size
*
0.40
property
real
_longDash
:
size
*
0.40
property
real
_shortDash
:
size
*
0.25
property
real
_shortDash
:
size
*
0.25
property
real
_fontSize
:
ScreenTools
.
defaultFontPixelSize
property
real
_fontSize
:
ScreenTools
.
defaultFontPixelSize
*
(
size
/
100
)
height
:
size
*
0.9
height
:
size
*
0.9
width
:
size
width
:
size
radius
:
ScreenTools
.
defaultFontPixelSize
*
(
0.66
)
radius
:
ScreenTools
.
defaultFontPixelSize
*
(
0.66
)
...
...
src/FlightMap/qmldir
View file @
cab1d265
...
@@ -13,12 +13,13 @@ QGCCompassHUD 1.0 QGCCompassHUD.qml
...
@@ -13,12 +13,13 @@ QGCCompassHUD 1.0 QGCCompassHUD.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCCurrentAltitude 1.0 QGCCurrentAltitude.qml
QGCCurrentAltitude 1.0 QGCCurrentAltitude.qml
QGCCurrentSpeed 1.0 QGCCurrentSpeed.qml
QGCCurrentSpeed 1.0 QGCCurrentSpeed.qml
QGCInstrumentWidget 1.0 QGCInstrumentWidget.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCSlider 1.0 QGCSlider.qml
QGCSlider 1.0 QGCSlider.qml
QGCSpeedWidget 1.0 QGCSpeedWidget.qml
QGCSpeedWidget 1.0 QGCSpeedWidget.qml
# Map items
# Map items
VehicleMapItem 1.0 VehicleMapItem.qml
MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemView 1.0 MissionItemView.qml
MissionItemView 1.0 MissionItemView.qml
MissionLineView 1.0 MissionLineView.qml
MissionLineView 1.0 MissionLineView.qml
VehicleMapItem 1.0 VehicleMapItem.qml
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