Fixed (yet) another merge screw-up *sigh*
[situare] / src / map / maptile.h
index 3ae2f9b..097d827 100644 (file)
    USA.
 */
 
-/// \author Sami Rämö - sami.ramo (at) ixonos.com
-
 #ifndef MAPTILE_H
 #define MAPTILE_H
 
 #include <QGraphicsPixmapItem>
 #include <QPoint>
 
-/// \brief Map tile item
+/**
+* @brief Map tile item
+*
+* @author Sami Rämö - sami.ramo (at) ixonos.com
+*/
 class MapTile : public QGraphicsPixmapItem
 {
 public:
-    /// \brief Constructor
+    /**
+    * @brief Constructor
+    */
     MapTile();
 
-    /// \brief Getter for zoom level
-    ///
-    /// \return Zoom level
-    int zoomLevel();
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+    /**
+    * @brief Set drawing level of the tile based on current zoom level
+    *
+    * Drawing order of MapTiles, which has the zoom level higher than the current
+    * zoom level, is reversed and those MapTiles are mapped between lower level MapTiles.
+    * Example: If maximum zoom level is 18 and current view zoomlevel is 15, then
+    * the drawing order from top to bottom is 15, 16, 14, 17, 13, 18, 12, 11, 10, ...
+    * @param currentZoomLevel current zoom level
+    */
+    void setSceneLevel(int currentZoomLevel);
+
+    /**
+    * @brief Setter for tile number
+    *
+    * Does also set the position for the item in the MapScene coordinate system
+    * @param tileNumber Tile number
+    */
+    void setTileNumber(QPoint tileNumber);
 
-    /// \brief Setter for zoom level
-    ///
-    /// Does also set the position for the item in the MapScene coordinate system
-    /// \param zoomLevel Zoom level
-    void setZoomLevel(int zoomLevel);
+    /**
+    * @brief Setter for zoom level
+    *
+    * Does also set the zValue.
+    *
+    * @param tileZoomLevel Zoom level of the tile
+    * @param currentViewZoomLevel Current view zoom level
+    */
+    void setZoomLevel(int tileZoomLevel, int currentViewZoomLevel);
 
-    /// \brief Getter for tile number
-    ///
-    /// \return Tile number
+    /**
+    * @brief Getter for tile number
+    *
+    * @return Tile number
+    */
     QPoint tileNumber();
 
-    /// \brief Setter for tile number
-    ///
-    /// Does also set the position for the item in the MapScene coordinate system
-    /// \param tileNumber Tile number
-    void setTileNumber(QPoint tileNumber);
+    /**
+    * @brief Getter for zoom level
+    *
+    * @return Zoom level
+    */
+    int zoomLevel();
 
 private:
-    /// \brief Set position of the tile in the MapScene coordinate system
-    ///
-    /// Does set the position based on the m_zoomLevel and the m_TileNumber. Position is set to
-    /// (-1, -1) if there is something wrong with zoom level or tile numbers
+    /**
+    * @brief Set position of the tile in the MapScene coordinate system
+    *
+    * Does set the position based on the m_zoomLevel and the m_TileNumber. Position is set to
+    * (UNDEFINED, UNDEFINED) if there is something wrong with zoom level or tile numbers
+    */
     void setPosition();
 
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
 private:
-    int m_zoomLevel; ///< Zoom level
     QPoint m_tileNumber; ///< Tile number
+    int m_zoomLevel; ///< Zoom level
 };
 
 #endif // MAPTILE_H