equal
deleted
inserted
replaced
22 #include <hbscrollarea.h> |
22 #include <hbscrollarea.h> |
23 |
23 |
24 // User includes |
24 // User includes |
25 #include "calendaycommonheaders.h" |
25 #include "calendaycommonheaders.h" |
26 |
26 |
|
27 #ifdef CALENVIEWS_DLL |
|
28 #define CALENDAYCONTENTSCROLLAREA_EXPORT Q_DECL_EXPORT |
|
29 #else |
|
30 #define CALENDAYCONTENTSCROLLAREA_EXPORT Q_DECL_IMPORT |
|
31 #endif |
|
32 |
27 // Class declaration |
33 // Class declaration |
28 class CalenDayContentScrollArea : public HbScrollArea |
34 class CALENDAYCONTENTSCROLLAREA_EXPORT CalenDayContentScrollArea : public HbScrollArea |
29 { |
35 { |
30 Q_OBJECT |
36 Q_OBJECT |
31 |
37 |
32 public: |
38 public: |
33 CalenDayContentScrollArea(QGraphicsItem *parent = 0); |
39 CalenDayContentScrollArea(QGraphicsItem *parent = 0); |
34 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 }; |
35 |
53 |
36 signals: |
54 signals: |
37 void scrollAreaMoveStarted(CalenScrollDirection scrollTo); |
55 void scrollAreaMoveStarted(CalenScrollDirection scrollTo); |
38 void scrollAreaMoveFinished(CalenScrollDirection scrollTo); |
56 void scrollAreaMoveFinished(CalenScrollDirection scrollTo); |
39 |
57 |
48 bool event(QEvent *e); |
66 bool event(QEvent *e); |
49 |
67 |
50 private: // private functions |
68 private: // private functions |
51 void checkPanDirection(QPanGesture *panGesture); |
69 void checkPanDirection(QPanGesture *panGesture); |
52 void moveTo(const QPointF &newPosition, int time = 0); |
70 void moveTo(const QPointF &newPosition, int time = 0); |
|
71 bool isHorizontalSwipe(qreal angle) const; |
53 |
72 |
54 private slots: |
73 private slots: |
55 void moveFinished(); |
74 void moveFinished(); |
56 void orientationChanged(Qt::Orientation orientation); |
75 void orientationChanged(Qt::Orientation orientation); |
57 |
76 |