|
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 CTestSetMenuView class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TESTSETMENUVIEW_H |
|
19 #define TESTSETMENUVIEW_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "View.h" |
|
23 #include <eiklbo.h> // MEikListBoxObserver |
|
24 #include <aknnavide.h> |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CTestSetMenuContainer; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * CTestCaseMenuView view class. |
|
34 */ |
|
35 class CTestSetMenuView : public CView, public MEikListBoxObserver |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Symbian OS default constructor. |
|
41 */ |
|
42 void ConstructL(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CTestSetMenuView(); |
|
48 |
|
49 public: // Functions from base classes |
|
50 |
|
51 /** |
|
52 * Returns view´s id. |
|
53 * @return View id. |
|
54 */ |
|
55 TUid Id() const; |
|
56 |
|
57 /** |
|
58 * Handles a command. |
|
59 * @param aCommand A command ID. |
|
60 */ |
|
61 void HandleCommandL( TInt aCommand ); |
|
62 |
|
63 /** |
|
64 * Handles client rect changes. |
|
65 */ |
|
66 void HandleClientRectChange(); |
|
67 |
|
68 public: // From MEikListBoxObserver |
|
69 |
|
70 /** |
|
71 * Handles list box event. |
|
72 * @param aListBox Pointer to list box. |
|
73 * @param aEventType List box event. |
|
74 */ |
|
75 void HandleListBoxEventL(CEikListBox* aListBox, |
|
76 TListBoxEvent aEventType); |
|
77 |
|
78 public: // New functions |
|
79 |
|
80 /** |
|
81 * Starts all cases in active test set. |
|
82 */ |
|
83 void StartTestSetL(); |
|
84 |
|
85 /** |
|
86 * Removes selected test cases from active test set. |
|
87 */ |
|
88 void RemoveSelectedTestCasesL(); |
|
89 |
|
90 /** |
|
91 * Creates new test set. |
|
92 * @param aTestSetName Name of the test set. |
|
93 * @return Symbian OS error code. |
|
94 . */ |
|
95 TInt CreateTestSetL( const TDesC& aTestSetName ); |
|
96 |
|
97 /** |
|
98 * Loads saved test set. |
|
99 * @param aTestSetName Name of the test set. |
|
100 * @return Symbian OS error code. |
|
101 */ |
|
102 TInt LoadTestSetL( const TDesC& aTestSetName ); |
|
103 |
|
104 /** |
|
105 * Saves current test set. |
|
106 * @return Symbian OS error code. |
|
107 */ |
|
108 TInt SaveCurrentTestSetL(); |
|
109 |
|
110 /** |
|
111 * Removes current test set. |
|
112 * @return Symbian OS error code. |
|
113 */ |
|
114 TInt RemoveActiveTestSet(); |
|
115 |
|
116 /** |
|
117 * Get name of the current test set. |
|
118 * @return Name of the current test set. |
|
119 */ |
|
120 inline const TDesC& CurrentTestSet() |
|
121 { return iCurrentTestSet; } |
|
122 |
|
123 /** |
|
124 * Set save needed flag. |
|
125 */ |
|
126 inline void SetSaveNeeded( TBool aSave ) |
|
127 { iSaveNeeded = aSave; } |
|
128 |
|
129 private: // From AknView |
|
130 |
|
131 /** |
|
132 * Initializes view when activated. |
|
133 * @param aPrevViewId Id of the previous view (not used). |
|
134 * @param aCustomMessageId Custom message id (not used). |
|
135 * @param aCustomMessage Custom message (not used). |
|
136 */ |
|
137 void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, |
|
138 const TDesC8& aCustomMessage); |
|
139 |
|
140 /** |
|
141 * Deactivates view. |
|
142 */ |
|
143 void DoDeactivate(); |
|
144 |
|
145 private: // From MEikMenuObserver |
|
146 |
|
147 /** |
|
148 * Initializes menu pane. |
|
149 * @param aResourceId Menu pane resource ID. |
|
150 * @param aMenuPane Menu pane pointer. |
|
151 */ |
|
152 void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
153 |
|
154 private: // Data |
|
155 CAknNavigationDecorator* iNaviDecorator; |
|
156 CTestSetMenuContainer* iContainer; |
|
157 CUIStore* iUIStore; |
|
158 TInt iCurrentTestCase; |
|
159 TInt iTestSetIndex; |
|
160 TBuf<50> iCurrentTestSet; |
|
161 TBool iSaveNeeded; |
|
162 |
|
163 }; |
|
164 |
|
165 #endif // TESTSETMENUVIEW_H |
|
166 |
|
167 // End of File |