Merge branch 'friendlist' into integration
[situare] / src / map / mapengine.h
index 963c1ab..f17a8ab 100644 (file)
@@ -204,11 +204,12 @@ private:
     int tileMaxValue(int zoomLevel);
 
     /**
-    * @brief Returns the current view rect including margins
+    * @brief Updates the current view rect including margins
     *
-    * @return Current view rect
+    * Calculates tiles rect in scene based on m_viewTilesGrid and
+    * calls MapScene::viewRectUpdated()
     */
-    QRect viewRect();
+    void updateViewTilesSceneRect();
 
 private slots:
     /**
@@ -225,7 +226,7 @@ private slots:
     *
     * Does run removeOutOfViewTiles
     */
-    void viewZoomInFinished();
+    void viewZoomFinished();
 
     /**
     * @brief Slot for zooming in
@@ -279,8 +280,9 @@ private:
     QPoint m_centerTile; ///< Current center tile
     OwnLocationItem *m_ownLocation; ///< Item to show own location
     QPoint m_sceneCoordinate; ///< Current center coordinate
-    QRect m_viewGrid; ///< Current grid of tiles in view (includes margin)
+    QRect m_viewTilesGrid; ///< Current grid of tiles in view (includes margin)
     QSize m_viewSize; ///< Current view size
+    bool m_zoomedIn; ///< Flag for checking if zoomed in when zoom is finished
     int m_zoomLevel; ///< Current zoom level
     QList<FriendLocationItem *> m_friendsLocations; ///< Location of friends
 };