diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-06-30 13:22:04 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-06-30 13:18:01 +0000 |
commit | 7505c7ef734245bef4094fe627290a8836a6e3f8 (patch) | |
tree | ee9f2e600d034a469c48cad1cc4bdddec1897df0 /src/location/maps/qgeotiledmap.cpp | |
parent | 706f97d93b7e0e01bc287d9379e692ffd1bd08a6 (diff) | |
download | qtlocation-7505c7ef734245bef4094fe627290a8836a6e3f8.tar.gz |
Refactor: rename improperly named methods
After consultation, it seems that Qt favors using "At" rather than
"For" in naming a method such as "maximumLatitudeForZoom".
Moreover, this methods returns the maximum latitude that map center can
have at a specific zoom level, so it is important to make that clear
not only in the comments but also in the method's name.
Change-Id: I26f0d18f8ca94b1bdd085cd49dd603d51a68689b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/maps/qgeotiledmap.cpp')
-rw-r--r-- | src/location/maps/qgeotiledmap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/location/maps/qgeotiledmap.cpp b/src/location/maps/qgeotiledmap.cpp index 99af8ab5..ac02afa8 100644 --- a/src/location/maps/qgeotiledmap.cpp +++ b/src/location/maps/qgeotiledmap.cpp @@ -164,7 +164,7 @@ QDoubleVector2D QGeoTiledMap::coordinateToItemPosition(const QGeoCoordinate &coo // This method returns the minimum zoom level that this specific qgeomap type allows // at a given canvas size (width,height) and for a given tile size (usually 256). -double QGeoTiledMap::minimumZoomForMapSize(int width, int height) const +double QGeoTiledMap::minimumZoomAtMapSize(int width, int height) const { Q_D(const QGeoTiledMap); double maxSize = qMax(width,height); @@ -178,7 +178,7 @@ double QGeoTiledMap::minimumZoomForMapSize(int width, int height) const // the amount of pixels between the center and the borders changes // 2) when the zoom level changes, because the amount of pixels between the center // and the borders stays the same, but the meters per pixel change -double QGeoTiledMap::maximumLatitudeForZoom(double zoomLevel) const +double QGeoTiledMap::maximumCenterLatitudeAtZoom(double zoomLevel) const { Q_D(const QGeoTiledMap); double mapEdgeSize = std::pow(2.0,zoomLevel); |