|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : LandmarksView.h 00004 * Part of : Landmark Reference Application 00005 * Interface : - 00006 * Description : See class description below 00007 * Version : 1.0 00008 * 00009 * Copyright (c) 2004-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 #ifndef __LANDMARKS_VIEW_H__ 00017 #define __LANDMARKS_VIEW_H__ 00018 00019 // INCLUDES 00020 #include <aknview.h> 00021 00022 // FORWARD DECLARATIONS 00023 class CLandmarksApplicationEngine; 00024 class CAknNavigationDecorator; 00025 class CLandmarksContainer; 00026 class CLandmarksEngine; 00027 00028 // CLASS DECLARATION 00029 00030 /** 00031 * CLandmarksView is the view displaying list of landmarks 00032 */ 00033 class CLandmarksView: public CAknView 00034 { 00035 public: // Constructors and destructor 00036 00037 /** 00038 * Two-phased constructor. 00039 * 00040 * @param aNaviDecorator the navigation decorator displaying the tabs 00041 * @param aEngine the engine used for fetching category data. 00042 */ 00043 static CLandmarksView* NewLC( 00044 CAknNavigationDecorator* aNaviDecorator, 00045 CLandmarksApplicationEngine& aEngine); 00046 00047 /** 00048 * Destructor. 00049 */ 00050 ~CLandmarksView(); 00051 00052 public: // from CAknView 00053 00054 /** 00055 * Id Identity of this view to the system. 00056 * 00057 * @return the ID of this view 00058 */ 00059 TUid Id() const; 00060 00061 /** 00062 * HandleCommandL handles user menu selections. 00063 * 00064 * @param aCommand the enumerated code for the option selected 00065 */ 00066 void HandleCommandL(TInt aCommand); 00067 00068 /** 00069 * DoActivateL is responsible for activating this view. 00070 * 00071 * @param aPrevViewId The id of the previous view 00072 * @param aCustomMessageId message identifier 00073 * @param aCustomMessage custom message provided when the view is changed 00074 */ 00075 void DoActivateL( 00076 const TVwsViewId& aPrevViewId, 00077 TUid aCustomMessageId, 00078 const TDesC8& aCustomMessage); 00079 00080 /** 00081 * DoDeactivate is responsible for deactivating this view. 00082 */ 00083 void DoDeactivate(); 00084 00085 /** 00086 * DynInitMenuPaneL initializes the menu pane before it is displayed. 00087 * 00088 * @param aResourceId a resource ID indetifying the menu bar containing 00089 * the menu pane to be initialized. 00090 * @param aMenuPane the menu pane to initialize. 00091 */ 00092 void DynInitMenuPaneL( 00093 TInt aResourceId, 00094 CEikMenuPane* aMenuPane); 00095 00096 private: 00097 00098 /** 00099 * C++ constructor. 00100 * 00101 * @param aNaviDecorator the navigation decorator displaying the tabs 00102 * @param aEngine the engine used for fetching categories data. 00103 */ 00104 CLandmarksView( 00105 CAknNavigationDecorator* aNaviDecorator, 00106 CLandmarksApplicationEngine& aEngine); 00107 00108 /** 00109 * By default Symbian 2nd phase constructor is private. 00110 */ 00111 void ConstructL(); 00112 00113 /** 00114 * Launches a landmark edit dialog and adds a landmark to the database. 00115 * 00116 * @param aUseCurrentLocation ETrue if the landmark will be based on 00117 * current location. EFalse if no location should be predefined. 00118 */ 00119 void AddLandmarkL(TBool aUseCurrentLocation); 00120 00121 private: // Data 00122 00123 //! The container containing the graphical components of the view 00124 CLandmarksContainer* iContainer; 00125 00126 //! The application engine used for modifying categories 00127 CLandmarksApplicationEngine& iEngine; 00128 00129 //! Decorates the navi pane (with navigation arrows etc) 00130 CAknNavigationDecorator* iNaviDecorator; 00131 }; 00132 00133 00134 #endif // __LANDMARKS_VIEW_H__ 00135 00136 // End of File 00137
|
© Nokia 2006 |