equal
deleted
inserted
replaced
37 pan gesture be to change day to previous/next. |
37 pan gesture be to change day to previous/next. |
38 If the gesture is shorter - current view is not changed. |
38 If the gesture is shorter - current view is not changed. |
39 */ |
39 */ |
40 const int KCalenHScrollMoveParam = 30; //!< Percentage |
40 const int KCalenHScrollMoveParam = 30; //!< Percentage |
41 |
41 |
42 /*! |
|
43 Value [degree] defines the max. angle of swipe gesture which should change day. |
|
44 */ |
|
45 const qreal KCalenSwipeAngle = 30; |
|
46 |
|
47 |
42 |
48 /*! |
43 /*! |
49 \class CalenDayContentScrollArea |
44 \class CalenDayContentScrollArea |
50 \brief Scrollable container class for content widgets. |
45 \brief Scrollable container class for content widgets. |
51 |
46 |
277 handled = true; |
272 handled = true; |
278 } |
273 } |
279 else { |
274 else { |
280 QGestureEvent* gesture = static_cast<QGestureEvent*> (event); |
275 QGestureEvent* gesture = static_cast<QGestureEvent*> (event); |
281 |
276 |
282 // Check if we get a pan gesture |
277 QPanGesture *panGesture = qobject_cast<QPanGesture*>(gesture->gesture(Qt::PanGesture)); |
283 QPanGesture *panGesture = qobject_cast<QPanGesture*> ( |
|
284 gesture->gesture(Qt::PanGesture)); |
|
285 if (panGesture) { |
278 if (panGesture) { |
286 checkPanDirection(panGesture); |
279 checkPanDirection(panGesture); |
287 if (mPanDayDirection == ECalenPanHorizontal) { |
280 if (mPanDayDirection == ECalenPanHorizontal) { |
|
281 gestureEvent(gesture); |
|
282 handled = true; |
|
283 } |
|
284 }else{ |
|
285 QSwipeGesture *swipeGesture = qobject_cast<QSwipeGesture*>(gesture->gesture(Qt::SwipeGesture)); |
|
286 if (swipeGesture) { |
288 gestureEvent(gesture); |
287 gestureEvent(gesture); |
289 handled = true; |
288 handled = true; |
290 } |
289 } |
291 } |
290 } |
292 } |
291 } |