Documentation
authorSami Rämö <sami.ramo@ixonos.com>
Thu, 10 Jun 2010 12:51:07 +0000 (15:51 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Thu, 10 Jun 2010 12:51:07 +0000 (15:51 +0300)
src/map/mapscene.h

index 98305c9..41144c3 100644 (file)
@@ -80,6 +80,11 @@ public:
     /**
     * @brief Remove tiles which are out of view bounds.
     *
+    * Does not remove tiles which are duplicated from current view to opposite side of
+    * the scene.
+    *
+    * @param tilesGrid Current tiles grid
+    * @param zoomLevel Current zoom level
     */
     void removeOutOfViewTiles(QRect tilesGrid, int zoomLevel);
 
@@ -124,10 +129,27 @@ public:
     */
     void setTilesDrawingLevels(int zoomLevel);
 
+    /**
+      * @brief Setter for m_viewTilesGrid
+      *
+      * @param grid Tile grid
+      */
     void setTilesGrid(QRect grid);
 
+    /**
+      * @brief Setter for m_zoomLevel
+      *
+      * @param zoomLevel Zoom level
+      */
     void setZoomLevel(int zoomLevel);
 
+    /**
+      * @brief Span items (others than MapTile) to opposite side of the scene
+      *
+      * @param zoomLevel Current zoom level
+      * @param sceneCoordinate Scene coordinates of the current center point
+      * @param viewSize Current size of the view
+      */
     void spanItems(int zoomLevel, QPoint sceneCoordinate, QSize viewSize);
 
     /**
@@ -156,6 +178,11 @@ private:
     void moveIntersectingItemsHorizontally(QRect from, int distance);
 
 private slots:
+    /**
+      * @brief Remove tiles from other than current zoom levels
+      *
+      * Does remove tiles only if all tiles in current m_viewTilesGrid are in the scene.
+      */
     void removeOtherLevelTiles();
 
     /**
@@ -168,12 +195,12 @@ private slots:
  * DATA MEMBERS
  ******************************************************************************/
 private:
-    bool m_isRemoveStackedTilesRunning; ///< Is singleshot timer already running
-    int m_zoomLevel;
+    bool m_isRemoveStackedTilesRunning;           ///< Is singleshot timer already running
+    int m_zoomLevel;                              ///< Current zoom level
     QHash<QString, MapTile *> m_mapTilesInScene;  ///< List of map tiles in map scene
-    QList<MapTile *> m_removeStackedTilesList; ///< "Queue" for stacked tiles removal requests
-    QRect m_tilesSceneRect; ///< Current viewable area
-    QRect m_viewTilesGrid;
+    QList<MapTile *> m_removeStackedTilesList;    ///< "Queue" for stacked tiles removal requests
+    QRect m_tilesSceneRect;                       ///< Current viewable area
+    QRect m_viewTilesGrid;                        ///< Current grid of tiles
 };
 
 #endif // MAPSCENE_H