src/hbwidgets/sliders/hbsliderhandle.cpp
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 2 06ff229162e9
--- a/src/hbwidgets/sliders/hbsliderhandle.cpp	Mon Apr 19 14:02:13 2010 +0300
+++ b/src/hbwidgets/sliders/hbsliderhandle.cpp	Mon May 03 12:48:33 2010 +0300
@@ -37,7 +37,10 @@
 #include "hbeffectinternal_p.h"
 #define HB_SLIDERHANDLE_TYPE "HB_SLIDERHANDLE"
 #endif
-
+#ifdef HB_GESTURE_FW
+#include <hbtapgesture.h>
+#include <hbpangesture.h>
+#endif
 /*!
     This is internal class for HbSlider
     this created slider handle
@@ -66,8 +69,17 @@
     HbStyle::setItemName(touchItem , "toucharea");
 
     setZValue(slider->zValue() + 1);
-    
-
+#ifdef HB_GESTURE_FW    
+    grabGesture(Qt::TapGesture);
+    grabGesture(Qt::PanGesture);
+    if(touchItem) {
+        if(QGraphicsObject *touchArea = touchItem->toGraphicsObject()) {
+            Q_UNUSED(touchArea);
+               touchArea->grabGesture(Qt::PanGesture);
+               touchArea->grabGesture(Qt::TapGesture);
+        }
+    }
+#endif 
 #ifdef HB_EFFECTS
     // horizontal thumb press
    // HbEffectInternal::add(HB_SLIDERHANDLE_TYPE,"sliderhandle_h_press", "h_thumbpress");
@@ -306,6 +318,16 @@
   reimp
 
 */
+void HbSliderHandle::gestureEvent(QGestureEvent *event)
+{
+    Q_UNUSED(event);
+    // HbWidgetBase::gestureEvent() ignores, overriding to accept
+}
+
+/*!
+  reimp
+
+*/
 void HbSliderHandle::updatePrimitives()
 {
     HbStyleOptionSlider opt;