ganeswidgets/src/hgindexfeedback_p.cpp
changeset 19 31a1a9e11046
parent 16 0e550c9259fd
equal deleted inserted replaced
18:1591614dbf89 19:31a1a9e11046
   257     mScrollBarPressed = false;
   257     mScrollBarPressed = false;
   258 
   258 
   259 }
   259 }
   260 
   260 
   261 /*
   261 /*
   262     Handle the case of the scrollbar being moved.
       
   263 
       
   264     This is to stop any existing timers (only if the scrollbar actually moved),
       
   265     and start a timer with the dwell timeout.
       
   266 
       
   267     NOTE:: this should be much simpler once the valueChanged signal from hbscrollbar
       
   268     is emitted at the correct times.
       
   269 */
       
   270 void HgIndexFeedbackPrivate::_q_scrollPositionChanged(qreal value, Qt::Orientation orientation )
       
   271 {
       
   272     // using 3 timers.  If the press timer is active, stop it, assuming the value actually changed.
       
   273 
       
   274     // TODO::The value check here is a work around for a bug in hbscrollbar.
       
   275     // the bug is that the value changed signal is emitted when the thumb
       
   276     // is pressed, and again when it is released, regaurdless of if there was a value change.
       
   277     // once that bug is fixed, This should be just setting the dwell interval,
       
   278     // starting the timer, and showing the index feedback.
       
   279     if (value != mScrollBarValue && orientation == mWidget->scrollDirection()) {
       
   280         showIndexFeedback();
       
   281     }
       
   282 }
       
   283 
       
   284 /*
       
   285     The private slot for hiding the index feedback.
   262     The private slot for hiding the index feedback.
   286 
   263 
   287     If effects are active, use the disappear effect to hide the index feedback's
   264     If effects are active, use the disappear effect to hide the index feedback's
   288     primitives.  Otherwise simply hide them.
   265     primitives.  Otherwise simply hide them.
   289 */
   266 */