Adding comments
authorSami Rämö <sami.ramo@ixonos.com>
Mon, 23 Aug 2010 10:56:45 +0000 (13:56 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Mon, 23 Aug 2010 10:56:45 +0000 (13:56 +0300)
src/map/mapengine.h
src/map/mapview.h
src/ui/mainwindow.h

index 74bd5e7..774f795 100644 (file)
@@ -321,6 +321,7 @@ private slots:
      *
      * Does emit locationChanged signal.
      * @param coordinate Scene coordinates for new position
+     * @param isUserDragAction True if caused by user dragging action
      */
     void setCenterPosition(SceneCoordinate coordinate, bool isUserDragAction = false);
 
@@ -406,6 +407,7 @@ signals:
      * @brief Request view centering to new locaiton
      *
      * @param coordinate New scene coordinates
+     * @param isUserDragAction True if caused by user dragging action
      */
     void locationChanged(SceneCoordinate coordinate, bool isUserDragAction);
 
index ae1168b..ca35767 100644 (file)
@@ -132,7 +132,11 @@ public slots:
     /**
     * @brief Slot for centering view to new location
     *
+    * Does also shift the center point horizontally, if required.
+    *
     * @param coordinate Scene coordinates of the new center point
+    * @param isUserDragAction True if caused by user dragging action. Does not shift the center
+    *                         point if true.
     */
     void centerToSceneCoordinates(const SceneCoordinate &coordinate, bool isUserDragAction = false);
 
@@ -144,6 +148,9 @@ public slots:
     void setZoomLevel(int zoomLevel);
 
 private slots:
+    /**
+    * @brief Disables shifting of the center point
+    */
     void disableCenterShift();
 
     /**
@@ -153,6 +160,9 @@ private slots:
     */
     void doubleTapZoomFinished();
 
+    /**
+    * @brief Enables shifting of the center point
+    */
     void enableCenterShift();
 
 private:
@@ -163,8 +173,16 @@ private:
     */
     void setViewScale(qreal viewScale);
 
+    /**
+    * @brief Toggles the shifting of the center point
+    *
+    * @param enabled True if shifting is enabled
+    */
     void toggleCenterShift(bool enabled);
 
+    /**
+    * @brief Update center shifting value
+    */
     void updateCenterShift();
 
     /**
@@ -191,6 +209,7 @@ signals:
     *
     * Signal is emitted when view is scrolled.
     * @param coordinate Scene coordinates of the new center point of the view
+    * @param isUserDragAction True if caused by user dragging action
     */
     void viewScrolled(const SceneCoordinate &coordinate, bool isUserDragAction);
 
@@ -208,8 +227,8 @@ signals:
  * DATA MEMBERS
  ******************************************************************************/
 private:
-    bool m_centerShiftEnabled;
-    bool m_doubleTapZoomRunning;         ///< Double tap zoom running flag
+    bool m_centerShiftEnabled;            ///< Is the center point shifting enabled?
+    bool m_doubleTapZoomRunning;          ///< Double tap zoom running flag
 
     int m_dragTime[VALUES];               ///< Table of mouse event durations
     int m_index;                          ///< Index of mouse event values tables
@@ -222,15 +241,15 @@ private:
     QPoint m_lastMouseEventScenePosition; ///< Previous mouse event position in the scene
     QPoint m_lastMouseEventViewPosition;  ///< Previous mouse event position in the view
 
-    QPointF m_centerHorizontalShift;
+    QPointF m_centerHorizontalShift;      ///< Current amount of center point shifting
 
     QParallelAnimationGroup *m_scrollAndZoomAnimation;  ///< Double click zoom animation
     QPropertyAnimation *m_zoomAnimation;  ///< Zoom animation
 
     QTime m_time;                         ///< Elapsed times in mouse events
 
-    MapScroller *m_scroller;              ///< Kinetic scroller
-    SceneCoordinate m_lastSetScenePosition;
+    MapScroller *m_scroller;                    ///< Kinetic scroller
+    SceneCoordinate m_lastSetScenePosition;     ///< Last center point coordinate set by MapEngine
 };
 
 #endif // MAPVIEW_H
index 5d8a5b9..6644d58 100644 (file)
@@ -440,6 +440,7 @@ signals:
      * @brief View should be centered to new location
      *
      * @param coordinate Scene coordinates of the new center point
+     * @param isUserDragAction True if caused by user dragging action
      */
     void centerToSceneCoordinates(const SceneCoordinate &coordinate, bool isUserDragAction);
 
@@ -534,7 +535,8 @@ signals:
     /**
      * @brief Forwarding signal from MapView to MapEngine
      *
-     * @param coordinate
+     * @param coordinate New center point coordinate
+     * @param isUserDragAction True if caused by user dragging action
      */
     void mapViewScrolled(const SceneCoordinate &coordinate, bool isUserDragAction);