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.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.h')
-rw-r--r-- | src/location/maps/qgeomap_p.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h index e2af2eda..8f7642d4 100644 --- a/src/location/maps/qgeomap_p.h +++ b/src/location/maps/qgeomap_p.h @@ -70,10 +70,12 @@ class Q_LOCATION_EXPORT QGeoMap : public QObject public: virtual ~QGeoMap(); - void resize(int width, int height); + void setSize(const QSize& size); + QSize size() const; int width() const; int height() const; + QGeoCameraData cameraData() const; QGeoCameraCapabilities cameraCapabilities() const; @@ -92,12 +94,9 @@ protected: void setCameraData(const QGeoCameraData &cameraData); virtual QSGNode *updateSceneGraph(QSGNode *node, QQuickWindow *window) = 0; -public Q_SLOTS: - void update(); - Q_SIGNALS: void cameraDataChanged(const QGeoCameraData &cameraData); - void updateRequired(); + void sgNodeChanged(); void activeMapTypeChanged(); void copyrightsChanged(const QImage ©rightsImage); void copyrightsChanged(const QString ©rightsHtml); |