src/hbwidgets/sliders/hbratingslider.cpp
changeset 3 11d3954df52a
parent 2 06ff229162e9
child 5 627c4a0fd0e7
--- a/src/hbwidgets/sliders/hbratingslider.cpp	Fri May 14 16:09:54 2010 +0300
+++ b/src/hbwidgets/sliders/hbratingslider.cpp	Thu May 27 13:10:59 2010 +0300
@@ -140,47 +140,50 @@
 
 /*!
     \class HbRatingSlider
-    \brief A control for user to do rating.
-
-    This is a general rating widget where user will be able to do different 
-    ratings for things like Music ,Video etc. 
+    \brief This is a widget through which user can do rating for videos , music etc.
+    \image html ratingslider.png  "A Rating Slider with rating done"
 
-    By default there are 5 ratings ( 5 stars ). This can be configured also.
-    The interval , number of icons etc can be configured.
+    By default there are 5 ratings. The default rating graphics comes from theme.It supports custom graphics 
+    also.The custom graphics should contain only 1 star.Using the API \a setNumberOfIcons() number of icons can be 
+    configured.By default it is 5 and maximum number of icons is 10.
 
-    Apart from rating the this can used for showing cumulative rating also.
+    Along with the rating HbRatingSlider can be used to show the cumulative rating also.
 
-    example code example:
+    To use HbRatingSlider with default settings it just needs to be created.
+    example code:
     \code
     HbRatingSlider *object = new HbRatingSlider(parent);
     \endcode
 
-    The below  code can be used to show some rating e.g. 2.5/5
-    by default the  stepcount =5
+    HbRatingSlider emits below signals 
+
+    void ratingDone(int ratingValue);
+    void ratingChanged(int ratingValue);
     
+    ratingDone is emits when the user does the rating and releases the finger. 
+    ratingChanged is emits when the user changes the rating by simply moving on the Rating Slider
+
+    HbRatingSlider supports integer ratings.But using the API \a setStepCount() fraction ratings can also be 
+    shown on Rating Slider
+
+    The below  code can be used to show some rating e.g. 2.5/5       
     \code
+    //2.5/5 can be set as  25/50
     HbRatingSlider *slider = new HbRatingSlider();
-    slider->setStepCount(100); //5 *20//
-    slider->setCurrentRating(50); //2.5*20 it shows 50 / 100 which is same as 2.5/5
+    slider->setStepCount(50); //5 *10//
+    slider->setCurrentRating(25); //2.5*10 it shows 25/50 which is same as 2.5/5
     \endcode
     
-    This will show as 2.5/5. Now if one the same ratingslider 
-    if the Application wants to configure a rating slider with range 1-5
-    on emitting the signal rating changed it can set to 
-    slider->setStepCount(5);
-    slider->setCurrentRating(0)
-    
-    When the rating is done it emits a signal called ratingDone and when rating is 
-    changed by the user by draging the pointer ratingChanged signal is emitted.   
-    
+    This will show as 2.5/5. Now if on the same ratingslider 
+    the Application wants to configure a rating slider with range 1-5
+    on emitting the signal rating changed it can set to 5.
  */
 
 
-
 /*!
     @beta
-    Constructor of  RatingSlider.
-    \param parent. Parent widget
+     Constructs a Rating Slider bar with the given parent.
+    \param parent Parent Item.
 
 */
 
@@ -195,8 +198,7 @@
 
 /*!
     @beta
-    Constructor of  RatingSlider.
-    \param parent. Parent widget
+    Protected constructor
 */
 HbRatingSlider::HbRatingSlider(HbRatingSliderPrivate &dd,QGraphicsItem *parent) : 
     HbWidget( dd,parent)
@@ -232,9 +234,8 @@
 /*!    
     
     @beta  
-    Sets the number of icons. In a Rating scenario you may have number of repeated icons. This API can be used to set 
-    the number of icons required. For Example the default image is "*" and you have 5 stars. You can set the number of 
-    stars  using this. By default this value is 5.
+    Sets the number of icons. There can be n number of repeated icons. This method can be used to set 
+    the number of icons required.The default image is "*" and have 5 stars.
 
     \param number. A value between 1 and 10 
 
@@ -268,9 +269,8 @@
 
 /*!
     @beta
-    Sets the step count for the rating slider. If the number of icons is 5 and step count is 10 then it is possible to have 10 ratings.
-    one rating will be half star (by default). If the number of icons is 5 and step count is 5 then 5 ratings are possible. In this 
-    case one rating will be one complete star. By default this value is 5.
+    Sets the step count for the rating slider.This indicates the interval of the rating. Eg. If step count is 10
+    then 10 rating is possible.
     
     \param count. A value between 1 and 100. This can be considerd as the maximum rating possible. 
 
@@ -521,6 +521,9 @@
     }        
 }
 #else
+/*!
+    \reimp
+ */
 void HbRatingSlider::mousePressEvent(QGraphicsSceneMouseEvent *event)
 {
     Q_UNUSED(event)
@@ -528,6 +531,9 @@
 #endif
 
 #ifdef HB_GESTURE_FW
+/*!
+    \reimp
+ */
 void HbRatingSlider::gestureEvent(QGestureEvent *event)
 {
     Q_D (HbRatingSlider);
@@ -671,7 +677,9 @@
     updatePrimitives();
     d->createLookupTable();
 }
-
+/*!
+    \reimp
+ */
 void HbRatingSlider::initStyleOption(HbStyleOption *hboption) const
 {
     Q_D( const HbRatingSlider );
@@ -710,7 +718,9 @@
             return 0;
     }
 }
-
+/*!
+    \reimp
+ */
 void HbRatingSlider::changeEvent(QEvent *event)
 {
     HbWidget::changeEvent(event);
@@ -722,6 +732,9 @@
         break;
     }
 }
+/*!
+    \reimp
+ */
 void HbRatingSlider::updatePrimitives()
 {
     Q_D(HbRatingSlider);
@@ -740,7 +753,9 @@
     }
     
 }
-
+/*!
+    \reimp
+ */
 QVariant HbRatingSlider::itemChange(GraphicsItemChange change, const QVariant &value)
 {
     if(change == ItemVisibleHasChanged && value.toBool()){