DEPENDPATH += .
INCLUDEPATH += . \
../../../src/
-#DEFINES += QT_NO_DEBUG_OUTPUT
+# DEFINES += QT_NO_DEBUG_OUTPUT
# Input
SOURCES += testmapengine.cpp \
../../../src/map/mapengine.cpp \
../../../src/map/mapscene.cpp \
../../../src/map/maptile.cpp \
../../../src/map/mapview.cpp \
- ../../../src/map/mapfetcher.cpp
+ ../../../src/map/mapfetcher.cpp \
+ ../../../src/map/mapzoompanel.cpp \
+ ../../../src/map/mapbutton.cpp \
+ ../../../src/map/ownlocationitem.cpp
HEADERS += ../../../src/map/mapengine.h \
../../../src/map/mapscene.h \
../../../src/map/maptile.h \
../../../src/map/mapview.h \
../../../src/map/mapfetcher.h \
- ../../../src/common.h
+ ../../../src/common.h \
+ ../../../src/map/mapzoompanel.h \
+ ../../../src/map/mapbutton.h \
+ ../../../src/map/ownlocationitem.h
RESOURCES +=
-# use don't use OpenGL when building in scratchbox
-!maemo5 {
- QT += opengl
- message(OpenGL built in)
- message(Make sure you have OpenGL development headers installed)
- message(install headers with: sudo apt-get install libgl-dev libglu-dev)
-}
+DEFINES += QT_NO_DEBUG_OUTPUT
+
// Top-left corner x = 256, y = 512
// Bottom-right corner x + 255, y + 255
MapTile *mapTile = new MapTile();
- mapTile->setZoomLevel(18);
+ mapTile->setZoomLevel(18, 14);
mapTile->setTileNumber(QPoint(1, 2));
mapTile->setPixmap(QPixmap("maptile.png"));
- mapScene.addMapTile(mapTile);
+ mapScene.addTile(mapTile, "dymmyTestKey");
// Check around top-left and bottom-right corners
int x = 256;
// Zoom level is 16, so stretching is also tested
// Top-left corner x = 2048, y = 3072
// Bottom-right corner x + 1023, y + 1023
- mapTile->setZoomLevel(16);
+ mapTile->setZoomLevel(16, 14);
mapTile->setTileNumber(QPoint(2, 3));
// Check around top-left and bottom-right corners
../../../src/map/mapscene.cpp \
../../../src/map/maptile.cpp \
../../../src/map/mapengine.cpp \
- ../../../src/map/mapfetcher.cpp
+ ../../../src/map/mapfetcher.cpp \
+ ../../../src/map/mapzoompanel.cpp \
+ ../../../src/map/mapbutton.cpp \
+ ../../../src/map/ownlocationitem.cpp
HEADERS += ../../../src/map/mapscene.h \
../../../src/map/maptile.h \
../../../src/map/mapengine.h \
- ../../../src/map/mapfetcher.h
+ ../../../src/map/mapfetcher.h \
+ ../../../src/map/mapzoompanel.h \
+ ../../../src/map/mapbutton.h \
+ ../../../src/map/ownlocationitem.h
+
+DEFINES += QT_NO_DEBUG_OUTPUT
void TestMapTile::zoomLevel()
{
MapTile mapTile;
- mapTile.setZoomLevel(13);
+ mapTile.setZoomLevel(13, 14);
QVERIFY(mapTile.zoomLevel() == 13);
}
QFETCH(QPointF, result);
MapTile mapTile;
- mapTile.setZoomLevel(zoomLevel);
+ mapTile.setZoomLevel(zoomLevel, 14);
mapTile.setTileNumber(tileNumber);
QCOMPARE(mapTile.pos(), result);
}
QCOMPARE(mapTile.pos(), QPointF(-1, -1));
// both set
- mapTile.setZoomLevel(16);
+ mapTile.setZoomLevel(16, 14);
QCOMPARE(mapTile.pos(), QPointF(24576, 17408));
// only zoom level set
MapTile anotherMapTile;
- anotherMapTile.setZoomLevel(14);
+ anotherMapTile.setZoomLevel(14, 14);
QCOMPARE(anotherMapTile.pos(), QPointF(-1, -1));
}
QFETCH(qreal, result);
MapTile tile;
- tile.setZoomLevel(tileZoomLevel);
+ tile.setZoomLevel(tileZoomLevel, 14);
tile.setSceneLevel(viewZoomLevel);
QCOMPARE(tile.zValue(), result);
}
../../../src/map/maptile.cpp \
../../../src/map/mapfetcher.cpp \
../../../src/map/mapengine.cpp \
- ../../../src/map/mapscene.cpp
+ ../../../src/map/mapscene.cpp \
+ ../../../src/map/ownlocationitem.cpp \
+ ../../../src/map/mapzoompanel.cpp \
+ ../../../src/map/mapbutton.cpp
HEADERS += ../../../src/map/maptile.h \
../../../src/map/mapfetcher.h \
../../../src/map/mapengine.h \
- ../../../src/map/mapscene.h
+ ../../../src/map/mapscene.h \
+ ../../../src/map/ownlocationitem.h \
+ ../../../src/map/mapzoompanel.h \
+ ../../../src/map/mapbutton.h
+
+DEFINES += QT_NO_DEBUG_OUTPUT