Updated tests cases matching the new tabs
[situare] / src / map / baselocationitem.h
index 537b29c..d409070 100644 (file)
@@ -3,6 +3,7 @@
    Copyright (C) 2010  Ixonos Plc. Authors:
 
        Ville Tiensuu - ville.tiensuu@ixonos.com
+       Sami Rämö - sami.ramo@ixonos.com
 
    Situare is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
 
 #include <QGraphicsPixmapItem>
 
-
 /**
-* @brief Baseclass for showing own and friends locations on the map.
-*        This class is abstract
-*
-* @class BaseLocationItem baselocationitem.h "map/baselocationitem.h"
-* @author Ville Tiensuu
-*/
+ * @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
-{    
-
+{
 public:
-
     /**
-    * @brief Constructor of BaseLocationItem.
-    *        Sets parent.
-    *
-    * @param parent
-    */
+     * @brief Constructor of BaseLocationItem.
+     *        Sets parent.
+     *
+     * @param parent
+     */
     BaseLocationItem(QObject *parent = 0);
 
-    /*******************************************************************************
-    * MEMBER FUNCTIONS AND SLOTS
-    ******************************************************************************/
-    public:
-
-    /**
-    * @brief Hides item so that it is invisible on the map
-    *
-    */
-    void hideLocation();
-
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public:
     /**
-    * @brief returns position of item in scene coordinates.
-    *
-    * @return QPoint position of OwnLocationItem
-    */
-    QPoint position() const;
-
+     * @brief Return item rect transformed to given zoom level
+     *
+     * Because of using ItemIgnoresTransformations, and not scaling the item, the default
+     * sceneBoundingRect can't be used because it always returns the lowest map tile level scene
+     * bounding rect. This method does return rect scaled to given zoom level. Rect's center
+     * point is also normalized to be inside the map.
+     *
+     * @param zoomLevel Zoom level for which the sceneBoundingRect should be transformed
+     * @return sceneBoundingRect transformed to given zoom level
+     */
     QRect sceneTransformedBoundingRect(int zoomLevel) const;
-
-    /**
-    * @brief sets position of item as specified in parameter.
-    *        Parameter can be given in georaphical coordinates
-    *
-    * @param newPosition Parameter that specifies new position.
-    */
-    void setPosition(const QPointF & newPosition);
-
-    /**
-    * @brief Sets item to be visible on the map.
-    *        Item is visible by default, function is needed only when own location
-    *        needs to be set back visible after hideLocation function call.
-    */
-    void showLocation();
 };