Merge branch 'map' of https://vcs.maemo.org/git/situare into map
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Mon, 12 Apr 2010 07:41:17 +0000 (10:41 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Mon, 12 Apr 2010 07:41:17 +0000 (10:41 +0300)
Conflicts:
src/map/mapengine.cpp

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

@@@ -174,8 -174,22 +174,30 @@@ void MapEngine::calculateTileGrid(
      }
  }
  
 +void MapEngine::viewResized(const QSize &size)
 +{
 +    m_viewSize = size;
 +    setLocation(m_sceneCoordinate);
 +}
++
+ void MapEngine::zoomIn()
+ {
+     if (m_zoomLevel >= MAX_ZOOM_LEVEL)
+         return;
+     m_zoomLevel++;
+     emit zoomLevelChanged(m_zoomLevel);
+     /// @todo START FETCHING TILES
++    calculateTileGrid();
+ }
+ void MapEngine::zoomOut()
+ {
+     if (m_zoomLevel <= MIN_ZOOM_LEVEL)
+         return;
+     m_zoomLevel--;
+     emit zoomLevelChanged(m_zoomLevel);
+     /// @todo START FETCHING TILES
++    calculateTileGrid();
+ }
@@@ -172,8 -162,26 +171,20 @@@ private slots
      */
      void mapImageReceived(const QUrl &url, const QPixmap &pixmap);
  
 -    /**
 -    * @brief Slot for setting current view location
 -    *
 -    * Emits locationChanged signal.
 -    * @param sceneCoordinate Scene coordinates for new position
 -    */
 -    void setLocation(QPointF sceneCoordinate);
 +    void viewResized(const QSize &size);
  
+     /**
+     * @brief Slot for zooming in
+     *
+     */
+     void zoomIn();
+     /**
+     * @brief Slot for zooming out
+     *
+     */
+     void zoomOut();
  signals:
      /**
      * @brief Signal for view location change
@@@ -41,16 -41,22 +41,27 @@@ public
      MapView(QWidget *parent = 0);
  
  signals:
+     /**
+     * @brief Signal for view scroll events
+     *
+     * Signal is emitted when view scroll is requested with mouse (or finger).
+     * @param sceneCoordinate Scene coordinates of the new requested center point of the view
+     */
      void viewScrolled(QPointF sceneCoordinate);
  
 +    void viewResized(const QSize &size);
 +
  public slots:
+     /**
+     * @brief Slot for centering view to new location
+     *
+     * @param sceneCoordinate Scene coordinates of the new center point
+     */
      void centerToSceneCoordinates(QPointF sceneCoordinate);
  
 +protected:
 +    void resizeEvent(QResizeEvent *event);
 +
  private slots:
      /**
      * @brief Slot for mouse move events
Simple merge