|
Nokia N97 SDK Example Applications Guide |
#include <ccontappui.h>
Inheritance diagram for CContAppUi:

Definition at line 37 of file ccontappui.h.
Public Member Functions |
|
| void | ConstructL () |
| virtual | ~CContAppUi () |
Private Member Functions |
|
| void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
| void | HandleCommandL (TInt aCommand) |
| void | HandleResourceChangeL (TInt aType) |
| virtual TKeyResponse | HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
| void | UpdateTitleL (TInt aResourceId) |
Private Attributes |
|
| CContContainer * | iAppContainer |
|
|
Destructor Destructor is always virtual Definition at line 53 of file ccontappui.cpp. References iAppContainer. 00054 { 00055 if ( iAppContainer ) 00056 { 00057 RemoveFromStack( iAppContainer ); 00058 delete iAppContainer; 00059 } 00060 }
|
|
|
Default constructor Definition at line 37 of file ccontappui.cpp. References CContContainer::ConstructL(), and iAppContainer. 00038 { 00039 BaseConstructL(EAknEnableSkin); 00040 00041 iAppContainer = new (ELeave) CContContainer; 00042 iAppContainer->SetMopParent( this ); 00043 iAppContainer->ConstructL( ClientRect() ); 00044 AddToStackL( iAppContainer ); 00045 }
|
|
||||||||||||
|
From MEikMenuObserver
Definition at line 70 of file ccontappui.cpp.
|
|
|
From CEikAppUi, takes care of command handling
Definition at line 92 of file ccontappui.cpp. References CContContainer::AddContactToGrpL(), CContContainer::AddNewContactDlgL(), CContContainer::CanAddContactToGroupL(), CContContainer::CreateContactGroupL(), CContContainer::CreateContactTemplateL(), CContContainer::DeleteContactDlgL(), CContContainer::DeleteContactGroupL(), CContContainer::EditContactDlgL(), CContContainer::GetSelectedContactL(), iAppContainer, CContContainer::IfContactDbSelected(), CContContainer::OpenDefaultDatabaseL(), CContContainer::ShowContactGroupsL(), CContContainer::ShowContactsL(), and UpdateTitleL(). 00093 { 00094 switch ( aCommand ) 00095 { 00096 // flowtrough 00097 case EAknSoftkeyExit: 00098 case EEikCmdExit: 00099 Exit(); 00100 break; 00101 case EContactsDefaultDB: 00102 iAppContainer->OpenDefaultDatabaseL(); 00103 if ( iAppContainer->IfContactDbSelected() ) 00104 { 00105 UpdateTitleL( R_CONTACTS_DEFAULT_DB ); 00106 } 00107 else 00108 { 00109 UpdateTitleL( R_CONTACTS_NO_DB ); 00110 } 00111 break; 00112 case EContactsCreateTemplate: 00113 iAppContainer->CreateContactTemplateL(); 00114 break; 00115 case EContactsCreateContact: 00116 iAppContainer->AddNewContactDlgL(); 00117 break; 00118 case EContactsDeleteContact: 00119 iAppContainer->DeleteContactDlgL(); 00120 break; 00121 case EContactsEditContact: 00122 iAppContainer->EditContactDlgL(); 00123 break; 00124 case EContactsSelectGrp: 00125 if ( !iAppContainer->CanAddContactToGroupL() ) 00126 { 00127 return; 00128 } 00129 iAppContainer->GetSelectedContactL(); 00130 CEikonEnv::Static()->AppUiFactory()-> 00131 MenuBar()->SetMenuTitleResourceId( R_CONTACTS_SELECT_GRP_MENUBAR ); 00132 break; 00133 case EContactsAddContactToGrp: 00134 iAppContainer->AddContactToGrpL(); 00135 // Show contact on the listbox 00136 iAppContainer->ShowContactsL(); 00137 // Change menu 00138 CEikonEnv::Static()->AppUiFactory()-> 00139 MenuBar()->SetMenuTitleResourceId( R_CONTACTS_CONTACTS_MENUBAR ); 00140 break; 00141 case EContactsCancelSelectGrp: 00142 iAppContainer->ShowContactsL(); 00143 // Change menu back to original 00144 CEikonEnv::Static()->AppUiFactory()-> 00145 MenuBar()->SetMenuTitleResourceId( R_CONTACTS_CONTACTS_MENUBAR ); 00146 break; 00147 case EContactsShowContacts: 00148 iAppContainer->ShowContactsL(); 00149 CEikonEnv::Static()->AppUiFactory()-> 00150 MenuBar()->SetMenuTitleResourceId( R_CONTACTS_CONTACTS_MENUBAR ); 00151 break; 00152 case EContactsShowGroups: 00153 { 00154 iAppContainer->ShowContactGroupsL(); 00155 CEikonEnv::Static()->AppUiFactory()-> 00156 MenuBar()->SetMenuTitleResourceId( R_CONTACTS_GROUPS_MENUBAR ); 00157 } 00158 break; 00159 case EContactsCreateContactGroup: 00160 iAppContainer->CreateContactGroupL(); 00161 break; 00162 case EContactsDeleteContactGroup: 00163 iAppContainer->DeleteContactGroupL(); 00164 break; 00165 default: 00166 break; 00167 } 00168 }
|
|
|
From CEikAppUi, HandleResourceChangeL. Handles resource changes.
Definition at line 191 of file ccontappui.cpp. References iAppContainer. 00192 { 00193 CAknAppUi::HandleResourceChangeL( aType ); 00194 if ( aType == KEikDynamicLayoutVariantSwitch ) 00195 { 00196 iAppContainer->SetRect( ClientRect() ); 00197 } 00198 }
|
|
||||||||||||
|
From CEikAppUi, handles key events
Definition at line 81 of file ccontappui.cpp.
|
|
|
UpdateTitleL The method updates title text
Definition at line 175 of file ccontappui.cpp. Referenced by HandleCommandL(). 00176 { 00177 HBufC* textResource = StringLoader::LoadLC( aResourceId ); 00178 00179 CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*, 00180 StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); 00181 00182 titlePane->SetTextL( textResource->Des()); 00183 CleanupStack::PopAndDestroy( textResource ); 00184 }
|
|
|
iAppContainer the container class Owned by CContAppUi object, instantiated in ConstructL, deleted in destructor Definition at line 97 of file ccontappui.h. Referenced by ConstructL(), HandleCommandL(), HandleResourceChangeL(), and ~CContAppUi(). |
|
© Nokia 2009 |