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
e55c1444
Commit
e55c1444
authored
Sep 01, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
754a3ebb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
MapLineArrow.qml
src/MissionManager/MapLineArrow.qml
+71
-0
qmldir
src/QmlControls/QGroundControl/FlightMap/qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
e55c1444
...
...
@@ -185,6 +185,7 @@
<file alias="QGroundControl/FlightMap/FlightMap.qml">src/FlightMap/FlightMap.qml</file>
<file alias="QGroundControl/FlightMap/InstrumentSwipeView.qml">src/FlightMap/Widgets/InstrumentSwipeView.qml</file>
<file alias="QGroundControl/FlightMap/MapFitFunctions.qml">src/FlightMap/Widgets/MapFitFunctions.qml</file>
<file alias="QGroundControl/FlightMap/MapLineArrow.qml">src/MissionManager/MapLineArrow.qml</file>
<file alias="QGroundControl/FlightMap/MapScale.qml">src/FlightMap/MapScale.qml</file>
<file alias="QGroundControl/FlightMap/MissionItemIndicator.qml">src/FlightMap/MapItems/MissionItemIndicator.qml</file>
<file alias="QGroundControl/FlightMap/MissionItemIndicatorDrag.qml">src/FlightMap/MapItems/MissionItemIndicatorDrag.qml</file>
...
...
src/MissionManager/MapLineArrow.qml
0 → 100644
View file @
e55c1444
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtLocation
5.3
import
QtPositioning
5.3
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightMap
1.0
MapQuickItem
{
property
color
arrowColor
:
"
white
"
property
var
fromCoord
:
QtPositioning
.
coordinate
()
property
var
toCoord
:
QtPositioning
.
coordinate
()
property
bool
exitPosition
:
false
property
var
_map
:
parent
property
real
_arrowSize
:
20
property
real
_arrowHeading
:
0
function
_updateArrowDetails
()
{
if
(
fromCoord
&&
fromCoord
.
isValid
&&
toCoord
&&
toCoord
.
isValid
)
{
_arrowHeading
=
fromCoord
.
azimuthTo
(
toCoord
)
var
lineDistanceQuarter
=
fromCoord
.
distanceTo
(
toCoord
)
/
4
coordinate
=
fromCoord
.
atDistanceAndAzimuth
(
lineDistanceQuarter
*
(
exitPosition
?
3
:
1
),
_arrowHeading
)
}
else
{
coordinate
=
QtPositioning
.
coordinate
()
_arrowHeading
=
0
}
}
onFromCoordChanged
:
_updateArrowDetails
()
onToCoordChanged
:
_updateArrowDetails
()
sourceItem
:
Canvas
{
x
:
-
_arrowSize
y
:
0
width
:
_arrowSize
*
2
height
:
_arrowSize
onPaint
:
{
var
ctx
=
getContext
(
"
2d
"
);
ctx
.
lineWidth
=
2
ctx
.
strokeStyle
=
arrowColor
ctx
.
beginPath
();
ctx
.
moveTo
(
_arrowSize
,
0
);
ctx
.
lineTo
(
_arrowSize
*
2
,
_arrowSize
)
ctx
.
stroke
();
ctx
.
beginPath
();
ctx
.
moveTo
(
_arrowSize
,
0
);
ctx
.
lineTo
(
0
,
_arrowSize
)
ctx
.
stroke
();
}
transform
:
Rotation
{
origin.x
:
width
/
2
origin.y
:
0
angle
:
_arrowHeading
}
}
}
src/QmlControls/QGroundControl/FlightMap/qmldir
View file @
e55c1444
...
...
@@ -10,6 +10,7 @@ CenterMapDropPanel 1.0 CenterMapDropPanel.qml
CompassRing 1.0 CompassRing.qml
InstrumentSwipeView 1.0 InstrumentSwipeView.qml
MapFitFunctions 1.0 MapFitFunctions.qml
MapLineArrow 1.0 MapLineArrow.qml
MapScale 1.0 MapScale.qml
QGCArtificialHorizon 1.0 QGCArtificialHorizon.qml
QGCAttitudeHUD 1.0 QGCAttitudeHUD.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