1 /* |
|
2 * Copyright (c) 2002 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 * This is the implementation of the class defined in CCnvAppUi.h |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include <avkon.hrh> |
|
21 #include <hlplch.h> |
|
22 #include <featmgr.h> |
|
23 |
|
24 #include <Converter.rsg> |
|
25 |
|
26 #include "CCnvApplication.h" |
|
27 #include "CCnvAppUi.h" |
|
28 #include "CCnvMainForm.h" |
|
29 |
|
30 CCnvAppUi::CCnvAppUi() |
|
31 : iFormDeleted( EFalse ) |
|
32 { |
|
33 } |
|
34 |
|
35 CCnvAppUi::~CCnvAppUi() |
|
36 { |
|
37 // This can be done safely because the form never "self-destructs" |
|
38 // (exit is done via HandleCommandL( EEikCmdExit) below) |
|
39 if( !iFormDeleted ) |
|
40 { |
|
41 delete iMainForm; |
|
42 } |
|
43 FeatureManager::UnInitializeLib(); |
|
44 } |
|
45 |
|
46 void CCnvAppUi::ConstructL() |
|
47 { |
|
48 // Construct softkeys and menubar using the base class |
|
49 BaseConstructL( CAknAppUi::EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible); |
|
50 |
|
51 // Construct and show our main form |
|
52 iMainForm = new( ELeave ) CCnvMainForm( iFormDeleted ); |
|
53 iMainForm->ConstructL(); |
|
54 iMainForm->ExecuteLD( R_CNV_MAINFORM ); |
|
55 |
|
56 iMainForm->SetMopParent( this ); |
|
57 |
|
58 CAknAppUi::SetKeyBlockMode(ENoKeyBlock); |
|
59 |
|
60 FeatureManager::InitializeLibL(); |
|
61 } |
|
62 |
|
63 void CCnvAppUi::HandleCommandL( TInt aCommand ) |
|
64 { |
|
65 switch( aCommand ) |
|
66 { |
|
67 case EAknCmdHelp: |
|
68 { |
|
69 HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), |
|
70 AppHelpContextL() ); |
|
71 break; |
|
72 } |
|
73 case EEikCmdExit: |
|
74 case EAknCmdExit: |
|
75 { |
|
76 Exit(); |
|
77 break; |
|
78 } |
|
79 default: |
|
80 { |
|
81 break; |
|
82 } |
|
83 } |
|
84 } |
|