|
1 /* |
|
2 * Copyright (c) 2007 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: Application UI class implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <avkon.hrh> |
|
20 #include "devdiag.pan" |
|
21 #include "devdiagappappui.h" |
|
22 #include "devdiagsuiteview.h" |
|
23 #include "devdiagapp.hrh" |
|
24 #include "devdiagappdocument.h" |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // ConstructL is called by the application framework |
|
28 // --------------------------------------------------------------------------- |
|
29 void CDevDiagAppAppUi::ConstructL() |
|
30 { |
|
31 //LOGSTRING("CDevDiagAppAppUi::ConstructL"); |
|
32 BaseConstructL( EAknEnableSkin | EAknEnableMSK ); |
|
33 |
|
34 // Get the document so we can access the application engine. |
|
35 CDevDiagAppDocument* document = static_cast< CDevDiagAppDocument* > |
|
36 ( Document() ); |
|
37 //Plugin view is created by the suite view. |
|
38 iSuiteView = CDevDiagSuiteView::NewL( document->Engine() ); |
|
39 |
|
40 AddViewL( iSuiteView ); |
|
41 |
|
42 SetDefaultViewL( *iSuiteView ); |
|
43 } |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // Constructor. |
|
47 // --------------------------------------------------------------------------- |
|
48 CDevDiagAppAppUi::CDevDiagAppAppUi() |
|
49 { |
|
50 |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // Destructor. |
|
55 // --------------------------------------------------------------------------- |
|
56 CDevDiagAppAppUi::~CDevDiagAppAppUi() |
|
57 { |
|
58 |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // handle any menu commands. |
|
63 // --------------------------------------------------------------------------- |
|
64 |
|
65 void CDevDiagAppAppUi::HandleCommandL(TInt aCommand) |
|
66 { |
|
67 switch(aCommand) |
|
68 { |
|
69 case EAknSoftkeyBack: |
|
70 { |
|
71 Exit(); |
|
72 |
|
73 break; |
|
74 } |
|
75 |
|
76 case EEikCmdExit: |
|
77 case EAknSoftkeyExit: |
|
78 Exit(); |
|
79 break; |
|
80 |
|
81 default: |
|
82 Panic(EDevDiagApplicationUnhandledCommand); |
|
83 break; |
|
84 } |
|
85 } |
|
86 |
|
87 |
|
88 |