|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
|
19 * |
|
20 */ |
|
21 |
|
22 #include "xqkeycapture.h" |
|
23 |
|
24 #include "keycapture_p.h" |
|
25 #include <qnamespace.h> |
|
26 |
|
27 XqKeyCapture::XqKeyCapture() : |
|
28 d(new KeyCapturePrivate()) |
|
29 { |
|
30 |
|
31 } |
|
32 |
|
33 XqKeyCapture::~XqKeyCapture() |
|
34 { |
|
35 delete d; |
|
36 } |
|
37 |
|
38 bool XqKeyCapture::captureKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMap, |
|
39 Qt::KeyboardModifiers aModifier) |
|
40 { |
|
41 return d->captureKey(aKey, aModifiersMap, aModifier); |
|
42 } |
|
43 |
|
44 bool XqKeyCapture::captureLongKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMap, |
|
45 Qt::KeyboardModifiers aModifier, XqKeyCapture::LongFlags aLongType) |
|
46 { |
|
47 return d->captureLongKey(aKey, aModifiersMap, aModifier, aLongType); |
|
48 } |
|
49 |
|
50 bool XqKeyCapture::captureKeyUpAndDowns(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMap, |
|
51 Qt::KeyboardModifiers aModifier) |
|
52 { |
|
53 return d->captureKeyUpAndDowns(aKey, aModifiersMap, aModifier); |
|
54 } |
|
55 |
|
56 bool XqKeyCapture::cancelCaptureKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMap, |
|
57 Qt::KeyboardModifiers aModifier) |
|
58 { |
|
59 return d->cancelCaptureKey(aKey, aModifiersMap, aModifier); |
|
60 } |
|
61 |
|
62 bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMap, |
|
63 Qt::KeyboardModifiers aModifier, XqKeyCapture::LongFlags aLongType) |
|
64 { |
|
65 return d->cancelCaptureLongKey(aKey, aModifiersMap, aModifier, aLongType); |
|
66 } |
|
67 |
|
68 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey, Qt::KeyboardModifiers aModifiersMap, |
|
69 Qt::KeyboardModifiers aModifier) |
|
70 { |
|
71 return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMap, aModifier); |
|
72 } |
|
73 |
|
74 QString XqKeyCapture::errorString() const |
|
75 { |
|
76 return d->errorString(); |
|
77 } |
|
78 |
|
79 int XqKeyCapture::errorId() const |
|
80 { |
|
81 return d->errorId(); |
|
82 } |