ganeswidgets/src/hgwidgets.cpp
changeset 12 6c0ec0ccd2d4
parent 11 42505cd701c6
child 14 645b870db620
equal deleted inserted replaced
11:42505cd701c6 12:6c0ec0ccd2d4
   146 
   146 
   147 /*!
   147 /*!
   148  * Returns true if the scroll area handles
   148  * Returns true if the scroll area handles
   149  * long press gestures, false otherwise
   149  * long press gestures, false otherwise
   150  *
   150  *
   151  * \sa HbScrollArea::setHandleLongPress()
       
   152  */
   151  */
   153 bool HgWidget::longPressEnabled() const
   152 bool HgWidget::longPressEnabled() const
   154 {
   153 {
   155     Q_D( const HgWidget );
   154     Q_D( const HgWidget );
   156 
   155     return d->handleLongPress();
   157     return d->mHandleLongPress;
       
   158 }
   156 }
   159 
   157 
   160 /*!
   158 /*!
   161  * Sets the value of the handleLongPress property.  This value is set
   159  * Sets the value of the handleLongPress property.  This value is set
   162  * to true if the widget is to respond to long press gestures, false otherwise.
   160  * to true if the widget is to respond to long press gestures, false otherwise.
   163  *
   161  *
   164  * The default value is false.
   162  * The default value is false.
   165  *
   163  *
   166  * \sa HbScrollArea::handleLongPress()
       
   167  */
   164  */
   168 void HgWidget::setLongPressEnabled (bool value)
   165 void HgWidget::setLongPressEnabled (bool value)
   169 {
   166 {
   170     Q_D( HgWidget );
   167     Q_D( HgWidget );
   171 
   168     d->setHandleLongPress(value);
   172     if (d->mHandleLongPress != value)
       
   173     {
       
   174         d->mHandleLongPress = value;
       
   175     }
       
   176 
       
   177     // TODO, should we do something like this?????
       
   178 //    if (isChanged) {
       
   179 //        d->updateGestures();
       
   180 //        emit gestureSceneFilterChanged( d->mGestureFilter );
       
   181 //    }
       
   182 }
   169 }
   183 
   170 
   184 HgWidget::ScrollBarPolicy HgWidget::scrollBarPolicy() const
   171 HgWidget::ScrollBarPolicy HgWidget::scrollBarPolicy() const
   185 {
   172 {
   186     Q_D(const HgWidget);
   173     Q_D(const HgWidget);