|
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 CXUITEST_H |
|
18 #define CXUITEST_H |
|
19 |
|
20 #include <QObject> |
|
21 #include <hbview.h> |
|
22 #include "cxeengine.h" |
|
23 #include "cxuiviewmanagertest.h" |
|
24 #include "cxuiviewmanager.h" |
|
25 |
|
26 class CxeEngine; |
|
27 class QGraphicsWidget; |
|
28 class HbMainWindow; |
|
29 class CxuiViewManager; |
|
30 |
|
31 class TestCxUi : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 private slots: |
|
36 // Called before each test case |
|
37 //void init(); |
|
38 // Called first before first test case |
|
39 void initTestCase(); |
|
40 // Called after every testfunction |
|
41 void cleanup(); |
|
42 // Called after the last testfunction was executed. |
|
43 void cleanupTestCase(); |
|
44 |
|
45 // Inits still image mode |
|
46 //void initStillImageMode(); |
|
47 |
|
48 // Tests for CxuiViewManager class |
|
49 void testViewManager(); |
|
50 void testCaptureKeyInImageMode(); |
|
51 // This is implemented in cxuitest.cpp |
|
52 void initVideoMode(); |
|
53 void testCaptureKeyInVideoMode(); |
|
54 |
|
55 signals: |
|
56 void toPrecaptureView(); |
|
57 void toPostcaptureView(); |
|
58 |
|
59 private: |
|
60 void sendCameraKeyEvent(QEvent::Type event = QEvent::None); |
|
61 void sendAutofocusKeyEvent(QEvent::Type event); |
|
62 |
|
63 private: |
|
64 HbMainWindow *mMainWindow; |
|
65 CxuiCaptureKeyHandler *mKeyHandler; |
|
66 CxuiFakeEngine *mEngineFake; |
|
67 CxuiViewManager *mViewManager; |
|
68 }; |
|
69 |
|
70 #endif // CXEENGINETEST_H |