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/plugins | |
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/plugins')
-rw-r--r-- | src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp index d83ad0f9..5179fff4 100644 --- a/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp +++ b/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp @@ -72,13 +72,13 @@ void QGeoTiledMapNokia::evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTile const QString copyrightsString = m_engine->evaluateCopyrightsText(activeMapType(), cameraData().zoomLevel(), visibleTiles); - if (width() > 0 && height() > 0 && ((copyrightsString.isNull() && m_copyrightsSlab.isNull()) || copyrightsString != m_lastCopyrightsString)) { + if (viewportWidth() > 0 && viewportHeight() > 0 && ((copyrightsString.isNull() && m_copyrightsSlab.isNull()) || copyrightsString != m_lastCopyrightsString)) { QFont font("Sans Serif"); font.setPixelSize(fontSize); font.setStyleHint(QFont::SansSerif); font.setWeight(QFont::Bold); - QRect textBounds = QFontMetrics(font).boundingRect(0, 0, width(), height(), Qt::AlignBottom | Qt::AlignLeft | Qt::TextWordWrap, copyrightsString); + QRect textBounds = QFontMetrics(font).boundingRect(0, 0, viewportWidth(), viewportHeight(), Qt::AlignBottom | Qt::AlignLeft | Qt::TextWordWrap, copyrightsString); m_copyrightsSlab = QImage(m_logo.width() + textBounds.width() + spaceToLogo + blurRate * 2, qMax(m_logo.height(), textBounds.height() + blurRate * 2), |