equal
deleted
inserted
replaced
25 #include <QtCore> |
25 #include <QtCore> |
26 #include "qstmgesturedefs.h" |
26 #include "qstmgesturedefs.h" |
27 |
27 |
28 namespace qstmUiEventEngine |
28 namespace qstmUiEventEngine |
29 { |
29 { |
30 static const int KMaxNumberOfPointers(5) ; // How many of these should we have in multi-touch case |
30 static const int KMaxNumberOfPointers(2) ; // How many of these should we have in multi-touch case |
31 |
31 |
32 enum QStm_UiEventCode |
32 enum QStm_UiEventCode |
33 { |
33 { |
34 ETouch = 0x01, |
34 ETouch = 0x01, |
35 EHold = 0x02, |
35 EHold = 0x02, |
60 EButton3Down, |
60 EButton3Down, |
61 EButton3Up, |
61 EButton3Up, |
62 EDrag, |
62 EDrag, |
63 EMove, |
63 EMove, |
64 EButtonRepeat, |
64 EButtonRepeat, |
65 ESwitchOn, |
65 ESwitchOn |
66 }; |
66 }; |
|
67 enum Modifiers { |
|
68 EModifierLeftCtrl=0x00000020, /**< Left Control (Ctrl) key.*/ |
|
69 EModifierRightCtrl=0x00000040, /**< Right Control (Ctrl) key.*/ |
|
70 EModifierCtrl=0x00000080, /**< Single Control (Ctrl) key.*/ |
|
71 }; |
67 PEType m_type; |
72 PEType m_type; |
68 unsigned int m_modifiers; |
73 unsigned int m_modifiers; |
69 QPoint m_position; |
74 QPoint m_position; |
70 int m_pointerNumber; |
75 int m_pointerNumber; |
71 void* m_target; |
76 void* m_target; |
163 |
168 |
164 virtual QPointF speedVec() const = 0; |
169 virtual QPointF speedVec() const = 0; |
165 virtual void setSpeedVec(QPointF speedVec) = 0; |
170 virtual void setSpeedVec(QPointF speedVec) = 0; |
166 virtual QEvent::Type mapToMouseEventType() = 0; |
171 virtual QEvent::Type mapToMouseEventType() = 0; |
167 virtual QEvent::Type mapToTouchEventType() = 0; |
172 virtual QEvent::Type mapToTouchEventType() = 0; |
|
173 virtual unsigned int getModifiers() = 0; |
168 |
174 |
169 }; |
175 }; |
170 |
176 |
171 /** |
177 /** |
172 * Observer that will be notified when UI events have been recognised |
178 * Observer that will be notified when UI events have been recognised |