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
139157ff
Commit
139157ff
authored
Mar 01, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New waypoint coordinate indicators
parent
43bd6a7c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
47 deletions
+100
-47
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+6
-4
FlightMap.qml
src/FlightMap/FlightMap.qml
+2
-2
MissionItemIndicator.qml
src/FlightMap/MapItems/MissionItemIndicator.qml
+2
-2
FWLandingPatternMapVisual.qml
src/MissionEditor/FWLandingPatternMapVisual.qml
+11
-6
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+10
-7
SurveyComplexItem.qml
src/MissionEditor/SurveyComplexItem.qml
+12
-6
MissionItemIndexLabel.qml
src/QmlControls/MissionItemIndexLabel.qml
+57
-20
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
139157ff
...
...
@@ -233,7 +233,8 @@ FlightMap {
// GeoFence breach return point
MapQuickItem
{
anchorPoint
:
Qt
.
point
(
sourceItem
.
width
/
2
,
sourceItem
.
height
/
2
)
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
coordinate
:
geoFenceController
.
breachReturnPoint
visible
:
geoFenceController
.
breachReturnEnabled
sourceItem
:
MissionItemIndexLabel
{
label
:
"
F
"
}
...
...
@@ -246,7 +247,8 @@ FlightMap {
delegate
:
MapQuickItem
{
id
:
itemIndicator
anchorPoint
:
Qt
.
point
(
sourceItem
.
width
/
2
,
sourceItem
.
height
/
2
)
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
coordinate
:
object
.
coordinate
z
:
QGroundControl
.
zOrderMapItems
...
...
@@ -262,8 +264,8 @@ FlightMap {
coordinate
:
_gotoHereCoordinate
visible
:
_activeVehicle
&&
_activeVehicle
.
guidedMode
&&
_gotoHereCoordinate
.
isValid
z
:
QGroundControl
.
zOrderMapItems
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
sourceItem
:
MissionItemIndexLabel
{
checked
:
true
...
...
src/FlightMap/FlightMap.qml
View file @
139157ff
...
...
@@ -129,8 +129,8 @@ Map {
/// Ground Station location
MapQuickItem
{
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
visible
:
mainWindow
.
gcsPosition
.
isValid
coordinate
:
mainWindow
.
gcsPosition
sourceItem
:
MissionItemIndexLabel
{
...
...
src/FlightMap/MapItems/MissionItemIndicator.qml
View file @
139157ff
...
...
@@ -24,8 +24,8 @@ MapQuickItem {
signal
clicked
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
sourceItem
:
MissionItemIndexLabel
{
...
...
src/MissionEditor/FWLandingPatternMapVisual.qml
View file @
139157ff
...
...
@@ -214,14 +214,17 @@ Item {
id
:
loiterPointComponent
MapQuickItem
{
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
z
:
QGroundControl
.
zOrderMapItems
coordinate
:
_missionItem
.
loiterCoordinate
sourceItem
:
MissionItemIndexLabel
{
label
:
"
L
"
label
:
"
Loiter
"
checked
:
_missionItem
.
isCurrentItem
onClicked
:
setCurrentItem
(
_missionItem
.
sequenceNumber
)
}
}
}
...
...
@@ -245,15 +248,17 @@ Item {
id
:
landPointComponent
MapQuickItem
{
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
z
:
QGroundControl
.
zOrderMapItems
coordinate
:
_missionItem
.
landingCoordinate
sourceItem
:
MissionItemIndexLabel
{
label
:
"
L
"
label
:
"
L
and
"
checked
:
_missionItem
.
isCurrentItem
onClicked
:
setCurrentItem
(
_missionItem
.
sequenceNumber
)
}
}
}
...
...
src/MissionEditor/MissionEditor.qml
View file @
139157ff
...
...
@@ -400,8 +400,8 @@ QGCView {
id
:
itemDragger
x
:
mapCoordinateIndicator
?
(
mapCoordinateIndicator
.
x
+
mapCoordinateIndicator
.
anchorPoint
.
x
-
(
itemDragger
.
width
/
2
))
:
100
y
:
mapCoordinateIndicator
?
(
mapCoordinateIndicator
.
y
+
mapCoordinateIndicator
.
anchorPoint
.
y
-
(
itemDragger
.
height
/
2
))
:
100
width
:
ScreenTools
.
defaultFontPixelHeight
*
2
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
height
:
ScreenTools
.
defaultFontPixelHeight
*
3
color
:
"
transparent
"
visible
:
false
z
:
QGroundControl
.
zOrderMapItems
+
1
// Above item icons
...
...
@@ -501,9 +501,10 @@ QGCView {
model
:
object
.
isSimpleItem
?
object
.
childItems
:
0
delegate
:
MissionItemIndexLabel
{
label
:
object
.
abbreviation
checked
:
object
.
isCurrentItem
z
:
2
label
:
object
.
abbreviation
checked
:
object
.
isCurrentItem
z
:
2
specifiesCoordinate
:
false
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
}
...
...
@@ -686,7 +687,8 @@ QGCView {
// GeoFence breach return point
MapQuickItem
{
anchorPoint
:
Qt
.
point
(
sourceItem
.
width
/
2
,
sourceItem
.
height
/
2
)
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
coordinate
:
geoFenceController
.
breachReturnPoint
visible
:
geoFenceController
.
breachReturnEnabled
sourceItem
:
MissionItemIndexLabel
{
label
:
"
F
"
}
...
...
@@ -727,7 +729,8 @@ QGCView {
delegate
:
MapQuickItem
{
id
:
itemIndicator
anchorPoint
:
Qt
.
point
(
sourceItem
.
width
/
2
,
sourceItem
.
height
/
2
)
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
coordinate
:
object
.
coordinate
z
:
QGroundControl
.
zOrderMapItems
...
...
src/MissionEditor/SurveyComplexItem.qml
View file @
139157ff
...
...
@@ -72,14 +72,17 @@ Item {
id
:
entryPointComponent
MapQuickItem
{
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
z
:
QGroundControl
.
zOrderMapItems
coordinate
:
_missionItem
.
coordinate
sourceItem
:
MissionItemIndexLabel
{
label
:
"
S
"
label
:
"
Entry
"
checked
:
_missionItem
.
isCurrentItem
onClicked
:
setCurrentItem
(
_missionItem
.
sequenceNumber
)
}
}
}
...
...
@@ -89,14 +92,17 @@ Item {
id
:
exitPointComponent
MapQuickItem
{
anchorPoint.x
:
sourceItem
.
width
/
2
anchorPoint.y
:
sourceItem
.
height
/
2
anchorPoint.x
:
sourceItem
.
anchorPointX
anchorPoint.y
:
sourceItem
.
anchorPointY
z
:
QGroundControl
.
zOrderMapItems
coordinate
:
_missionItem
.
exitCoordinate
sourceItem
:
MissionItemIndexLabel
{
label
:
"
S
"
label
:
"
Exit
"
checked
:
_missionItem
.
isCurrentItem
onClicked
:
setCurrentItem
(
_missionItem
.
sequenceNumber
)
}
}
}
...
...
src/QmlControls/MissionItemIndexLabel.qml
View file @
139157ff
...
...
@@ -5,38 +5,75 @@ import QtQuick.Controls.Styles 1.2
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
id
:
root
property
alias
label
:
_label
.
text
property
bool
checked
:
false
property
bool
small
:
false
Canvas
{
id
:
root
width
:
_width
+
(
_singleChar
?
0
:
_label
.
width
)
height
:
specifiesCoordinate
?
(
_width
*
1.5
)
:
_width
signal
clicked
width
:
_width
height
:
_width
radius
:
_width
/
2
border.width
:
small
?
1
:
2
border.color
:
"
white
"
color
:
checked
?
"
green
"
:
qgcPal
.
mapButtonHighlight
property
alias
label
:
_label
.
text
property
bool
checked
:
false
property
bool
small
:
false
property
var
color
:
checked
?
"
green
"
:
qgcPal
.
mapButtonHighlight
property
real
anchorPointX
:
_width
/
2
property
real
anchorPointY
:
_width
*
1.5
property
bool
specifiesCoordinate
:
true
property
real
_width
:
small
?
ScreenTools
.
defaultFontPixelHeight
*
ScreenTools
.
smallFontPointRatio
*
1.25
:
ScreenTools
.
defaultFontPixelHeight
*
1.25
property
bool
_singleChar
:
_label
.
text
.
length
<=
1
property
real
_width
:
small
?
ScreenTools
.
defaultFontPixelHeight
*
ScreenTools
.
smallFontPointRatio
*
1.75
:
ScreenTools
.
defaultFontPixelHeight
*
1.75
onColorChanged
:
requestPaint
()
QGCPalette
{
id
:
qgcPal
}
function
paintSingleCoordinate
(
context
)
{
context
.
arc
(
_width
/
2
,
_width
/
2
,
_width
/
2
,
(
Math
.
PI
/
8
)
*
7
,
Math
.
PI
/
8
);
context
.
lineTo
(
_width
/
2
,
_width
*
1.5
)
}
function
paintSingleNoCoordinate
(
context
)
{
context
.
arc
(
_width
/
2
,
_width
/
2
,
_width
/
2
,
Math
.
PI
*
2
,
0
);
}
function
paintMultipleCoordinate
(
context
)
{
context
.
arc
(
_width
/
2
,
_width
/
2
,
_width
/
2
,
(
Math
.
PI
/
8
)
*
7
,
(
Math
.
PI
/
2
)
*
3
);
context
.
lineTo
(
_label
.
width
,
0
)
context
.
arc
(
_label
.
width
,
_width
/
2
,
_width
/
2
,
(
Math
.
PI
/
2
)
*
3
,
Math
.
PI
/
2
);
context
.
lineTo
((
_width
/
4
)
*
3
,
_width
)
context
.
lineTo
(
_width
/
2
,
_width
*
1.5
)
}
onPaint
:
{
var
context
=
getContext
(
"
2d
"
)
context
.
reset
()
context
.
beginPath
()
if
(
_singleChar
)
{
if
(
specifiesCoordinate
)
{
paintSingleCoordinate
(
context
)
}
else
{
paintSingleNoCoordinate
(
context
)
}
}
else
{
paintMultipleCoordinate
(
context
)
}
context
.
closePath
()
context
.
fillStyle
=
color
context
.
fill
()
}
QGCLabel
{
id
:
_label
anchors.fill
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
color
:
"
white
"
font.pointSize
:
small
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
defaultFontPointSize
id
:
_label
x
:
Math
.
round
((
_width
/
2
)
-
(
_singleChar
?
(
width
/
2
)
:
(
ScreenTools
.
defaultFontPixelWidth
/
2
)))
y
:
Math
.
round
((
_width
/
2
)
-
(
height
/
2
))
color
:
"
white
"
font.pointSize
:
small
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
defaultFontPointSize
onWidthChanged
:
requestPaint
()
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
parent
.
clicked
()
}
}
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