final fixing
authorVille Tiensuu <ville.tiensuu@ixonos.com>
Mon, 3 May 2010 07:17:30 +0000 (10:17 +0300)
committerVille Tiensuu <ville.tiensuu@ixonos.com>
Mon, 3 May 2010 07:17:30 +0000 (10:17 +0300)
src/map/friendlocationitem.cpp
src/map/friendlocationitem.h
src/map/ownlocationitem.h
tests/map/ownlocationitem/testownlocationitem.cpp

index 06fb3ec..9df90b0 100644 (file)
@@ -29,6 +29,7 @@ FriendLocationItem::FriendLocationItem(const QPixmap &icon,
                                        const QPointF &friendsLocation,
                                        QObject *parent)
 {
+    Q_UNUSED(parent);
     qDebug() << __PRETTY_FUNCTION__;
 
     setPixmap(icon);
index 7481977..e90dd0b 100644 (file)
 
 #include "baselocationitem.h"
 
+/**
+* @brief Class that shows friends location icons on the map
+*
+* @class FriendLocationItem friendlocationitem.h "map/friendlocationitem.h"
+* @author Ville Tiensuu
+*/
 class FriendLocationItem : public BaseLocationItem
 {
     Q_OBJECT
 
-public:    
+public:
+
+    /**
+    * @brief Constructor of FriendLocationItem.
+    *        Sets position to specified location.
+    *        Loads and sets default pixmap that is show on the map.
+    *        Sets default Z-value.
+    *        Sets offset so that achor of the picture is at the origin. this feature is
+    *        needed to center icon on the middle of the location.
+    *        Sets item to ignore transformations. this feature is needed to make icon on the map
+    *        immune to scaling
+    *
+    * @param icon friends Facebook profile picture, friendsLocation Position in QPoinF, parent
+    */
     FriendLocationItem(const QPixmap &icon, const QPointF &friendsLocation, QObject *parent = 0);
+
+    /**
+    * @brief sets friends Facebook profile picture that is show on the map.
+    *
+    * @param icon friends Facebook profile picture
+    */
     void setIcon(const QPixmap &icon);
+
+    /**
+    * @brief sets name for friend.
+    *
+    * @param name friends name
+    */
     void setName(const QString &name);
 
 signals:
+
+   /**
+   * @brief signal is emitted when friends icon is clicked on the map
+   *
+   * @param name friends name
+   */
    void iconClicked(QString name);
 
 protected:
+
+   /**
+   * @brief method that detects when friend icon is clicked
+   *
+   * @param event detects the mouse click (same as touch in maemo)
+   */
     void mousePressEvent(QGraphicsSceneMouseEvent *event);    
 
 private:
-    QString *m_name;
+    QString *m_name; ///< Friends name
 };
 
 #endif // FRIENDLOCATIONITEM_H
index f5a4063..a1650fc 100644 (file)
@@ -41,7 +41,7 @@ public:
 
     /**
     * @brief Constructor of OwnLocationItem.
-    *        Sets position to default location.
+    *        Sets position to specified location.
     *        Loads and sets default pixmap that is show on the map.
     *        Sets default Z-value.
     *        Sets offset so that achor of the picture is at the origin. this feature is
index 7bda338..218ff18 100644 (file)
@@ -40,7 +40,7 @@ namespace TestOwnLocation  //  Test data for function is defined in namespace
     const QPointF testLocationPoint(65.525, 25.345);
     const QPointF defaultLocationPoint(DEFAULT_LONGITUDE,DEFAULT_LATITUDE);
     const QPointF locationIconOffset(-MAP_OWN_LOCATION_ICON_SIZE/2, -MAP_OWN_LOCATION_ICON_SIZE/2);
-    const int itemIgnoresTransformationsFlagValue = 0x20;
+    const int itemIgnoresTransformationsFlagValue = 0x20;    
 }
 
 using namespace TestOwnLocation;
@@ -58,8 +58,7 @@ class TestOwnLocationItem: public QObject
 
     /**
     * @brief Test method for constructors.
-    *        Creates instance of OwnLocationItem using three different constructors and tests
-    *        that positions are set correctly.
+    *        Tests that positions are set correctly.
     *        Tests that Z-values are set correctly.
     *        Tests that offses are set correctly.
     *        Tests that ItemIgnoresTransformations flag is set.
@@ -70,7 +69,7 @@ class TestOwnLocationItem: public QObject
      * @brief Creates instance of OwnLocationItem.
      *        Sets test position for location item in geographic coordinates.
      *        Reads position from location item in scene coordinates and
-     *        verifies that it correctly formed.
+     *        verifies that it is correctly formed.
      */
      void testSetAndGetPosition();