Merge branch 'map' of https://vcs.maemo.org/git/situare into map
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Tue, 13 Apr 2010 12:42:16 +0000 (15:42 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Tue, 13 Apr 2010 12:42:16 +0000 (15:42 +0300)
Conflicts:
src/ui/mapviewscreen.cpp

1  2 
src/map/mapengine.cpp
src/map/mapengine.h
src/ui/mapviewscreen.cpp

@@@ -246,8 -187,11 +246,11 @@@ void MapEngine::zoomIn(
  
      m_zoomLevel++;
      emit zoomLevelChanged(m_zoomLevel);
+     setZValues();
      /// @todo START FETCHING TILES
 -    calculateTileGrid();
 +    calculateTileGrid(m_sceneCoordinate);
  }
  
  void MapEngine::zoomOut()
  
      m_zoomLevel--;
      emit zoomLevelChanged(m_zoomLevel);
+     setZValues();
      /// @todo START FETCHING TILES
 -    calculateTileGrid();
 +    calculateTileGrid(m_sceneCoordinate);
 +}
 +
 +void MapEngine::setZoomLevel(int zoomLevel)
 +{
 +    m_zoomLevel = zoomLevel;
 +}
 +
 +int MapEngine::getZoomLevel()
 +{
 +    return m_zoomLevel;
  }
+ void MapEngine::setZValues()
+ {
+     //qDebug() << __PRETTY_FUNCTION__ << "m_zoomLevel:" << m_zoomLevel;
+     QList<QGraphicsItem *> items = m_mapScene->items();
+     for (int i = 0; i < items.size(); ++i) {
+         MapTile *item = dynamic_cast<MapTile *>(items.at(i));
+         if (item)
+             item->setSceneLevel(m_zoomLevel);
+     }
+ }
Simple merge
@@@ -71,14 -68,4 +68,4 @@@ void MapViewScreen::searchMap(
      qDebug() << lat << "," << lon;
  
      mapEngine->setViewLocation(QPointF(lon, lat));
--}
- void MapViewScreen::zoomInMap()
- {
- }
- void MapViewScreen::zoomOutMap()
- {
-     //mapEngine->zoomLevelChanged();
- }
++}