summaryrefslogtreecommitdiff
path: root/src/imports/location/qdeclarativecirclemapitem.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-11-18 19:02:36 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2016-11-22 09:28:38 +0000
commit95f8804ecaed79792a57b1fe3580266bfbbf7590 (patch)
tree43c53b67a32deaf4635b13a544d480a241775fa0 /src/imports/location/qdeclarativecirclemapitem.cpp
parent81b42ba2508241cdeeecdbcdac6f1d22be922022 (diff)
downloadqtlocation-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/imports/location/qdeclarativecirclemapitem.cpp')
-rw-r--r--src/imports/location/qdeclarativecirclemapitem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/location/qdeclarativecirclemapitem.cpp b/src/imports/location/qdeclarativecirclemapitem.cpp
index f6b3c14f..6890703b 100644
--- a/src/imports/location/qdeclarativecirclemapitem.cpp
+++ b/src/imports/location/qdeclarativecirclemapitem.cpp
@@ -144,7 +144,7 @@ void QGeoMapCircleGeometry::updateScreenPointsInvert(const QGeoMap &map)
if (!screenDirty_)
return;
- if (map.width() == 0 || map.height() == 0) {
+ if (map.viewportWidth() == 0 || map.viewportHeight() == 0) {
clear();
return;
}
@@ -176,7 +176,7 @@ void QGeoMapCircleGeometry::updateScreenPointsInvert(const QGeoMap &map)
geoDistance += 360.0;
double mapWidth = 360.0 / geoDistance;
- qreal leftOffset = origin.x() - (map.width()/2.0 - mapWidth/2.0) - firstPointOffset_.x();
+ qreal leftOffset = origin.x() - (map.viewportWidth()/2.0 - mapWidth/2.0) - firstPointOffset_.x();
qreal topOffset = origin.y() - (midPoint.y() - mapWidth/2.0) - firstPointOffset_.y();
QPainterPath ppiBorder;
ppiBorder.moveTo(QPointF(-leftOffset, -topOffset));
@@ -613,7 +613,7 @@ void QDeclarativeCircleMapItem::updateCirclePathForRendering(QList<QGeoCoordinat
if ( geoDistance < 0 )
geoDistance += 360;
qreal mapWidth = 360.0 / geoDistance;
- mapWidth = qMin(static_cast<int>(mapWidth), map()->width());
+ mapWidth = qMin(static_cast<int>(mapWidth), map()->viewportWidth());
QDoubleVector2D prev = map()->coordinateToItemPosition(path.at(0), false);
// find the points in path where wrapping occurs
for (int i = 1; i <= path.count(); ++i) {