|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : LbsReferenceAppUi.cpp 00004 * Part of : LBSReference example application 00005 * Interface : 00006 * Description : This class functions as controller of the application 00007 * Version : 1.0 00008 * 00009 * Copyright (c) 2005-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 // INCLUDE FILES 00017 #include <avkon.hrh> 00018 #include "LBSReferenceAppUi.h" 00019 #include "LBSReferenceContainer.h" 00020 00021 00022 00023 // ================= MEMBER FUNCTIONS ======================= 00024 // 00025 // ---------------------------------------------------------- 00026 // CLbsReferenceAppUi::ConstructL() 00027 // Symbian OS two phased constructor 00028 // ---------------------------------------------------------- 00029 // 00030 void CLbsReferenceAppUi::ConstructL() 00031 { 00032 // Perform the base class construction 00033 BaseConstructL(EAknEnableSkin); 00034 00035 //Create container 00036 iAppContainer = new (ELeave) CLbsReferenceContainer; 00037 iAppContainer->SetMopParent(this); 00038 iAppContainer->ConstructL( ClientRect() ); 00039 00040 // Allow the appview to receive keyboard input 00041 AddToStackL( iAppContainer ); 00042 } 00043 00044 // ---------------------------------------------------- 00045 // CLbsReferenceAppUi::~CLbsReferenceAppUi() 00046 // Destructor 00047 // Frees reserved resources 00048 // ---------------------------------------------------- 00049 // 00050 CLbsReferenceAppUi::~CLbsReferenceAppUi() 00051 { 00052 // Cleanup 00053 if ( iAppContainer ) 00054 { 00055 //Remove from stack 00056 RemoveFromStack( iAppContainer ); 00057 00058 //Delete the object 00059 delete iAppContainer; 00060 } 00061 } 00062 00063 00064 // ---------------------------------------------------- 00065 // CLbsReferenceAppUi::HandleKeyEventL( 00066 // const TKeyEvent& aKeyEvent,TEventCode /*aType*/) 00067 // 00068 // ---------------------------------------------------- 00069 // 00070 TKeyResponse CLbsReferenceAppUi::HandleKeyEventL( 00071 const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/) 00072 { 00073 // The key event was not handled 00074 return EKeyWasNotConsumed; 00075 } 00076 00077 // ---------------------------------------------------- 00078 // CLbsReferenceAppUi::HandleCommandL(TInt aCommand) 00079 // 00080 // ---------------------------------------------------- 00081 // 00082 void CLbsReferenceAppUi::HandleCommandL(TInt aCommand) 00083 { 00084 switch ( aCommand ) 00085 { 00086 // Exit the application 00087 case EAknSoftkeyBack: 00088 case EAknSoftkeyExit: 00089 { 00090 //Exit 00091 Exit(); 00092 break; 00093 } 00094 // Do nothing. 00095 default: 00096 break; 00097 } 00098 } 00099 00100 // End of File
|
© Nokia 2006 |