|
1 /* |
|
2 * Copyright (c) 2010 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 |
|
18 #ifndef ENGINEWRAPPER_H |
|
19 #define ENGINEWRAPPER_H |
|
20 |
|
21 #include <qstringlist.h> |
|
22 #include <qabstractitemmodel.h> |
|
23 #include <qlist.h> |
|
24 #include <coecntrl.h> |
|
25 |
|
26 #include "launcherengine.h" |
|
27 |
|
28 class HbProgressDialog; |
|
29 class HbDeviceProgressDialog; |
|
30 class HbAction; |
|
31 |
|
32 class LauncherMainWindow; |
|
33 |
|
34 |
|
35 class EngineWrapper : public QObject, public MLauncherUI |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 EngineWrapper(LauncherMainWindow* mainWindow); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 ~EngineWrapper(); |
|
50 |
|
51 /** |
|
52 * Initializes Engine Wrapper |
|
53 * @return true if engine was started successfully |
|
54 */ |
|
55 bool init(); |
|
56 |
|
57 public: |
|
58 // functions that are called from UI |
|
59 |
|
60 /** |
|
61 * Fetches list of applications from engine |
|
62 */ |
|
63 bool listOfAllApps(QStringList &allAppsQStringList); |
|
64 |
|
65 /** |
|
66 * Starts launching applications that are given as parameter |
|
67 */ |
|
68 bool startAppLaunching(const QModelIndexList &list, bool autoClose); |
|
69 |
|
70 /** |
|
71 * Sets engine to skip hidden applications when launching |
|
72 */ |
|
73 void setSkipHiddenAndEmbedOnly(bool skip); |
|
74 |
|
75 /** |
|
76 * Stops launching applications |
|
77 */ |
|
78 bool stopLaunching(); |
|
79 |
|
80 /** |
|
81 * Sends log |
|
82 */ |
|
83 bool sendLog(); |
|
84 |
|
85 /** |
|
86 * Deletes log |
|
87 */ |
|
88 bool deleteLog(); |
|
89 |
|
90 /** |
|
91 * Compares dll |
|
92 */ |
|
93 void compareDlls(); |
|
94 |
|
95 /** |
|
96 * Sends list of dlls |
|
97 */ |
|
98 bool sendListOfDlls(); |
|
99 |
|
100 public: |
|
101 // From MLauncherUIEngine |
|
102 // functions that are called from Engine |
|
103 |
|
104 /** |
|
105 * Shows error message with error text |
|
106 */ |
|
107 virtual void ShowErrorMessage(const TDesC& aText); |
|
108 |
|
109 /** |
|
110 * Shows information message with info text |
|
111 */ |
|
112 virtual void ShowInfoMessage(const TDesC& aText); |
|
113 |
|
114 /** |
|
115 * Shows progress bar with text |
|
116 */ |
|
117 virtual void ShowProgressBar(const TDesC& aText, TInt aMinimum = 0, TInt aMaximum = 0 ); |
|
118 |
|
119 /** |
|
120 * Sets progress bar value |
|
121 */ |
|
122 virtual void SetProgressBarValue(TInt aValue); |
|
123 |
|
124 /** |
|
125 * Hides progress bar |
|
126 */ |
|
127 virtual void HideProgressBar(); |
|
128 |
|
129 /** |
|
130 * Shows wait dialog with text |
|
131 */ |
|
132 virtual void ShowWaitDialog(const TDesC& aText); |
|
133 |
|
134 /** |
|
135 * Hides wait dialog |
|
136 */ |
|
137 virtual void HideWaitDialog(); |
|
138 |
|
139 /** |
|
140 * Changes focus to output view |
|
141 */ |
|
142 virtual void ChangeFocusToOutputView(); |
|
143 |
|
144 /** |
|
145 * Prints text to output views log |
|
146 */ |
|
147 virtual void PrintText(const TDesC& aText); |
|
148 |
|
149 public slots: |
|
150 void doCompareDlls(HbAction*); |
|
151 void CancelDllBCanalysis(); |
|
152 |
|
153 private: |
|
154 |
|
155 /** |
|
156 * Allocate CArrayFix and copy QList to it |
|
157 */ |
|
158 CArrayFix<TInt>* QModelIndexListToCArrayFixL(const QModelIndexList& qlist); |
|
159 |
|
160 private: |
|
161 CLauncherEngine *mEngine; |
|
162 LauncherMainWindow *mMainWindow; |
|
163 HbProgressDialog* mProgressDialog; |
|
164 HbDeviceProgressDialog* mWaitDialog; |
|
165 }; |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 #endif //ENGINEWRAPPER_H |