35 #ifdef HB_EFFECTS |
35 #ifdef HB_EFFECTS |
36 #include "hbeffect.h" |
36 #include "hbeffect.h" |
37 #include "hbeffectinternal_p.h" |
37 #include "hbeffectinternal_p.h" |
38 #define HB_SLIDERHANDLE_TYPE "HB_SLIDERHANDLE" |
38 #define HB_SLIDERHANDLE_TYPE "HB_SLIDERHANDLE" |
39 #endif |
39 #endif |
40 |
40 #ifdef HB_GESTURE_FW |
|
41 #include <hbtapgesture.h> |
|
42 #include <hbpangesture.h> |
|
43 #endif |
41 /*! |
44 /*! |
42 This is internal class for HbSlider |
45 This is internal class for HbSlider |
43 this created slider handle |
46 this created slider handle |
44 It also has event handling for handle press/move and release |
47 It also has event handling for handle press/move and release |
45 |
48 |
64 // create touch area for handle |
67 // create touch area for handle |
65 touchItem = slider->style()->createPrimitive(HbStyle::P_SliderElement_touchhandle, this); |
68 touchItem = slider->style()->createPrimitive(HbStyle::P_SliderElement_touchhandle, this); |
66 HbStyle::setItemName(touchItem , "toucharea"); |
69 HbStyle::setItemName(touchItem , "toucharea"); |
67 |
70 |
68 setZValue(slider->zValue() + 1); |
71 setZValue(slider->zValue() + 1); |
69 |
72 #ifdef HB_GESTURE_FW |
70 |
73 grabGesture(Qt::TapGesture); |
|
74 grabGesture(Qt::PanGesture); |
|
75 if(touchItem) { |
|
76 if(QGraphicsObject *touchArea = touchItem->toGraphicsObject()) { |
|
77 Q_UNUSED(touchArea); |
|
78 touchArea->grabGesture(Qt::PanGesture); |
|
79 touchArea->grabGesture(Qt::TapGesture); |
|
80 } |
|
81 } |
|
82 #endif |
71 #ifdef HB_EFFECTS |
83 #ifdef HB_EFFECTS |
72 // horizontal thumb press |
84 // horizontal thumb press |
73 // HbEffectInternal::add(HB_SLIDERHANDLE_TYPE,"sliderhandle_h_press", "h_thumbpress"); |
85 // HbEffectInternal::add(HB_SLIDERHANDLE_TYPE,"sliderhandle_h_press", "h_thumbpress"); |
74 //horizonal thumb release |
86 //horizonal thumb release |
75 //HbEffectInternal::add(HB_SLIDERHANDLE_TYPE,"sliderhandle_h_releasel", "h_thumbrelease"); |
87 //HbEffectInternal::add(HB_SLIDERHANDLE_TYPE,"sliderhandle_h_releasel", "h_thumbrelease"); |