equal
deleted
inserted
replaced
36 Q_OBJECT |
36 Q_OBJECT |
37 |
37 |
38 public: |
38 public: |
39 CalenDayContentScrollArea(QGraphicsItem *parent = 0); |
39 CalenDayContentScrollArea(QGraphicsItem *parent = 0); |
40 virtual ~CalenDayContentScrollArea(); |
40 virtual ~CalenDayContentScrollArea(); |
|
41 |
|
42 public: |
|
43 /*! |
|
44 \enum CalenPanDirection |
|
45 \brief Enumeration identifies pan gesture directions. |
|
46 */ |
|
47 enum CalenPanDirection |
|
48 { |
|
49 ECalenPanNotSet = 0, |
|
50 ECalenPanVertical, |
|
51 ECalenPanHorizontal |
|
52 }; |
41 |
53 |
42 signals: |
54 signals: |
43 void scrollAreaMoveStarted(CalenScrollDirection scrollTo); |
55 void scrollAreaMoveStarted(CalenScrollDirection scrollTo); |
44 void scrollAreaMoveFinished(CalenScrollDirection scrollTo); |
56 void scrollAreaMoveFinished(CalenScrollDirection scrollTo); |
45 |
57 |
54 bool event(QEvent *e); |
66 bool event(QEvent *e); |
55 |
67 |
56 private: // private functions |
68 private: // private functions |
57 void checkPanDirection(QPanGesture *panGesture); |
69 void checkPanDirection(QPanGesture *panGesture); |
58 void moveTo(const QPointF &newPosition, int time = 0); |
70 void moveTo(const QPointF &newPosition, int time = 0); |
|
71 bool isHorizontalSwipe(qreal angle) const; |
59 |
72 |
60 private slots: |
73 private slots: |
61 void moveFinished(); |
74 void moveFinished(); |
62 void orientationChanged(Qt::Orientation orientation); |
75 void orientationChanged(Qt::Orientation orientation); |
63 |
76 |