diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2016-11-18 19:02:36 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2016-11-22 09:28:38 +0000 |
commit | 95f8804ecaed79792a57b1fe3580266bfbbf7590 (patch) | |
tree | 43c53b67a32deaf4635b13a544d480a241775fa0 /src/location/maps/qgeomap_p.h | |
parent | 81b42ba2508241cdeeecdbcdac6f1d22be922022 (diff) | |
download | qtlocation-95f8804ecaed79792a57b1fe3580266bfbbf7590.tar.gz |
Renaming QGeoMapPrivate::changeMapSize to changeViewportSize
The current name of this method generate confusion, as what it does
is changing the size of the final element in the application, and not
the actual map size.
This patch renames this method to changeDisplaySize
It also renames QGeoMap::setSize to setViewportSize,
as well as ::size to viewportSize , width to viewportWidth
and height to viewportHeight, to make everything consistent and
self-explanatory.
Finally it also renames minimumZoomAtMapSize to
minimumZoomAtViewportSize.
Change-Id: I7c1ca8bb3ca3d6f6b0fe6fc881b9300db7110527
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.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h index c45b1a0c..ea4806c0 100644 --- a/src/location/maps/qgeomap_p.h +++ b/src/location/maps/qgeomap_p.h @@ -70,10 +70,11 @@ class Q_LOCATION_EXPORT QGeoMap : public QObject public: virtual ~QGeoMap(); - void setSize(const QSize& size); - QSize size() const; - int width() const; - int height() const; + // Sets the display size + void setViewportSize(const QSize& viewportSize); + QSize viewportSize() const; + int viewportWidth() const; + int viewportHeight() const; QGeoCameraData cameraData() const; @@ -84,7 +85,7 @@ public: virtual QGeoCoordinate itemPositionToCoordinate(const QDoubleVector2D &pos, bool clipToViewport = true) const = 0; virtual QDoubleVector2D coordinateToItemPosition(const QGeoCoordinate &coordinate, bool clipToViewport = true) const = 0; - virtual double minimumZoomAtMapSize(int width, int height) const = 0; + virtual double minimumZoomAtViewportSize(int viewportWidth, int viewportHeight) const = 0; virtual double maximumCenterLatitudeAtZoom(double zoomLevel) const = 0; virtual QDoubleVector2D referenceCoordinateToItemPosition(const QGeoCoordinate &coordinate) const = 0; |