|
1 /* |
|
2 * Copyright (c) 2008 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: CAlfPerfAppAppUi implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <avkon.hrh> |
|
20 #include <alfperfapp.rsg> |
|
21 #include "alfperfappappui.h" |
|
22 #include "alfperfappmodel.h" |
|
23 |
|
24 #include "alfperfapptestcaseselectionview.h" |
|
25 #include "alfperfapptestcaseexecutionview.h" |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 CAlfPerfAppAppUi::CAlfPerfAppAppUi( CAlfPerfAppModel& aModel ) |
|
30 : iModel( aModel ) |
|
31 { |
|
32 } |
|
33 |
|
34 CAlfPerfAppAppUi::~CAlfPerfAppAppUi() |
|
35 { |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // Constructs the application. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 void CAlfPerfAppAppUi::ConstructL() |
|
43 { |
|
44 CAknViewAppUi::BaseConstructL( EAknEnableSkin | EAknEnableMSK ); |
|
45 iModel.LoadTestSetL( R_ALFPERFAPP_TESTSET ); |
|
46 |
|
47 CAlfPerfAppTestCaseSelectionView* selectionView = |
|
48 CAlfPerfAppTestCaseSelectionView::NewLC( iModel ); |
|
49 AddViewL( selectionView ); |
|
50 CleanupStack::Pop( selectionView ); |
|
51 SetDefaultViewL( *selectionView ); |
|
52 |
|
53 CAlfPerfAppTestCaseExecutionView* executionView = |
|
54 CAlfPerfAppTestCaseExecutionView::NewLC( iModel ); |
|
55 AddViewL( executionView ); |
|
56 CleanupStack::Pop( executionView ); |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // Common commands are handled here. |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void CAlfPerfAppAppUi::HandleCommandL( TInt aCommand ) |
|
64 { |
|
65 switch ( aCommand ) |
|
66 { |
|
67 case EAknSoftkeyExit: |
|
68 case EAknCmdExit: |
|
69 case EEikCmdExit: |
|
70 Exit(); |
|
71 break; |
|
72 |
|
73 default: |
|
74 break; |
|
75 } |
|
76 } |
|
77 |
|
78 void CAlfPerfAppAppUi::HandleResourceChangeL( TInt aType ) |
|
79 { |
|
80 CAknViewAppUi::HandleResourceChangeL( aType ); |
|
81 } |