diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-02-04 20:18:46 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-03-03 15:23:14 +0000 |
commit | d21ed648f2958efaab9a041b2cd2607f4676be59 (patch) | |
tree | f0118c38f7f2d2c9ad628aa19a32e1f88b788796 | |
parent | 7af45b0a519e1000732bb1e5eb7cb2afd997646e (diff) |
QGeoMapScene renamed to QGeoTiledMapScenev5.7.0-alpha1
Since the class QGeoMapScene is tightly coupled to QGeoTiledMap, this
patch renames it into QGeoTiledMapScene/QGeoTiledMapScenePrivate, to
clarify the structure of the module and avoid confusion, as otherwise
it would not be clear that this class is exclusively used by QGeoTiledMap.
Change-Id: Ifd76b02ff14d0f0690dc37fcb0a93b0e0702d05d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/location/maps/maps.pri | 6 | ||||
-rw-r--r-- | src/location/maps/qgeotiledmap.cpp | 4 | ||||
-rw-r--r-- | src/location/maps/qgeotiledmap_p_p.h | 4 | ||||
-rw-r--r-- | src/location/maps/qgeotiledmapscene.cpp (renamed from src/location/maps/qgeomapscene.cpp) | 124 | ||||
-rw-r--r-- | src/location/maps/qgeotiledmapscene_p.h (renamed from src/location/maps/qgeomapscene_p.h) | 18 | ||||
-rw-r--r-- | tests/auto/auto.pro | 2 | ||||
-rw-r--r-- | tests/auto/qgeotiledmapscene/qgeotiledmapscene.pro (renamed from tests/auto/qgeomapscene/qgeomapscene.pro) | 4 | ||||
-rw-r--r-- | tests/auto/qgeotiledmapscene/tst_qgeotiledmapscene.cpp (renamed from tests/auto/qgeomapscene/tst_qgeomapscene.cpp) | 16 |
8 files changed, 89 insertions, 89 deletions
diff --git a/src/location/maps/maps.pri b/src/location/maps/maps.pri index 93af4f4d..69e6f62b 100644 --- a/src/location/maps/maps.pri +++ b/src/location/maps/maps.pri @@ -26,7 +26,7 @@ PRIVATE_HEADERS += \ maps/qgeocodingmanager_p.h \ maps/qgeomaneuver_p.h \ maps/qgeomapcontroller_p.h \ - maps/qgeomapscene_p.h \ + maps/qgeotiledmapscene_p.h \ maps/qgeotilerequestmanager_p.h \ maps/qgeomap_p.h \ maps/qgeomap_p_p.h \ @@ -66,7 +66,6 @@ SOURCES += \ maps/qgeocodingmanagerengine.cpp \ maps/qgeomaneuver.cpp \ maps/qgeomapcontroller.cpp \ - maps/qgeomapscene.cpp \ maps/qgeotilerequestmanager.cpp \ maps/qgeomap.cpp \ maps/qgeomappingmanager.cpp \ @@ -86,6 +85,7 @@ SOURCES += \ maps/qgeofiletilecache.cpp \ maps/qgeotiledmapreply.cpp \ maps/qgeotilespec.cpp \ - maps/qgeotiledmap.cpp + maps/qgeotiledmap.cpp \ + maps/qgeotiledmapscene.cpp diff --git a/src/location/maps/qgeotiledmap.cpp b/src/location/maps/qgeotiledmap.cpp index 6e9930f4..3705bfca 100644 --- a/src/location/maps/qgeotiledmap.cpp +++ b/src/location/maps/qgeotiledmap.cpp @@ -42,7 +42,7 @@ #include "qgeocameratiles_p.h" #include "qgeotilerequestmanager_p.h" -#include "qgeomapscene_p.h" +#include "qgeotiledmapscene_p.h" #include "qgeocameracapabilities_p.h" #include <cmath> @@ -180,7 +180,7 @@ QGeoTiledMapPrivate::QGeoTiledMapPrivate(QGeoTiledMappingManagerEngine *engine) m_cache(engine->tileCache()), m_visibleTiles(new QGeoCameraTiles()), m_prefetchTiles(new QGeoCameraTiles()), - m_mapScene(new QGeoMapScene()), + m_mapScene(new QGeoTiledMapScene()), m_tileRequests(0), m_maxZoomLevel(static_cast<int>(std::ceil(engine->cameraCapabilities().maximumZoomLevel()))), m_minZoomLevel(static_cast<int>(std::ceil(engine->cameraCapabilities().minimumZoomLevel()))), diff --git a/src/location/maps/qgeotiledmap_p_p.h b/src/location/maps/qgeotiledmap_p_p.h index 05ada7b9..6a7ceec9 100644 --- a/src/location/maps/qgeotiledmap_p_p.h +++ b/src/location/maps/qgeotiledmap_p_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE class QGeoCameraTiles; -class QGeoMapScene; +class QGeoTiledMapScene; class QAbstractGeoTileCache; class QGeoTiledMappingManagerEngine; class QGeoTiledMap; @@ -96,7 +96,7 @@ private: QAbstractGeoTileCache *m_cache; QGeoCameraTiles *m_visibleTiles; QGeoCameraTiles *m_prefetchTiles; - QGeoMapScene *m_mapScene; + QGeoTiledMapScene *m_mapScene; QGeoTileRequestManager *m_tileRequests; int m_maxZoomLevel; int m_minZoomLevel; diff --git a/src/location/maps/qgeomapscene.cpp b/src/location/maps/qgeotiledmapscene.cpp index 450be60b..57750f4d 100644 --- a/src/location/maps/qgeomapscene.cpp +++ b/src/location/maps/qgeotiledmapscene.cpp @@ -34,7 +34,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "qgeomapscene_p.h" +#include "qgeotiledmapscene_p.h" #include "qgeocameradata_p.h" #include "qabstractgeotilecache_p.h" #include "qgeotilespec_p.h" @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE -class QGeoMapScenePrivate : public QObjectPrivate +class QGeoTiledMapScenePrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QGeoMapScene) + Q_DECLARE_PUBLIC(QGeoTiledMapScene) public: - QGeoMapScenePrivate(); - ~QGeoMapScenePrivate(); + QGeoTiledMapScenePrivate(); + ~QGeoTiledMapScenePrivate(); QSize m_screenSize; // in pixels int m_tileSize; // the pixel resolution for each tile @@ -113,36 +113,36 @@ public: void setupCamera(); }; -QGeoMapScene::QGeoMapScene(QObject *parent) - : QObject(*new QGeoMapScenePrivate(),parent) +QGeoTiledMapScene::QGeoTiledMapScene(QObject *parent) + : QObject(*new QGeoTiledMapScenePrivate(),parent) { } -QGeoMapScene::~QGeoMapScene() +QGeoTiledMapScene::~QGeoTiledMapScene() { } -void QGeoMapScene::setUseVerticalLock(bool lock) +void QGeoTiledMapScene::setUseVerticalLock(bool lock) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->m_useVerticalLock = lock; } -void QGeoMapScene::setScreenSize(const QSize &size) +void QGeoTiledMapScene::setScreenSize(const QSize &size) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->m_screenSize = size; } -void QGeoMapScene::setTileSize(int tileSize) +void QGeoTiledMapScene::setTileSize(int tileSize) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->m_tileSize = tileSize; } -void QGeoMapScene::setCameraData(const QGeoCameraData &cameraData) +void QGeoTiledMapScene::setCameraData(const QGeoCameraData &cameraData) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->m_cameraData = cameraData; d->m_intZoomLevel = static_cast<int>(std::floor(d->m_cameraData.zoomLevel())); float delta = cameraData.zoomLevel() - d->m_intZoomLevel; @@ -150,45 +150,45 @@ void QGeoMapScene::setCameraData(const QGeoCameraData &cameraData) d->m_sideLength = 1 << d->m_intZoomLevel; } -void QGeoMapScene::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) +void QGeoTiledMapScene::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->setVisibleTiles(tiles); } -const QSet<QGeoTileSpec> &QGeoMapScene::visibleTiles() const +const QSet<QGeoTileSpec> &QGeoTiledMapScene::visibleTiles() const { - Q_D(const QGeoMapScene); + Q_D(const QGeoTiledMapScene); return d->m_visibleTiles; } -void QGeoMapScene::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture) +void QGeoTiledMapScene::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->addTile(spec, texture); } -QDoubleVector2D QGeoMapScene::itemPositionToMercator(const QDoubleVector2D &pos) const +QDoubleVector2D QGeoTiledMapScene::itemPositionToMercator(const QDoubleVector2D &pos) const { - Q_D(const QGeoMapScene); + Q_D(const QGeoTiledMapScene); return d->itemPositionToMercator(pos); } -QDoubleVector2D QGeoMapScene::mercatorToItemPosition(const QDoubleVector2D &mercator) const +QDoubleVector2D QGeoTiledMapScene::mercatorToItemPosition(const QDoubleVector2D &mercator) const { - Q_D(const QGeoMapScene); + Q_D(const QGeoTiledMapScene); return d->mercatorToItemPosition(mercator); } -bool QGeoMapScene::verticalLock() const +bool QGeoTiledMapScene::verticalLock() const { - Q_D(const QGeoMapScene); + Q_D(const QGeoTiledMapScene); return d->m_verticalLock; } -QSet<QGeoTileSpec> QGeoMapScene::texturedTiles() +QSet<QGeoTileSpec> QGeoTiledMapScene::texturedTiles() { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); QSet<QGeoTileSpec> textured; foreach (const QGeoTileSpec &tile, d->m_textures.keys()) { textured += tile; @@ -196,13 +196,13 @@ QSet<QGeoTileSpec> QGeoMapScene::texturedTiles() return textured; } -void QGeoMapScene::clearTexturedTiles() +void QGeoTiledMapScene::clearTexturedTiles() { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); d->m_textures.clear(); } -QGeoMapScenePrivate::QGeoMapScenePrivate() +QGeoTiledMapScenePrivate::QGeoTiledMapScenePrivate() : QObjectPrivate(), m_tileSize(0), m_scaleFactor(10.0), @@ -227,11 +227,11 @@ QGeoMapScenePrivate::QGeoMapScenePrivate() { } -QGeoMapScenePrivate::~QGeoMapScenePrivate() +QGeoTiledMapScenePrivate::~QGeoTiledMapScenePrivate() { } -QDoubleVector2D QGeoMapScenePrivate::itemPositionToMercator(const QDoubleVector2D &pos) const +QDoubleVector2D QGeoTiledMapScenePrivate::itemPositionToMercator(const QDoubleVector2D &pos) const { double x = m_mercatorWidth * (((pos.x() - m_screenOffsetX) / m_screenWidth) - 0.5); x += m_mercatorCenterX; @@ -250,7 +250,7 @@ QDoubleVector2D QGeoMapScenePrivate::itemPositionToMercator(const QDoubleVector2 return QDoubleVector2D(x, y); } -QDoubleVector2D QGeoMapScenePrivate::mercatorToItemPosition(const QDoubleVector2D &mercator) const +QDoubleVector2D QGeoTiledMapScenePrivate::mercatorToItemPosition(const QDoubleVector2D &mercator) const { double mx = m_sideLength * mercator.x(); @@ -292,7 +292,7 @@ QDoubleVector2D QGeoMapScenePrivate::mercatorToItemPosition(const QDoubleVector2 return QDoubleVector2D(x + m_screenOffsetX, y + m_screenOffsetY); } -bool QGeoMapScenePrivate::buildGeometry(const QGeoTileSpec &spec, QSGGeometry::TexturedPoint2D *vertices) +bool QGeoTiledMapScenePrivate::buildGeometry(const QGeoTileSpec &spec, QSGGeometry::TexturedPoint2D *vertices) { int x = spec.x(); @@ -329,7 +329,7 @@ bool QGeoMapScenePrivate::buildGeometry(const QGeoTileSpec &spec, QSGGeometry::T return true; } -void QGeoMapScenePrivate::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture) +void QGeoTiledMapScenePrivate::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture) { if (!m_visibleTiles.contains(spec)) // Don't add the geometry if it isn't visible return; @@ -337,7 +337,7 @@ void QGeoMapScenePrivate::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoT m_textures.insert(spec, texture); } -void QGeoMapScenePrivate::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) +void QGeoTiledMapScenePrivate::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) { // work out the tile bounds for the new scene setTileBounds(tiles); @@ -352,7 +352,7 @@ void QGeoMapScenePrivate::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) m_visibleTiles = tiles; } -void QGeoMapScenePrivate::removeTiles(const QSet<QGeoTileSpec> &oldTiles) +void QGeoTiledMapScenePrivate::removeTiles(const QSet<QGeoTileSpec> &oldTiles) { typedef QSet<QGeoTileSpec>::const_iterator iter; iter i = oldTiles.constBegin(); @@ -364,7 +364,7 @@ void QGeoMapScenePrivate::removeTiles(const QSet<QGeoTileSpec> &oldTiles) } } -void QGeoMapScenePrivate::setTileBounds(const QSet<QGeoTileSpec> &tiles) +void QGeoTiledMapScenePrivate::setTileBounds(const QSet<QGeoTileSpec> &tiles) { if (tiles.isEmpty()) { m_minTileX = -1; @@ -444,7 +444,7 @@ void QGeoMapScenePrivate::setTileBounds(const QSet<QGeoTileSpec> &tiles) } } -void QGeoMapScenePrivate::setupCamera() +void QGeoTiledMapScenePrivate::setupCamera() { double f = 1.0 * qMin(m_screenSize.width(), m_screenSize.height()); @@ -556,7 +556,7 @@ void QGeoMapScenePrivate::setupCamera() m_projectionMatrix.frustum(-halfWidth, halfWidth, -halfHeight, halfHeight, nearPlane, farPlane); } -class QGeoMapTileContainerNode : public QSGTransformNode +class QGeoTiledMapTileContainerNode : public QSGTransformNode { public: void addChild(const QGeoTileSpec &spec, QSGSimpleTextureNode *node) @@ -567,16 +567,16 @@ public: QHash<QGeoTileSpec, QSGSimpleTextureNode *> tiles; }; -class QGeoMapRootNode : public QSGClipNode +class QGeoTiledMapRootNode : public QSGClipNode { public: - QGeoMapRootNode() + QGeoTiledMapRootNode() : isTextureLinear(false) , geometry(QSGGeometry::defaultAttributes_Point2D(), 4) , root(new QSGTransformNode()) - , tiles(new QGeoMapTileContainerNode()) - , wrapLeft(new QGeoMapTileContainerNode()) - , wrapRight(new QGeoMapTileContainerNode()) + , tiles(new QGeoTiledMapTileContainerNode()) + , wrapLeft(new QGeoTiledMapTileContainerNode()) + , wrapRight(new QGeoTiledMapTileContainerNode()) { setIsRectangular(true); setGeometry(&geometry); @@ -586,7 +586,7 @@ public: appendChildNode(root); } - ~QGeoMapRootNode() + ~QGeoTiledMapRootNode() { qDeleteAll(textures); } @@ -601,7 +601,7 @@ public: } } - void updateTiles(QGeoMapTileContainerNode *root, QGeoMapScenePrivate *d, double camAdjust); + void updateTiles(QGeoTiledMapTileContainerNode *root, QGeoTiledMapScenePrivate *d, double camAdjust); bool isTextureLinear; @@ -610,14 +610,14 @@ public: QSGTransformNode *root; - QGeoMapTileContainerNode *tiles; // The majority of the tiles - QGeoMapTileContainerNode *wrapLeft; // When zoomed out, the tiles that wrap around on the left. - QGeoMapTileContainerNode *wrapRight; // When zoomed out, the tiles that wrap around on the right + QGeoTiledMapTileContainerNode *tiles; // The majority of the tiles + QGeoTiledMapTileContainerNode *wrapLeft; // When zoomed out, the tiles that wrap around on the left. + QGeoTiledMapTileContainerNode *wrapRight; // When zoomed out, the tiles that wrap around on the right QHash<QGeoTileSpec, QSGTexture *> textures; }; -static bool qgeomapscene_isTileInViewport(const QSGGeometry::TexturedPoint2D *tp, const QMatrix4x4 &matrix) { +static bool qgeotiledmapscene_isTileInViewport(const QSGGeometry::TexturedPoint2D *tp, const QMatrix4x4 &matrix) { QPolygonF polygon; polygon.reserve(4); for (int i=0; i<4; ++i) polygon << matrix * QPointF(tp[i].x, tp[i].y); @@ -629,8 +629,8 @@ static QVector3D toVector3D(const QDoubleVector3D& in) return QVector3D(in.x(), in.y(), in.z()); } -void QGeoMapRootNode::updateTiles(QGeoMapTileContainerNode *root, - QGeoMapScenePrivate *d, +void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root, + QGeoTiledMapScenePrivate *d, double camAdjust) { // Set up the matrix... @@ -653,7 +653,7 @@ void QGeoMapRootNode::updateTiles(QGeoMapTileContainerNode *root, it != root->tiles.end(); ) { QSGGeometry visualGeometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4); QSGGeometry::TexturedPoint2D *v = visualGeometry.vertexDataAsTexturedPoint2D(); - bool ok = d->buildGeometry(it.key(), v) && qgeomapscene_isTileInViewport(v, root->matrix()); + bool ok = d->buildGeometry(it.key(), v) && qgeotiledmapscene_isTileInViewport(v, root->matrix()); QSGSimpleTextureNode *node = it.value(); QSGNode::DirtyState dirtyBits = 0; @@ -692,7 +692,7 @@ void QGeoMapRootNode::updateTiles(QGeoMapTileContainerNode *root, Q_ASSERT(tileNode->geometry()->attributes() == QSGGeometry::defaultAttributes_TexturedPoint2D().attributes); Q_ASSERT(tileNode->geometry()->vertexCount() == 4); if (d->buildGeometry(s, tileNode->geometry()->vertexDataAsTexturedPoint2D()) - && qgeomapscene_isTileInViewport(tileNode->geometry()->vertexDataAsTexturedPoint2D(), root->matrix())) { + && qgeotiledmapscene_isTileInViewport(tileNode->geometry()->vertexDataAsTexturedPoint2D(), root->matrix())) { tileNode->setFiltering(d->m_linearScaling ? QSGTexture::Linear : QSGTexture::Nearest); root->addChild(s, tileNode); } else { @@ -701,9 +701,9 @@ void QGeoMapRootNode::updateTiles(QGeoMapTileContainerNode *root, } } -QSGNode *QGeoMapScene::updateSceneGraph(QSGNode *oldNode, QQuickWindow *window) +QSGNode *QGeoTiledMapScene::updateSceneGraph(QSGNode *oldNode, QQuickWindow *window) { - Q_D(QGeoMapScene); + Q_D(QGeoTiledMapScene); float w = d->m_screenSize.width(); float h = d->m_screenSize.height(); if (w <= 0 || h <= 0) { @@ -711,9 +711,9 @@ QSGNode *QGeoMapScene::updateSceneGraph(QSGNode *oldNode, QQuickWindow *window) return 0; } - QGeoMapRootNode *mapRoot = static_cast<QGeoMapRootNode *>(oldNode); + QGeoTiledMapRootNode *mapRoot = static_cast<QGeoTiledMapRootNode *>(oldNode); if (!mapRoot) - mapRoot = new QGeoMapRootNode(); + mapRoot = new QGeoTiledMapRootNode(); mapRoot->setClipRect(QRect(d->m_screenOffsetX, d->m_screenOffsetY, d->m_screenWidth, d->m_screenHeight)); diff --git a/src/location/maps/qgeomapscene_p.h b/src/location/maps/qgeotiledmapscene_p.h index c38612bc..1e3a9bc7 100644 --- a/src/location/maps/qgeomapscene_p.h +++ b/src/location/maps/qgeotiledmapscene_p.h @@ -33,8 +33,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef QGEOMAPSCENE_P_H -#define QGEOMAPSCENE_P_H +#ifndef QGEOTILEDMAPSCENE_P_H +#define QGEOTILEDMAPSCENE_P_H // // W A R N I N G @@ -58,15 +58,15 @@ class QDoubleVector2D; class QGeoTileTexture; class QSGNode; class QQuickWindow; -class QGeoMapScenePrivate; +class QGeoTiledMapScenePrivate; -class Q_LOCATION_EXPORT QGeoMapScene : public QObject +class Q_LOCATION_EXPORT QGeoTiledMapScene : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QGeoMapScene) + Q_DECLARE_PRIVATE(QGeoTiledMapScene) public: - explicit QGeoMapScene(QObject *parent = 0); - virtual ~QGeoMapScene(); + explicit QGeoTiledMapScene(QObject *parent = 0); + virtual ~QGeoTiledMapScene(); void setScreenSize(const QSize &size); void setTileSize(int tileSize); @@ -93,9 +93,9 @@ Q_SIGNALS: void newTilesVisible(const QSet<QGeoTileSpec> &newTiles); private: - Q_DISABLE_COPY(QGeoMapScene) + Q_DISABLE_COPY(QGeoTiledMapScene) }; QT_END_NAMESPACE -#endif // QGEOMAPSCENE_P_H +#endif // QGEOTILEDMAPSCENE_P_H diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 86abefd6..81013b2c 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -42,7 +42,7 @@ qtHaveModule(location) { qgeocodereply \ qgeocodingmanager \ qgeomaneuver \ - qgeomapscene \ + qgeotiledmapscene \ qgeoroute \ qgeoroutereply \ qgeorouterequest \ diff --git a/tests/auto/qgeomapscene/qgeomapscene.pro b/tests/auto/qgeotiledmapscene/qgeotiledmapscene.pro index 66eb72ea..c3ec6e91 100644 --- a/tests/auto/qgeomapscene/qgeomapscene.pro +++ b/tests/auto/qgeotiledmapscene/qgeotiledmapscene.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qgeomapscene +TARGET = tst_qgeotiledmapscene INCLUDEPATH += ../../../src/location/maps -SOURCES += tst_qgeomapscene.cpp +SOURCES += tst_qgeotiledmapscene.cpp QT += location positioning-private testlib diff --git a/tests/auto/qgeomapscene/tst_qgeomapscene.cpp b/tests/auto/qgeotiledmapscene/tst_qgeotiledmapscene.cpp index c6943650..3d43ebd8 100644 --- a/tests/auto/qgeomapscene/tst_qgeomapscene.cpp +++ b/tests/auto/qgeotiledmapscene/tst_qgeotiledmapscene.cpp @@ -29,7 +29,7 @@ //TESTED_COMPONENT=src/location/maps #include "qgeotilespec_p.h" -#include "qgeomapscene_p.h" +#include "qgeotiledmapscene_p.h" #include "qgeocameratiles_p.h" #include "qgeocameradata_p.h" #include "qabstractgeotilecache_p.h" @@ -47,7 +47,7 @@ QT_USE_NAMESPACE -class tst_QGeoMapScene : public QObject +class tst_QGeoTiledMapScene : public QObject { Q_OBJECT @@ -281,7 +281,7 @@ class tst_QGeoMapScene : public QObject ct.setCameraData(camera); ct.setScreenSize(QSize(16,16)); - QGeoMapScene mapScene; + QGeoTiledMapScene mapScene; mapScene.setTileSize(16); mapScene.setScreenSize(QSize(16,16*32)); mapScene.setCameraData(camera); @@ -291,7 +291,7 @@ class tst_QGeoMapScene : public QObject QVERIFY(mapScene.verticalLock()); // Test the case when setting vertical lock has no effect - QGeoMapScene mapScene2; + QGeoTiledMapScene mapScene2; mapScene2.setTileSize(16); mapScene2.setScreenSize(QSize(16,16)); mapScene2.setCameraData(camera); @@ -322,7 +322,7 @@ class tst_QGeoMapScene : public QObject ct.setCameraData(camera); ct.setScreenSize(QSize(screenWidth,screenHeight)); - QGeoMapScene mapGeometry; + QGeoTiledMapScene mapGeometry; mapGeometry.setTileSize(tileSize); mapGeometry.setScreenSize(QSize(screenWidth,screenHeight)); mapGeometry.setCameraData(camera); @@ -361,7 +361,7 @@ class tst_QGeoMapScene : public QObject ct.setCameraData(camera); ct.setScreenSize(QSize(screenWidth,screenHeight)); - QGeoMapScene mapGeometry; + QGeoTiledMapScene mapGeometry; mapGeometry.setTileSize(tileSize); mapGeometry.setScreenSize(QSize(screenWidth,screenHeight)); mapGeometry.setCameraData(camera); @@ -380,5 +380,5 @@ class tst_QGeoMapScene : public QObject }; -QTEST_GUILESS_MAIN(tst_QGeoMapScene) -#include "tst_qgeomapscene.moc" +QTEST_GUILESS_MAIN(tst_QGeoTiledMapScene) +#include "tst_qgeotiledmapscene.moc" |