45 |
45 |
46 bool initRemote(XQKeyCapture::CapturingFlags flags); |
46 bool initRemote(XQKeyCapture::CapturingFlags flags); |
47 |
47 |
48 bool closeRemote(XQKeyCapture::CapturingFlags flags); |
48 bool closeRemote(XQKeyCapture::CapturingFlags flags); |
49 |
49 |
50 bool captureKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
|
51 Qt::KeyboardModifiers aModifier); |
|
52 |
|
53 bool captureKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
|
54 Qt::KeyboardModifiers aModifier); |
|
55 |
|
56 bool captureLongKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
|
57 Qt::KeyboardModifiers aModifier, XQKeyCapture::LongFlags aLongType); |
|
58 |
|
59 bool captureLongKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
|
60 Qt::KeyboardModifiers aModifier, XQKeyCapture::LongFlags aLongType); |
|
61 |
|
62 bool captureKeyUpAndDowns(Qt::Key aKey, |
|
63 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
|
64 |
|
65 bool captureKeyUpAndDowns(TUint aKey, |
|
66 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
|
67 |
|
68 bool cancelCaptureKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
|
69 Qt::KeyboardModifiers aModifier); |
|
70 |
|
71 bool cancelCaptureKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
|
72 Qt::KeyboardModifiers aModifier); |
|
73 |
|
74 bool cancelCaptureLongKey(Qt::Key aKey, |
|
75 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
|
76 XQKeyCapture::LongFlags aLongType); |
|
77 |
|
78 bool cancelCaptureLongKey(TUint aKey, |
|
79 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
|
80 XQKeyCapture::LongFlags aLongType); |
|
81 |
|
82 bool cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
|
83 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
|
84 |
|
85 bool cancelCaptureKeyUpAndDowns(TUint aKey, |
|
86 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
|
87 |
|
88 QString errorString() const; |
50 QString errorString() const; |
89 |
51 |
90 int errorId() const; |
52 int errorId() const; |
91 |
53 |
92 private: |
54 private: |
93 static int mRemoteEventType_KeyPress; |
55 static int mRemoteEventType_KeyPress; |
94 static int mRemoteEventType_KeyRelease; |
56 static int mRemoteEventType_KeyRelease; |
95 |
57 |
96 private: |
58 private: |
97 |
|
98 bool resetRemote(XQKeyCapture::CapturingFlags flags); |
|
99 |
|
100 bool doCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
59 bool doCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
101 Qt::KeyboardModifiers aModifier, |
60 Qt::KeyboardModifiers aModifier, |
102 CaptureRequest::CaptureRequestType type, |
61 CaptureRequest::CaptureRequestType type, |
103 XQKeyCapture::LongFlags aLongType = |
62 XQKeyCapture::LongFlags aLongType = |
104 XQKeyCapture::LongWaitNotApplicable); |
63 XQKeyCapture::LongWaitNotApplicable); |
113 |
72 |
114 private: |
73 private: |
115 int mLastError; |
74 int mLastError; |
116 QString mLastErrorString; |
75 QString mLastErrorString; |
117 #ifndef _XQKEYCAPTURE_UNITTEST_ |
76 #ifndef _XQKEYCAPTURE_UNITTEST_ |
118 RWindowGroup* mWindowGroup; //not owned |
77 RWindowGroup& mWindowGroup; //not owned |
119 #else |
78 #else |
120 MyTestWindowGroup* mWindowGroup; |
79 MyTestWindowGroup& mWindowGroup; //not owned |
121 #endif |
80 #endif |
122 QList<CaptureRequest*> *mRequestsList; |
81 QList<CaptureRequest*> *mRequestsList; |
123 QKeyMapperPrivate* mMapper; |
82 QKeyMapper* mMapper; |
124 |
83 |
125 TargetWrapper *tgWrapper; |
84 TargetWrapper *tgWrapper; |
126 |
85 |
127 friend class XQKeyCapture; |
86 friend class XQKeyCapture; |
|
87 friend class XqKeyCapture; |
128 }; |
88 }; |
129 |
89 |
130 #endif /* KEYCAPTUREPRIVATE_S60_H */ |
90 #endif /* KEYCAPTUREPRIVATE_S60_H */ |