38 { |
40 { |
39 |
41 |
40 public: |
42 public: |
41 KeyCapturePrivate(); |
43 KeyCapturePrivate(); |
42 ~KeyCapturePrivate(); |
44 ~KeyCapturePrivate(); |
|
45 |
|
46 bool initRemote(XQKeyCapture::CapturingFlags); |
43 |
47 |
|
48 bool closeRemote(XQKeyCapture::CapturingFlags); |
|
49 |
44 bool captureKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
50 bool captureKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
45 Qt::KeyboardModifiers aModifier); |
51 Qt::KeyboardModifiers aModifier); |
46 |
52 |
47 bool captureKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
53 bool captureKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
48 Qt::KeyboardModifiers aModifier); |
54 Qt::KeyboardModifiers aModifier); |
49 |
55 |
50 bool captureLongKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
56 bool captureLongKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMask, |
51 Qt::KeyboardModifiers aModifier, XqKeyCapture::LongFlags aLongType); |
57 Qt::KeyboardModifiers aModifier, XQKeyCapture::LongFlags aLongType); |
52 |
58 |
53 bool captureLongKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
59 bool captureLongKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
54 Qt::KeyboardModifiers aModifier, XqKeyCapture::LongFlags aLongType); |
60 Qt::KeyboardModifiers aModifier, XQKeyCapture::LongFlags aLongType); |
55 |
61 |
56 bool captureKeyUpAndDowns(Qt::Key aKey, |
62 bool captureKeyUpAndDowns(Qt::Key aKey, |
57 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
63 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
58 |
64 |
59 bool captureKeyUpAndDowns(TUint aKey, |
65 bool captureKeyUpAndDowns(TUint aKey, |
65 bool cancelCaptureKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
71 bool cancelCaptureKey(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
66 Qt::KeyboardModifiers aModifier); |
72 Qt::KeyboardModifiers aModifier); |
67 |
73 |
68 bool cancelCaptureLongKey(Qt::Key aKey, |
74 bool cancelCaptureLongKey(Qt::Key aKey, |
69 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
75 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
70 XqKeyCapture::LongFlags aLongType); |
76 XQKeyCapture::LongFlags aLongType); |
71 |
77 |
72 bool cancelCaptureLongKey(TUint aKey, |
78 bool cancelCaptureLongKey(TUint aKey, |
73 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
79 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
74 XqKeyCapture::LongFlags aLongType); |
80 XQKeyCapture::LongFlags aLongType); |
75 |
81 |
76 bool cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
82 bool cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
77 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
83 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier); |
78 |
84 |
79 bool cancelCaptureKeyUpAndDowns(TUint aKey, |
85 bool cancelCaptureKeyUpAndDowns(TUint aKey, |
83 |
89 |
84 int errorId() const; |
90 int errorId() const; |
85 |
91 |
86 private: |
92 private: |
87 |
93 |
|
94 bool resetRemote(); |
|
95 |
88 bool doCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
96 bool doCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
89 Qt::KeyboardModifiers aModifier, |
97 Qt::KeyboardModifiers aModifier, |
90 CaptureRequest::CaptureRequestType type, |
98 CaptureRequest::CaptureRequestType type, |
91 XqKeyCapture::LongFlags aLongType = |
99 XQKeyCapture::LongFlags aLongType = |
92 XqKeyCapture::LongWaitNotApplicable); |
100 XQKeyCapture::LongWaitNotApplicable); |
93 |
101 |
94 bool doCancelCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
102 bool doCancelCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask, |
95 Qt::KeyboardModifiers aModifier, |
103 Qt::KeyboardModifiers aModifier, |
96 CaptureRequest::CaptureRequestType type, |
104 CaptureRequest::CaptureRequestType type, |
97 XqKeyCapture::LongFlags aLongType = |
105 XQKeyCapture::LongFlags aLongType = |
98 XqKeyCapture::LongWaitNotApplicable); |
106 XQKeyCapture::LongWaitNotApplicable); |
99 |
107 |
100 void regenerateError(); |
108 void regenerateError(); |
101 |
109 |
102 private: |
110 private: |
103 int mLastError; |
111 int mLastError; |