|
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: This file contains CAppUIAppUi class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef APPUIAPPUI_H |
|
19 #define APPUIAPPUI_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <eikapp.h> |
|
23 #include <e32std.h> |
|
24 #include <aknViewAppUi.h> |
|
25 #include <akntabgrp.h> |
|
26 #include <aknnavide.h> |
|
27 #include <StifLogger.h> |
|
28 #include "Stifui.hrh" |
|
29 |
|
30 //#include "UIStoreIf.h" |
|
31 //#include "UIStore.h" |
|
32 //#include "UIEngine.h" |
|
33 //#include "SettingServerClient.h" |
|
34 |
|
35 #include <stifinternal/UIStoreIf.h> |
|
36 #include <stifinternal/UIStore.h> |
|
37 #include <stifinternal/UIEngine.h> |
|
38 #include <SettingServerClient.h> |
|
39 |
|
40 #include "UIStoreHandler.h" |
|
41 |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 class CAppUIContainer; |
|
45 class CUIStoreHandler; |
|
46 |
|
47 // CONSTANTS |
|
48 //const ?type ?constant_var = ?constant; |
|
49 _LIT( KDefaultPathAndIni, "C:\\TestFramework\\TestFramework.ini" ); |
|
50 |
|
51 // CLASS DECLARATION |
|
52 |
|
53 |
|
54 /** |
|
55 * Class contains static methods for calling different |
|
56 * types of message dialog boxes. |
|
57 */ |
|
58 class TMessageBoxUtil |
|
59 { |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Display message that executed funtion is not implemented yet. |
|
64 */ |
|
65 static void ShowNotImplementedYetL(); |
|
66 |
|
67 /** |
|
68 * Display error note. |
|
69 * @param aMessage Error message to display. |
|
70 */ |
|
71 static void ShowErrorNoteL( const TDesC& aMessage ); |
|
72 }; |
|
73 |
|
74 |
|
75 /** |
|
76 * Application UI class. |
|
77 * Provides support for the following features: |
|
78 * - EIKON control architecture |
|
79 * - view architecture |
|
80 * - status pane |
|
81 * |
|
82 */ |
|
83 class CAppUIAppUi : public CAknViewAppUi |
|
84 { |
|
85 public: // Constructors and destructor |
|
86 |
|
87 /** |
|
88 * Symbian OS default constructor. |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 /** |
|
93 * Destructor. |
|
94 */ |
|
95 ~CAppUIAppUi(); |
|
96 |
|
97 public: // New functions |
|
98 |
|
99 /** |
|
100 * Returns pointer to UIStoreHandler object, |
|
101 * which handles test cases and test modules. |
|
102 * @return UIStoreHandler to CData object |
|
103 */ |
|
104 CUIStore* UIStoreHandler(); |
|
105 |
|
106 /** |
|
107 * Shows outputs of the test case. |
|
108 * @param aTestCase Pointer to started test case. |
|
109 */ |
|
110 void ShowTestCaseOutput(CStartedTestCase* aTestCase); |
|
111 |
|
112 /** |
|
113 * Receives output update notification from CData. |
|
114 * @param aTestCase Pointer to started test case. |
|
115 * @param aStatus Status. |
|
116 */ |
|
117 void OutputUpdateL( CStartedTestCase* aTestCase, TInt aStatus ); |
|
118 |
|
119 /** |
|
120 * Sets pointer to selected test case for viewing output. |
|
121 * @param aStartedCase Pointer to started test case. |
|
122 */ |
|
123 void SetStartedTestCase( CStartedTestCase* aStartedCase ); |
|
124 |
|
125 /** |
|
126 * Returns pointer to started test case for viewing output. |
|
127 * @return Poiner to started test case. |
|
128 */ |
|
129 CStartedTestCase* GetStartedTestCase( ); |
|
130 |
|
131 /** |
|
132 * Saves position of focus of any specific view |
|
133 * @param aViewId ID of view under which the position will be stored |
|
134 * @param aPosition is a number to be stored |
|
135 */ |
|
136 void SaveFocusPosition(TAppUIViewNumber aViewId, TInt aPosition); |
|
137 |
|
138 /** |
|
139 * Used to retrieve previous focus position in a specific view |
|
140 * @param aViewId - ID of view that the position should be retrieved for |
|
141 * @return the previous focus position |
|
142 */ |
|
143 TInt GetFocusPosition(TAppUIViewNumber aViewId); |
|
144 |
|
145 |
|
146 public: // Functions from base classes |
|
147 |
|
148 private: |
|
149 /** |
|
150 * Initializes menu pane. |
|
151 * @param aResourceId Menu pane resource ID. |
|
152 * @param aMenuPane Menu pane pointer. |
|
153 */ |
|
154 void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
155 |
|
156 private: |
|
157 /** |
|
158 * From CEikAppUi, takes care of command handling. |
|
159 * @param aCommand command to be handled |
|
160 */ |
|
161 void HandleCommandL(TInt aCommand); |
|
162 |
|
163 /** |
|
164 * From CEikAppUi, handles key events. |
|
165 * @param aKeyEvent Event to handled. |
|
166 * @param aType Type of the key event. |
|
167 * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). |
|
168 */ |
|
169 virtual TKeyResponse HandleKeyEventL( |
|
170 const TKeyEvent& aKeyEvent,TEventCode aType); |
|
171 |
|
172 private: //Data |
|
173 CUIStoreHandler* iUIStoreHandler; |
|
174 CStartedTestCase* iStartedTestCase; |
|
175 TInt iPreviousView; // For Back function |
|
176 |
|
177 RArray<TInt> iPreviousFocusPosition; |
|
178 // used to store positions in different views |
|
179 |
|
180 TBool iPreviousPositionListValid; |
|
181 // used to mark validity of iPreviousFocusPosition array |
|
182 |
|
183 public: //Data |
|
184 |
|
185 /** |
|
186 * Pointer to logger. |
|
187 */ |
|
188 CStifLogger* iLogger; |
|
189 |
|
190 /** |
|
191 * Mode of view started cases. |
|
192 */ |
|
193 TInt /*enum TShowStartedCasesMode*/ iShowStartedCasesMode; |
|
194 |
|
195 /** |
|
196 * Index of started test set. |
|
197 */ |
|
198 TInt iStartedTestSet; |
|
199 |
|
200 /** |
|
201 * Handle to Setting server. |
|
202 */ |
|
203 RSettingServer iSettingServer; |
|
204 |
|
205 public: // Friend classes |
|
206 |
|
207 protected: // Friend classes |
|
208 |
|
209 private: // Friend classes |
|
210 |
|
211 // For iExecutedTestCaseCount moving |
|
212 friend class CStartCasesView; |
|
213 friend class CStatisticsView; |
|
214 friend class CTestCaseOutputView; |
|
215 friend class CTestSetInsertMenuView; |
|
216 friend class CTestSetMenuView; |
|
217 |
|
218 }; |
|
219 |
|
220 #endif |
|
221 |
|
222 // End of File |