added base class for own and friend locations. added new class for
[situare] / src / map / mapcommon.h
index ca9eb82..fc06fce 100644 (file)
    USA.
 */
 
-#ifndef COMMON_H
-#define COMMON_H
+#ifndef MAPCOMMON_H
+#define MAPCOMMON_H
 
 #include <QtCore>
 
-static const int TILE_SIZE_X = 256; ///< Tile image size in x direction
-static const int TILE_SIZE_Y = 256; ///< Tile image size in y direction
+const int TILE_SIZE_X = 256; ///< Tile image size in x direction
+const int TILE_SIZE_Y = 256; ///< Tile image size in y direction
 
-static const int MIN_MAP_ZOOM_LEVEL = 0; ///< Minimum zoom level
-static const int MAX_MAP_ZOOM_LEVEL = 18; ///< Maximum zoom level
-static const int MIN_MAP_SCENE_NORMAL_LEVEL = MAX_MAP_ZOOM_LEVEL + 1;
+const int MIN_MAP_ZOOM_LEVEL = 0; ///< Minimum zoom level
+const int MAX_MAP_ZOOM_LEVEL = 18; ///< Maximum zoom level
+const int MIN_MAP_SCENE_NORMAL_LEVEL = MAX_MAP_ZOOM_LEVEL + 1;
 
-static const int ZOOM_FPS = 30; ///< FPS for the zoom effect
-static const qreal ZOOM_TIME = 0.25; ///< Length of the zoom effect (seconds)
+const int ZOOM_FPS = 30; ///< FPS for the zoom effect
+const qreal ZOOM_TIME = 250; ///< Length of the zoom effect (ms)
 
-static const qreal MAX_LATITUDE = 85.05112877980659237802;  ///< Maximum latitude value
-static const qreal MIN_LATITUDE = -MAX_LATITUDE; ///< Minimum latitude value
-static const qreal MIN_LONGITUDE = -180.0;  ///< Minimum longitude value
-static const qreal MAX_LONGITUDE = 180.0;  ///< Maximum longitude value
+static const int MAP_ZOOM_PANEL_POSITION_X = 10; ///< Horizontal position of zoom panel
+static const int MAP_ZOOM_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
+static const int MAP_ZOOM_PANEL_LEVEL = MIN_MAP_SCENE_NORMAL_LEVEL
+                                        + MAX_MAP_ZOOM_LEVEL + 2; ///< Zepth of zoom panel (Z-axis)
+static const int MAP_ZOOM_PANEL_BUTTON_SIZE = 74; ///< Size of a zoom panel button
 
-static const int DEFAULT_SCREEN_WIDTH = 973;
-static const int DEFAULT_SCREEN_HEIGHT = 614;
-static const int DEFAULT_ZOOM_LEVEL = 14;
-static const qreal DEFAULT_LONGITUDE = 25.5000;
-static const qreal DEFAULT_LATITUDE = 65.0000;
+static const int MAP_OWN_LOCATION_ICON_SIZE = 24; ///< Size of own location item icon
+static const int OWN_LOCATION_ICON_Z_LEVEL = MAP_ZOOM_PANEL_LEVEL - 1; ///< Z-Level of own location icon
+const int FRIEND_LOCATION_ICON_Z_LEVEL = OWN_LOCATION_ICON_Z_LEVEL -1; ///< Z-Level of friend location icon
 
-static const int GRID_PADDING = 1;
+const qreal MAX_LATITUDE = 85.05112877980659237802;  ///< Maximum latitude value
+const qreal MIN_LATITUDE = -MAX_LATITUDE; ///< Minimum latitude value
+const qreal MIN_LONGITUDE = -180.0;  ///< Minimum longitude value
+const qreal MAX_LONGITUDE = 180.0;  ///< Maximum longitude value
+
+const int DEFAULT_SCREEN_WIDTH = 973;    ///< Default screen width
+const int DEFAULT_SCREEN_HEIGHT = 614;   ///< Default screen height
+const int DEFAULT_ZOOM_LEVEL = 14;       ///< Default zoom level
+const qreal DEFAULT_LONGITUDE = 25.5000; ///< Default longitude value
+const qreal DEFAULT_LATITUDE = 65.0000;  ///< Default latitude value
+
+const int GRID_PADDING = 1;  ///< Grid padding used in tile grid calculation
 
 /**
 * \var UNDEFINED
 * \brief Value to be used when zoom level, tile numbers or position are not defined
 */
-static const int UNDEFINED = -1;
+const int UNDEFINED = -1;
 
-#endif // COMMON_H
+#endif // MAPCOMMON_H