--- a/calendarui/views/dayview/src/calendaycontentscrollarea.cpp Thu Sep 02 20:25:23 2010 +0300
+++ b/calendarui/views/dayview/src/calendaycontentscrollarea.cpp Fri Sep 17 08:29:05 2010 +0300
@@ -39,11 +39,6 @@
*/
const int KCalenHScrollMoveParam = 30; //!< Percentage
-/*!
- Value [degree] defines the max. angle of swipe gesture which should change day.
- */
-const qreal KCalenSwipeAngle = 30;
-
/*!
\class CalenDayContentScrollArea
@@ -279,15 +274,19 @@
else {
QGestureEvent* gesture = static_cast<QGestureEvent*> (event);
- // Check if we get a pan gesture
- QPanGesture *panGesture = qobject_cast<QPanGesture*> (
- gesture->gesture(Qt::PanGesture));
+ QPanGesture *panGesture = qobject_cast<QPanGesture*>(gesture->gesture(Qt::PanGesture));
if (panGesture) {
checkPanDirection(panGesture);
if (mPanDayDirection == ECalenPanHorizontal) {
gestureEvent(gesture);
handled = true;
}
+ }else{
+ QSwipeGesture *swipeGesture = qobject_cast<QSwipeGesture*>(gesture->gesture(Qt::SwipeGesture));
+ if (swipeGesture) {
+ gestureEvent(gesture);
+ handled = true;
+ }
}
}
}