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
789493b7
Unverified
Commit
789493b7
authored
Sep 01, 2019
by
Don Gagne
Committed by
GitHub
Sep 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7746 from DonLakeFlyer/SurveyVisuals
Simplify Survey visuals
parents
0f736124
114c300f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
13 deletions
+50
-13
SurveyMapVisual.qml
src/PlanView/SurveyMapVisual.qml
+50
-13
No files found.
src/PlanView/SurveyMapVisual.qml
View file @
789493b7
...
@@ -26,23 +26,35 @@ Item {
...
@@ -26,23 +26,35 @@ Item {
property
var
_missionItem
:
object
property
var
_missionItem
:
object
property
var
_mapPolygon
:
object
.
surveyAreaPolygon
property
var
_mapPolygon
:
object
.
surveyAreaPolygon
property
var
_visualTransectsComponent
property
bool
_currentItem
:
object
.
isCurrentItem
property
var
_transectPoints
:
_missionItem
.
visualTransectPoints
property
bool
_showPartialEntryExit
:
!
_currentItem
&&
_missionItem
.
turnAroundDistance
.
rawValue
!=
0
&&
_transectPoints
.
length
>
1
property
var
_fullTransectsComponent
:
null
property
var
_entryTransectsComponent
:
null
property
var
_exitTransectsComponent
:
null
property
var
_entryCoordinate
property
var
_entryCoordinate
property
var
_exitCoordinate
property
var
_exitCoordinate
signal
clicked
(
int
sequenceNumber
)
signal
clicked
(
int
sequenceNumber
)
function
_addVisualElements
()
{
function
_addVisualElements
()
{
_visualTransectsComponent
=
visualTransectsComponent
.
createObject
(
map
)
_fullTransectsComponent
=
fullTransectsComponent
.
createObject
(
map
)
_entryTransectsComponent
=
entryTransectComponent
.
createObject
(
map
)
_exitTransectsComponent
=
exitTransectComponent
.
createObject
(
map
)
_entryCoordinate
=
entryPointComponent
.
createObject
(
map
)
_entryCoordinate
=
entryPointComponent
.
createObject
(
map
)
_exitCoordinate
=
exitPointComponent
.
createObject
(
map
)
_exitCoordinate
=
exitPointComponent
.
createObject
(
map
)
map
.
addMapItem
(
_visualTransectsComponent
)
map
.
addMapItem
(
_fullTransectsComponent
)
map
.
addMapItem
(
_entryTransectsComponent
)
map
.
addMapItem
(
_exitTransectsComponent
)
map
.
addMapItem
(
_entryCoordinate
)
map
.
addMapItem
(
_entryCoordinate
)
map
.
addMapItem
(
_exitCoordinate
)
map
.
addMapItem
(
_exitCoordinate
)
}
}
function
_destroyVisualElements
()
{
function
_destroyVisualElements
()
{
_visualTransectsComponent
.
destroy
()
_fullTransectsComponent
.
destroy
()
_entryTransectsComponent
.
destroy
()
_exitTransectsComponent
.
destroy
()
_entryCoordinate
.
destroy
()
_entryCoordinate
.
destroy
()
_exitCoordinate
.
destroy
()
_exitCoordinate
.
destroy
()
}
}
...
@@ -98,14 +110,39 @@ Item {
...
@@ -98,14 +110,39 @@ Item {
interiorOpacity
:
0.5
interiorOpacity
:
0.5
}
}
// Transect lines
// Full set of transects lines. Shown when item is selected.
Component
{
id
:
fullTransectsComponent
MapPolyline
{
line.color
:
"
white
"
line.width
:
2
path
:
_transectPoints
visible
:
_currentItem
}
}
// Entry and exit transect lines only. Used when item is not selected.
Component
{
Component
{
id
:
visualTransects
Component
id
:
entryTransect
Component
MapPolyline
{
MapPolyline
{
line.color
:
"
white
"
line.color
:
"
white
"
line.width
:
2
line.width
:
2
path
:
_missionItem
.
visualTransectPoints
path
:
_showPartialEntryExit
?
[
_transectPoints
[
0
],
_transectPoints
[
1
]
]
:
[]
visible
:
_showPartialEntryExit
}
}
Component
{
id
:
exitTransectComponent
MapPolyline
{
line.color
:
"
white
"
line.width
:
2
path
:
_showPartialEntryExit
?
[
_transectPoints
[
lastPointIndex
-
1
],
_transectPoints
[
lastPointIndex
]
]
:
[]
visible
:
_showPartialEntryExit
property
int
lastPointIndex
:
_transectPoints
.
length
-
1
}
}
}
}
...
...
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