void MapScene::addTile(int tileZoomLevel, QPoint tileNumber, const QPixmap &image, int viewZoomLevel)
{
-// qWarning() << __PRETTY_FUNCTION__ << "x:" << tileNumber.x() << "y:" << tileNumber.y();
+ qDebug() << __PRETTY_FUNCTION__;
// tile might already be in the scene if expired tile was returned from the cache to be
// temporarily shown while downloading the fresh one.
m_mapTilesInScene.insert(hashKey, tile);
addItem(tile);
- qWarning() << __PRETTY_FUNCTION__ << "tiles:" << m_mapTilesInScene.count();
+ qDebug() << __PRETTY_FUNCTION__ << "tiles count:" << m_mapTilesInScene.count();
enqueueRemoveStackedTiles(tile);
removeOtherLevelTiles();
void MapScene::removeOtherLevelTiles()
{
-// qWarning() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
for (int x = m_viewTilesGrid.left(); x <= m_viewTilesGrid.right(); x++) {
for (int y = m_viewTilesGrid.top(); y <= m_viewTilesGrid.bottom(); y++) {
-// qWarning() << __PRETTY_FUNCTION__ << "x:" << x << "y:" << y;
if (!m_mapTilesInScene.contains(MapEngine::tilePath(m_zoomLevel, x, y)))
return;
}
}
-// qWarning() << __PRETTY_FUNCTION__ << "all current grid tiles are in the scene";
-
foreach(MapTile *tile, m_mapTilesInScene) {
if (tile->zoomLevel() != m_zoomLevel) {
removeTile(tile);
- qWarning() << __PRETTY_FUNCTION__ << "removed other level tile -------------";
+ qDebug() << __PRETTY_FUNCTION__ << "removed other level tile";
}
}
-
-// qWarning() << __PRETTY_FUNCTION__ << "items in scene:" << items().count();
}
void MapScene::removeOutOfViewTiles(QRect tilesGrid, int zoomLevel)
if (tile)
removeTile(tile);
}
-
-// qWarning() << __PRETTY_FUNCTION__ << "items in scene:" << items().count();
}
void MapScene::removeStackedTiles(MapTile *newTile)
}
}
}
-// qWarning() << __PRETTY_FUNCTION__ << "items in scene:" << items().count();
}
void MapScene::removeTile(MapTile *tile)
m_removeStackedTilesList.removeAll(tile);
delete tile;
- qWarning() << __PRETTY_FUNCTION__ << "tiles:" << m_mapTilesInScene.count();
+ qDebug() << __PRETTY_FUNCTION__ << "tiles count:" << m_mapTilesInScene.count();
}
void MapScene::setSceneVerticalOverlap(int viewHeight, int zoomLevel)