diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-03-01 19:35:00 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-03-17 06:56:33 +0000 |
commit | e176f25daeb3d80af1fd701000fda065064227e1 (patch) | |
tree | 78c52d64b23eba8f5da1b9449edf70106350c942 /src/location/maps/qgeomap_p_p.h | |
parent | 3cf9f339f2a319d99e81feebb6f5f1e428eec51c (diff) | |
download | qtlocation-e176f25daeb3d80af1fd701000fda065064227e1.tar.gz |
Reduce setCameraData calls to minimum
Remove checks for cameraCapabilities during each
setCameraData call. This checks are already performed
on plugin initialization. Refactor QGeoMapPrivate
to reduce resize calls. Rename updateRequired to sgNodeChanged
to reflect real useage. Add setter setSize for QGeoMap.
Change-Id: If4e3501fa99a8a97cbc471990837b08c43b8e723
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/maps/qgeomap_p_p.h')
-rw-r--r-- | src/location/maps/qgeomap_p_p.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/location/maps/qgeomap_p_p.h b/src/location/maps/qgeomap_p_p.h index 3b996ecc..f09d55c2 100644 --- a/src/location/maps/qgeomap_p_p.h +++ b/src/location/maps/qgeomap_p_p.h @@ -50,6 +50,7 @@ #include "qgeocameradata_p.h" #include "qgeomaptype_p.h" #include <QtCore/private/qobject_p.h> +#include <QtCore/QSize> QT_BEGIN_NAMESPACE @@ -65,18 +66,13 @@ public: QGeoMapPrivate(QGeoMappingManagerEngine *engine); virtual ~QGeoMapPrivate(); - void setCameraData(const QGeoCameraData &cameraData); - void resize(int width, int height); - protected: - virtual void mapResized(int width, int height) = 0; + virtual void changeMapSize(const QSize &size) = 0; virtual void changeCameraData(const QGeoCameraData &oldCameraData) = 0; virtual void changeActiveMapType(const QGeoMapType mapType) = 0; protected: - int m_width; - int m_height; - double m_aspectRatio; + QSize m_size; QPointer<QGeoMappingManagerEngine> m_engine; QGeoMapController *m_controller; QGeoCameraData m_cameraData; |