summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomap_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-10-11 13:36:06 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-01-25 13:25:38 +0000
commita66306d3d8eab810b769a536095dbfa2a0eb6ce2 (patch)
tree61843e32114732b10c238d25535c89c95911d0c1 /src/location/maps/qgeomap_p.h
parentbe13464a488ccc2837b0c178ff16086be341e570 (diff)
downloadqtlocation-a66306d3d8eab810b769a536095dbfa2a0eb6ce2.tar.gz
Add rotation and tilt controls to QDeclarativeGeoMap
QDeclarativeGeoMap currently does not provide any mean to set bearing and tilt into qgeocameradata. It has been not a problem since QGeoTiledMap and sons did not support it. External renderers however support it, so this patch adds QML api calls to control these parameters, and adapt the existing logic to take them into consideration in camera-related calls, as well as in the afterViewportChange handlers of the Map Items. This patch also sligthly modifies the QML api to make the handling of all the bounded camera property more homogeneous. Minimum and maximum zoom levels prior plugin initialization aren't -1 anymore, but are some valid lower and upper bounds for this property, that is 0 and 30. in this way all the 2 bounded properties (zoomLevel and tilt) behave the same, in that they can be freely set before plugin initialization, within reasonable predefined bounds, and, after that, they may be clamped depending on the actual plugin capabilities. Autotests for the QML part of the API included. Change-Id: I9d09e32698a7330388e465e8ea7523ee39577d34 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeomap_p.h')
-rw-r--r--src/location/maps/qgeomap_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h
index b5e51014..7f9fca8c 100644
--- a/src/location/maps/qgeomap_p.h
+++ b/src/location/maps/qgeomap_p.h
@@ -49,6 +49,7 @@
#include <QtLocation/private/qgeocameradata_p.h>
#include <QtLocation/private/qgeomaptype_p.h>
+#include <QtLocation/private/qgeocameracapabilities_p.h>
#include <QtCore/QObject>
#include <QtPositioning/private/qdoublevector2d_p.h>
#include <QtLocation/private/qgeoprojection_p.h>
@@ -58,7 +59,6 @@ QT_BEGIN_NAMESPACE
class QGeoMappingManagerEngine;
class QGeoMapPrivate;
class QGeoMapController;
-class QGeoCameraCapabilities;
class QGeoCoordinate;
class QSGNode;
class QQuickWindow;
@@ -87,7 +87,7 @@ public:
// returns the minimum zoom at the current viewport size
double minimumZoom() const;
- double maximumCenterLatitudeAtZoom(double zoomLevel) const;
+ double maximumCenterLatitudeAtZoom(const QGeoCameraData &cameraData) const;
// returns the size of the underlying map, at the current zoom level. Unrelated to width()/height()/size().
double mapWidth() const;