62 class QMacSwipeGestureRecognizer : public QGestureRecognizer |
62 class QMacSwipeGestureRecognizer : public QGestureRecognizer |
63 { |
63 { |
64 public: |
64 public: |
65 QMacSwipeGestureRecognizer(); |
65 QMacSwipeGestureRecognizer(); |
66 |
66 |
67 QGesture *createGesture(QObject *target); |
67 QGesture *create(QObject *target); |
68 QGestureRecognizer::Result filterEvent(QGesture *gesture, QObject *watched, QEvent *event); |
68 QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event); |
69 void reset(QGesture *gesture); |
69 void reset(QGesture *gesture); |
70 }; |
70 }; |
71 |
71 |
72 class QMacPinchGestureRecognizer : public QGestureRecognizer |
72 class QMacPinchGestureRecognizer : public QGestureRecognizer |
73 { |
73 { |
74 public: |
74 public: |
75 QMacPinchGestureRecognizer(); |
75 QMacPinchGestureRecognizer(); |
76 |
76 |
77 QGesture *createGesture(QObject *target); |
77 QGesture *create(QObject *target); |
78 QGestureRecognizer::Result filterEvent(QGesture *gesture, QObject *watched, QEvent *event); |
78 QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event); |
79 void reset(QGesture *gesture); |
79 void reset(QGesture *gesture); |
80 }; |
80 }; |
81 |
81 |
82 #if defined(QT_MAC_USE_COCOA) |
82 #if defined(QT_MAC_USE_COCOA) |
83 |
83 |
84 class QMacPanGestureRecognizer : public QObject, public QGestureRecognizer |
84 class QMacPanGestureRecognizer : public QObject, public QGestureRecognizer |
85 { |
85 { |
86 public: |
86 public: |
87 QMacPanGestureRecognizer(); |
87 QMacPanGestureRecognizer(); |
88 |
88 |
89 QGesture *createGesture(QObject *target); |
89 QGesture *create(QObject *target); |
90 QGestureRecognizer::Result filterEvent(QGesture *gesture, QObject *watched, QEvent *event); |
90 QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event); |
91 void reset(QGesture *gesture); |
91 void reset(QGesture *gesture); |
92 private: |
92 private: |
93 QPointF _startPos; |
93 QPointF _startPos; |
94 QPointF _lastPos; |
|
95 QBasicTimer _panTimer; |
94 QBasicTimer _panTimer; |
96 bool _panCanceled; |
95 bool _panCanceled; |
97 }; |
96 }; |
98 |
97 |
99 #endif |
98 #endif |