calendarui/views/dayview/src/calendaycontentscrollarea.cpp
changeset 70 a5ed90760192
parent 64 1881ad52dc45
child 81 ce92091cbd61
--- a/calendarui/views/dayview/src/calendaycontentscrollarea.cpp	Tue Aug 31 18:15:13 2010 +0530
+++ b/calendarui/views/dayview/src/calendaycontentscrollarea.cpp	Mon Sep 06 10:12:45 2010 +0530
@@ -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;
+                }
             }
         }
     }