|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <LandmarksInfoView.h>
Public Member Functions | |
| ~CLandmarksInfoView () | |
| TUid | Id () const |
| void | HandleCommandL (TInt aCommand) |
| void | DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage) |
| void | DoDeactivate () |
Static Public Member Functions | |
| static CLandmarksInfoView * | NewLC (CAknNavigationDecorator *aNaviDecorator, CLandmarksApplicationEngine &aEngine) |
Private Member Functions | |
| CLandmarksInfoView (CAknNavigationDecorator *aNaviDecorator, CLandmarksApplicationEngine &aEngine) | |
| void | ConstructL () |
| void | EditLandmarkL () |
Private Attributes | |
| CLandmarksInfoContainer * | iContainer |
| The container containing the graphical components of the view. | |
| CLandmarksApplicationEngine & | iEngine |
| The application engine used for accessing landmark data. | |
| CAknNavigationDecorator * | iNaviDecorator |
| Ddecorates the navi pane (with navigation arrows etc). | |
| HBufC * | iAppName |
| Application name. | |
Definition at line 34 of file LandmarksInfoView.h.
|
|
Destructor. Definition at line 76 of file LandmarksInfoView.cpp. References iAppName, and iContainer. 00077 { 00078 delete iContainer; 00079 delete iAppName; 00080 }
|
|
||||||||||||
|
C++ constructor.
Definition at line 39 of file LandmarksInfoView.cpp. 00042 : iEngine(aEngine), 00043 iNaviDecorator(aNaviDecorator) 00044 { 00045 // No implementation required 00046 }
|
|
||||||||||||
|
Two-phased constructor.
Definition at line 64 of file LandmarksInfoView.cpp. References CLandmarksInfoView(). 00067 { 00068 CLandmarksInfoView* self = new (ELeave) CLandmarksInfoView( 00069 aNaviDecorator, aEngine); 00070 CleanupStack::PushL(self); 00071 self->ConstructL(); 00072 return self; 00073 }
|
|
|
Id Identity of this view to the system.
Definition at line 88 of file LandmarksInfoView.cpp.
|
|
|
HandleCommandL handles user menu selections.
Definition at line 99 of file LandmarksInfoView.cpp. References CLandmarksInfoContainer::EditLandmarkL(), and iContainer. 00100 { 00101 switch (aCommand) 00102 { 00103 case EAknSoftkeyEdit: 00104 iContainer->EditLandmarkL(); 00105 break; 00106 00107 case EAknSoftkeyBack: 00108 AppUi()->ActivateLocalViewL(TUid::Uid(ELandmarksViewId)); 00109 break; 00110 00111 default: 00112 AppUi()->HandleCommandL(aCommand); 00113 break; 00114 } 00115 }
|
|
||||||||||||||||
|
DoActivateL is responsible for activating this view.
Definition at line 123 of file LandmarksInfoView.cpp. References CLandmarksInfoContainer::ConstructL(), iContainer, Id(), iEngine, iNaviDecorator, CLandmarksInfoContainer::LoadLandmarkL(), CLandmarksInfoContainer::MakeNaviPaneVisibleL(), CLandmarksApplicationEngine::NotifyViewActivated(), LandmarksUtils::Panic(), and CLandmarksInfoContainer::StoreTitlePaneL(). 00127 { 00128 __ASSERT_ALWAYS(aCustomMessageId.iUid == ELandmarksViewInfoById, 00129 LandmarksUtils::Panic(KErrGeneral)); 00130 00131 if (!iContainer) 00132 { 00133 iContainer = new (ELeave) CLandmarksInfoContainer( 00134 *this, iEngine, iNaviDecorator); 00135 iContainer->SetMopParent(this); 00136 iContainer->ConstructL(ClientRect()); 00137 } 00138 00139 iContainer->StoreTitlePaneL(); 00140 00141 // Enable receiving of keyboard events. 00142 AppUi()->AddToStackL(*this, iContainer); 00143 00144 // custom message contains landmark id 00145 TPckgBuf<TPosLmItemId> lmid; 00146 lmid.Copy(aCustomMessage); 00147 iContainer->LoadLandmarkL(lmid()); 00148 00149 // Make view visible. 00150 iContainer->MakeNaviPaneVisibleL(EFalse); 00151 iContainer->MakeVisible(ETrue); 00152 00153 // Notify that this view is active 00154 iEngine.NotifyViewActivated(Id(), ETrue); 00155 }
|
|
|
DoDeactivate is responsible for deactivating this view. Definition at line 163 of file LandmarksInfoView.cpp. References iContainer, Id(), iEngine, CLandmarksInfoContainer::MakeNaviPaneVisibleL(), CLandmarksApplicationEngine::NotifyViewActivated(), and CLandmarksInfoContainer::RestoreTitlePane(). 00164 { 00165 // Hide view. 00166 iContainer->MakeVisible(EFalse); 00167 TInt err = KErrNone; 00168 TRAP(err, iContainer->MakeNaviPaneVisibleL(ETrue)); 00169 iContainer->RestoreTitlePane(); 00170 00171 // Notify that this view is inactive 00172 TBool isActive = EFalse; 00173 iEngine.NotifyViewActivated(Id(), isActive); 00174 00175 // Disable receiving keyboard events. 00176 AppUi()->RemoveFromStack(iContainer); 00177 }
|
|
|
By default Symbian 2nd phase constructor is private. Definition at line 53 of file LandmarksInfoView.cpp. References iAppName. 00054 { 00055 BaseConstructL(R_LMREFAPP_INFO_VIEW); 00056 iAppName = iCoeEnv->AllocReadResourceAsDes16L(R_LMREFAPP_APP_TITLE); 00057 }
|
|
|
Launches a landmark edit dialog |
|
© Nokia 2006 |