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
/**
* @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
+* @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.
*/
BaseLocationItem(QObject *parent = 0);
- /*******************************************************************************
- * MEMBER FUNCTIONS AND SLOTS
- ******************************************************************************/
- public:
-
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public:
/**
- * @brief Hides item so that it is invisible on the map
+ * @brief Return item rect transformed to given zoom level
*
- */
- void hideLocation();
-
- /**
- * @brief returns position of item in scene coordinates.
+ * 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.
*
- * @return QPoint position of OwnLocationItem
+ * @param zoomLevel Zoom level for which the sceneBoundingRect should be transformed
+ * @return sceneBoundingRect transformed to given zoom level
*/
- QPoint position() const;
-
- /**
- *@brief Return item sceneBoundingRect transformed to given zoom level
- *
- * Because of using ItemIgnoresTransformations, and not scaling the item, the default
- * sceneBoundingRect does always return the lowest map tile level scene bounding rect which
- * must be scaled to current zoom level.
- *
- * @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();
};