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
08bd8831
Commit
08bd8831
authored
Mar 05, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track flight map zoom level in global
parent
d12c5c0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+5
-1
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+7
-4
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
08bd8831
...
...
@@ -44,8 +44,12 @@ FlightMap {
property
bool
_activeVehicleCoordinateValid
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
coordinateValid
:
false
property
var
activeVehicleCoordinate
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
coordinate
:
QtPositioning
.
coordinate
()
Component.onCompleted
:
QGroundControl
.
flightMapPosition
=
center
Component.onCompleted
:
{
QGroundControl
.
flightMapPosition
=
center
QGroundControl
.
flightMapZoom
=
zoomLevel
}
onCenterChanged
:
QGroundControl
.
flightMapPosition
=
center
onZoomLevelChanged
:
QGroundControl
.
flightMapZoom
=
zoomLevel
onActiveVehicleCoordinateChanged
:
{
if
(
_followVehicle
&&
_activeVehicleCoordinateValid
&&
activeVehicleCoordinate
.
isValid
)
{
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
08bd8831
...
...
@@ -76,8 +76,9 @@ public:
Q_PROPERTY
(
Fact
*
offlineEditingFirmwareType
READ
offlineEditingFirmwareType
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
lastKnownHomePosition
READ
lastKnownHomePosition
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
flightMapPosition
MEMBER
_flightMapPosition
NOTIFY
flightMapPositionChanged
)
Q_PROPERTY
(
QGeoCoordinate
lastKnownHomePosition
READ
lastKnownHomePosition
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
flightMapPosition
MEMBER
_flightMapPosition
NOTIFY
flightMapPositionChanged
)
Q_PROPERTY
(
int
flightMapZoom
MEMBER
_flightMapZoom
NOTIFY
flightMapZoomChanged
)
/// @ return: true: experimental survey ip code is turned on
Q_PROPERTY
(
bool
experimentalSurvey
READ
experimentalSurvey
WRITE
setExperimentalSurvey
NOTIFY
experimentalSurveyChanged
)
...
...
@@ -152,6 +153,7 @@ signals:
void
isVersionCheckEnabledChanged
(
bool
enabled
);
void
mavlinkSystemIDChanged
(
int
id
);
void
flightMapPositionChanged
(
QGeoCoordinate
flightMapPosition
);
void
flightMapZoomChanged
(
int
flightMapZoom
);
void
experimentalSurveyChanged
(
bool
experimentalSurvey
);
private:
...
...
@@ -160,11 +162,12 @@ private:
LinkManager
*
_linkManager
;
MissionCommands
*
_missionCommands
;
MultiVehicleManager
*
_multiVehicleManager
;
QGCMapEngineManager
*
_mapEngineManager
;
QGCMapEngineManager
*
_mapEngineManager
;
bool
_virtualTabletJoystick
;
QGeoCoordinate
_flightMapPosition
;
QGeoCoordinate
_flightMapPosition
;
int
_flightMapZoom
;
SettingsFact
_offlineEditingFirmwareTypeFact
;
FactMetaData
_offlineEditingFirmwareTypeMetaData
;
...
...
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