equal
deleted
inserted
replaced
23 #define QSTMTAPGESTURERECOGNISER_H_ |
23 #define QSTMTAPGESTURERECOGNISER_H_ |
24 |
24 |
25 #include <qstmgestureengine_if.h> |
25 #include <qstmgestureengine_if.h> |
26 #include <qstmgesture_if.h> |
26 #include <qstmgesture_if.h> |
27 #include <qstmgesturelistener_if.h> |
27 #include <qstmgesturelistener_if.h> |
|
28 #include "uitimer.h" |
28 |
29 |
29 namespace qstmGesture |
30 namespace qstmGesture |
30 { |
31 { |
31 |
32 |
32 /*! |
33 /*! |
44 * has a doubletap listener, to that. |
45 * has a doubletap listener, to that. |
45 * Use separate listeners for tap and doubletap. |
46 * Use separate listeners for tap and doubletap. |
46 */ |
47 */ |
47 class QStm_TapGestureRecogniser : public QStm_GestureRecogniser |
48 class QStm_TapGestureRecogniser : public QStm_GestureRecogniser |
48 { |
49 { |
49 Q_OBJECT |
50 Q_OBJECT |
50 public: |
51 public: |
51 static const QStm_GestureUid KUid = EGestureUidTap; |
52 static const QStm_GestureUid KUid = EGestureUidTap; |
52 |
53 |
53 virtual ~QStm_TapGestureRecogniser(); |
54 virtual ~QStm_TapGestureRecogniser(); |
54 |
55 |
109 */ |
110 */ |
110 |
111 |
111 QStm_TapGestureRecogniser(QStm_GestureListenerIf* listener) ; |
112 QStm_TapGestureRecogniser(QStm_GestureListenerIf* listener) ; |
112 |
113 |
113 public slots: |
114 public slots: |
114 void timeoutCallback(); |
115 void uiTimerCallback(); |
115 |
116 |
116 private: |
117 private: |
117 bool m_loggingenabled ; |
118 bool m_loggingenabled ; |
118 bool isPointClose(const QPoint& firstPoint, const QPoint& secondPoint) ; |
119 bool isPointClose(const QPoint& firstPoint, const QPoint& secondPoint) ; |
119 private: |
120 private: |
120 void* m_powner ; // The owning control for this gesture |
121 void* m_powner ; // The owning control for this gesture |
121 bool m_waitingforsecondtap ; |
122 bool m_waitingforsecondtap ; |
122 QPoint m_firstTapXY ; |
123 QPoint m_firstTapXY ; |
|
124 QTime m_firstTimestamp; |
123 void* m_firstTapTarget ; |
125 void* m_firstTapTarget ; |
124 float m_firstTapSpeed ; |
126 float m_firstTapSpeed ; |
125 int m_doubleTapTimeout ; |
127 int m_doubleTapTimeout ; |
126 bool m_gestureEnabled ; |
128 bool m_gestureEnabled ; |
127 bool m_ignorefirst ; |
129 bool m_ignorefirst ; |
129 // use simple arrays to store the listeners and corresponding windows |
131 // use simple arrays to store the listeners and corresponding windows |
130 QList<QStm_GestureListenerIf*> m_tapListeners ; |
132 QList<QStm_GestureListenerIf*> m_tapListeners ; |
131 QList<void*> m_tapListenerWindows ; |
133 QList<void*> m_tapListenerWindows ; |
132 QList<QStm_GestureListenerIf*> m_doubleTapListeners ; |
134 QList<QStm_GestureListenerIf*> m_doubleTapListeners ; |
133 QList<void*> m_doubleTapListenerWindows ; |
135 QList<void*> m_doubleTapListenerWindows ; |
134 QTimer m_timer; |
136 UiTimer* m_timer; |
|
137 int m_numOfActiveStreams; |
135 }; |
138 }; |
136 |
139 |
137 } // namespace |
140 } // namespace |
138 |
141 |
139 #endif /* QSTMTAPGESTURERECOGNISER_H_ */ |
142 #endif /* QSTMTAPGESTURERECOGNISER_H_ */ |