Merge branch 'master' into scalable_panels
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Mon, 14 Jun 2010 13:18:45 +0000 (16:18 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Mon, 14 Jun 2010 13:18:45 +0000 (16:18 +0300)
Conflicts:
src/map/baselocationitem.h
src/map/mapengine.h

1  2 
src/map/baselocationitem.h
src/map/mapengine.h

  
  
  /**
-   * @brief Baseclass for showing own and friends locations on the map.
-   *
-   * @author Ville Tiensuu - ville.tiensuu@ixonos.com
-   * @author Sami Rämö - sami.ramo@ixonos.com
-   */
 -* @brief Baseclass for showing own and friends locations on the map.
 -*
 -* @author Ville Tiensuu - ville.tiensuu@ixonos.com
 -* @author Sami Rämö - sami.ramo@ixonos.com
 -*/
++ * @brief Baseclass for showing own and friends locations on the map.
++ *
++ * @author Ville Tiensuu - ville.tiensuu@ixonos.com
++ * @author Sami Rämö - sami.ramo@ixonos.com
++ */
  class BaseLocationItem : public QGraphicsPixmapItem, public QObject
  {
  
@@@ -133,10 -133,23 +133,23 @@@ public
      void init();
  
      /**
 -      * @brief Return given value translated between min and max
 -      *
 -      * If given value is not inside the given range (min <= value <= max), then the allowed range
 -      * is adder or subtracted until the value does fit in the range.
 -      *
 -      * @param value Value to be normalized
 -      * @param min Minimum allowed value
 -      * @param max Maximum allowed value
 -      * @return value which is moved to be inside the given limits
 -      */
++     * @brief Return given value translated between min and max
++     *
++     * If given value is not inside the given range (min <= value <= max), then the allowed range
++     * is adder or subtracted until the value does fit in the range.
++     *
++     * @param value Value to be normalized
++     * @param min Minimum allowed value
++     * @param max Maximum allowed value
++     * @return value which is moved to be inside the given limits
++     */
+     static int normalize(int value, int min, int max);
+     /**
 -    * @brief Getter for scene
 -    *
 -    * @return QGraphicsScene
 -    */
 +     * @brief Getter for scene
 +     *
 +     * @return QGraphicsScene
 +     */
      QGraphicsScene* scene();
  
      /**
      void setZoomLevel(const int newZoomLevel);
  
      /**
 -    * @brief Return tile path created from tile values.
 -    *
 -    * @param zoomLevel tile's zoom level
 -    * @param x tile's x value
 -    * @param y tile's y value
 -    * @return QString tile path
 -    */
 +     * @brief Return tile path created from tile values.
 +     *
 +     * @param zoomLevel tile's zoom level
 +     * @param x tile's x value
 +     * @param y tile's y value
 +     * @return QString tile path
 +     */
      static QString tilePath(int zoomLevel, int x, int y);
  
+     /**
 -    * @brief Maximum number of individual tiles per side at given zoom level
 -    *
 -    * @param zoomLevel Zoom level
 -    * @return amount of tiles per side at given zoom level
 -    */
++     * @brief Maximum number of individual tiles per side at given zoom level
++     *
++     * @param zoomLevel Zoom level
++     * @return amount of tiles per side at given zoom level
++     */
+     static int tilesPerSide(int zoomLevel);
  public slots:
      /**
 -    * @brief Slot to catch user own location data
 -    *
 -    * @param user User info
 -    */
 +     * @brief Slot to catch user own location data
 +     *
 +     * @param user User info
 +     */
      void receiveOwnLocation(User *user);
  
      /**
      void setLocation(QPoint sceneCoordinate);
  
      /**
 -    * @brief Helper for setting view location based on latitude and longitude
 -    * coordinates
 -    *
 -    * @param latLonCoordinate Latitude & longitude coordinates for location
 -    */
 +     * @brief Helper for setting view location based on latitude and longitude
 +     * coordinates
 +     *
 +     * @param latLonCoordinate Latitude & longitude coordinates for location
 +     */
-     void setViewLocation(QPointF latLonCoordinate);    
+     void setViewLocation(QPointF latLonCoordinate);
+     /**
 -    * @brief Calculate maximum value for tile in this zoom level.
 -    *
 -    * @param zoomLevel zoom level
 -    * @return int tile's maximum value
 -    */
++     * @brief Calculate maximum value for tile in this zoom level.
++     *
++     * @param zoomLevel zoom level
++     * @return int tile's maximum value
++     */
+     static int tileMaxIndex(int zoomLevel);
  
      /**
 -    * @brief Slot for view resizing.
 -    *
 -    * @param size view size
 -    */
 +     * @brief Slot for view resizing.
 +     *
 +     * @param size view size
 +     */
      void viewResized(const QSize &size);
  
  private:
      qreal sceneResolution();
  
      /**
-      * @brief Calculate maximum value for tile in this zoom level.
 -      * @brief Set size of tiles grid based on view size
 -      *
 -      * @param viewSize Current view size
 -      */
++     * @brief Set size of tiles grid based on view size
 +     *
-      * @param zoomLevel zoom level
-      * @return int tile's maximum value
++     * @param viewSize Current view size
 +     */
-     int tileMaxValue(int zoomLevel);
+     void setTilesGridSize(const QSize &viewSize);
  
      /**
 -    * @brief Updates the current view rect including margins
 -    *
 -    * Calculates tiles rect in scene based on m_viewTilesGrid and
 -    * calls MapScene::viewRectUpdated()
 -    */
 +     * @brief Updates the current view rect including margins
 +     *
 +     * Calculates tiles rect in scene based on m_viewTilesGrid and
 +     * calls MapScene::viewRectUpdated()
 +     */
      void updateViewTilesSceneRect();
  
+     /**
 -      * @brief This method is ran always when the map is zoomed
 -      *
 -      * This method is the right place for all actions which must be done when ever map is zoomed.
 -      */
++     * @brief This method is ran always when the map is zoomed
++     *
++     * This method is the right place for all actions which must be done when ever map is zoomed.
++     */
+     void zoomed();
  private slots:
      /**
 -      * @brief This slot is called after friend items position have been updated
 -      *
 -      * Does run MapScene::spanItems()
 -      */
++     * @brief This slot is called after friend items position have been updated
++     *
++     * Does run MapScene::spanItems()
++     */
+     void friendsPositionsUpdated();
+     /**
 -      * @brief Slot for GPS position updates
 -      *
 -      * GPS location item is updated and map centered to new location (if automatic
 -      * centering is enabled).
 -      *
 -      * @param position New coordinates from GPS
 -      * @param accuracy Accuracy of the GPS fix
 -      */
 +     * @brief Slot for GPS position updates
 +     *
 +     * GPS location item is updated and map centered to new location (if automatic
 +     * centering is enabled).
 +     *
 +     * @param position New coordinates from GPS
 +     * @param accuracy Accuracy of the GPS fix
 +     */
      void gpsPositionUpdate(QPointF position, qreal accuracy);
  
      /**
 -    * @brief Slot for received map tile images
 -    *
 -    * Does receive map tile images from MapFetcher. Calls MapScene::addTile() for creating and adding
 -    * the actual MapTile object to the MapScene.
 -    *
 -    * Tile is added also to outside the world horizontal limits, if required, for spanning the map.
 -    *
 -    * @param zoomLevel Zoom level
 -    * @param x Tile x index
 -    * @param y Tile y index
 -    * @param image Received pixmap
 -    */
 +     * @brief Slot for received map tile images
 +     *
-      * Does add MapTile objects to MapScene.
++     * Does receive map tile images from MapFetcher. Calls MapScene::addTile() for creating and adding
++     * the actual MapTile object to the MapScene.
++     *
++     * Tile is added also to outside the world horizontal limits, if required, for spanning the map.
++     *
 +     * @param zoomLevel Zoom level
 +     * @param x Tile x index
 +     * @param y Tile y index
 +     * @param image Received pixmap
 +     */
-     void mapImageReceived(int zoomLevel, int x, int y, const QPixmap &image);    
+     void mapImageReceived(int zoomLevel, int x, int y, const QPixmap &image);
  
      /**
 -    * @brief Slot for actions after view zoom is finished
 -    *
 -    * Does run removeOutOfViewTiles
 -    */
 +     * @brief Slot for actions after view zoom is finished
 +     *
 +     * Does run removeOutOfViewTiles
 +     */
      void viewZoomFinished();
  
      /**