|
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 LCVIEWMANAGER_P_H |
|
18 #define LCVIEWMANAGER_P_H |
|
19 |
|
20 #include <QObject> |
|
21 |
|
22 class HbMainWindow; |
|
23 class LcUiEngine; |
|
24 class LcUiComponentRepository; |
|
25 class LcView; |
|
26 class HbAction; |
|
27 |
|
28 #include <hbmainwindow.h> |
|
29 |
|
30 class LcMainWindow : public HbMainWindow |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 |
|
36 LcMainWindow(); |
|
37 virtual ~LcMainWindow(); |
|
38 |
|
39 protected: // From QObject |
|
40 |
|
41 bool eventFilter ( QObject * watched, QEvent * event ); |
|
42 |
|
43 signals: |
|
44 |
|
45 void appFocusGained(); |
|
46 void appFocusLost(); |
|
47 |
|
48 private: |
|
49 friend class UT_LcUiViewManager; |
|
50 }; |
|
51 |
|
52 class LcViewManagerPrivate : public QObject |
|
53 { |
|
54 Q_OBJECT |
|
55 friend class UT_LcUiViewManager; |
|
56 |
|
57 public: |
|
58 |
|
59 explicit LcViewManagerPrivate(const QString &engineName, |
|
60 const QString &applicationDisplayName); |
|
61 ~LcViewManagerPrivate(); |
|
62 |
|
63 //this will close engine session asynchronously |
|
64 //when session is closed application will be also closed |
|
65 void terminateSession(); |
|
66 |
|
67 public slots: |
|
68 void changeView(); |
|
69 //for layout switch |
|
70 void prepareOrientationChange(); |
|
71 |
|
72 private slots: |
|
73 void closeApp(); |
|
74 void activateCurrentView(bool startup); |
|
75 |
|
76 private: |
|
77 |
|
78 void startEngine(); |
|
79 void setCurrentView(bool startup=false); |
|
80 LcView* currentView(); |
|
81 |
|
82 private: //data |
|
83 |
|
84 LcMainWindow mMainWindow; |
|
85 LcUiEngine* mEngine; |
|
86 LcUiComponentRepository* mRepository; |
|
87 |
|
88 private: |
|
89 friend class UT_LcUiViewManager; |
|
90 }; |
|
91 |
|
92 #endif // LCVIEWMANAGER_P_H |