|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef CXUICAPTUREKEYHANDLER_H |
|
18 #define CXUICAPTUREKEYHANDLER_H |
|
19 |
|
20 #include <QObject> |
|
21 |
|
22 class RWsSession; |
|
23 class RWindowGroup; |
|
24 class QEvent; |
|
25 class CxeEngine; |
|
26 |
|
27 |
|
28 class CxuiCaptureKeyHandler : public QObject |
|
29 { |
|
30 Q_OBJECT |
|
31 public: |
|
32 CxuiCaptureKeyHandler(CxeEngine &aEngine); |
|
33 virtual ~CxuiCaptureKeyHandler(); |
|
34 |
|
35 public: |
|
36 bool isAutofocusKeyPressed(); |
|
37 bool isCaptureKeyPressed(); |
|
38 |
|
39 bool handleKeyEvent(QEvent *event); |
|
40 |
|
41 signals: |
|
42 // Note that these signals should be connected to view classes only, because |
|
43 // CxuiViewManager will handle all signal connections and disconnections |
|
44 void autofocusKeyPressed(); |
|
45 void autofocusKeyReleased(); |
|
46 void captureKeyPressed(); |
|
47 void captureKeyReleased(); |
|
48 |
|
49 private: |
|
50 bool mAutofocusKeyPressed; |
|
51 bool mCaptureKeyPressed; |
|
52 |
|
53 QList<int> mCapturedKeyHandles; |
|
54 QList<int> mCapturedKeyUpDownHandles; |
|
55 |
|
56 QList<int> mPrimaryCameraAutofocusKeys; |
|
57 QList<int> mPrimaryCameraCaptureKeys; |
|
58 QList<int> mSecondaryCameraCaptureKeys; |
|
59 |
|
60 CxeEngine &mEngine; |
|
61 |
|
62 RWsSession &mWsSession; // not own |
|
63 RWindowGroup &mWindowGroup; // not own |
|
64 }; |
|
65 |
|
66 #endif // CXUICAPTUREKEYHANDLER_H |