|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : LmUiRefAppView.h 00004 * Part of : Landmarks UI Reference Application 00005 * Interface : 00006 * Description : 00007 * Declares UI class for application. 00008 * Version : 00009 * 00010 * Copyright (c) 2005-2006 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. 00014 * ============================================================================ 00015 */ 00016 00017 #ifndef LMUIREFAPPVIEW 00018 #define LMUIREFAPPVIEW_H 00019 00020 // INCLUDES 00021 #include <eikapp.h> 00022 #include <eikdoc.h> 00023 #include <e32std.h> 00024 #include <coeccntx.h> 00025 #include <aknappui.h> 00026 #include <AknViewAppUi.h> 00027 #include <aknview.h> 00028 00029 // FORWARD DECLARATIONS 00030 00031 class CLmkLandmarkSelectorDlg; 00032 class CLmkCategorySelectorDlg; 00033 class CLmUiRefAppContainer; 00034 class CPosLandmark; 00035 class CPosLandmarkDatabase; 00036 // CLASS DECLARATION 00037 00038 /** 00039 * CLmUiRefAppview class. 00040 * 00041 */ 00042 class CLmUiRefAppView : public CAknView 00043 { 00044 public: // Constructors and destructor 00045 /** 00046 * C++ default constructor. 00047 * @param aKeyProcessor 00048 * @param aLmkSender 00049 * @return created CLmkByLmView object 00050 */ 00051 static CLmUiRefAppView* NewLC(); 00052 00053 /** 00054 * Destructor. 00055 */ 00056 ~CLmUiRefAppView(); 00057 00058 private: // constructor 00059 /** 00060 * C++ constructor 00061 * @return newly instantiated object 00062 */ 00063 CLmUiRefAppView(); 00064 00065 /** 00066 * By default Symbian 2nd phase constructor is private. 00067 */ 00068 void ConstructL(); 00069 00070 // New Functions added 00071 void NewLmCmdL(); 00072 void ExecuteLmEditorL(CPosLandmark* aLandmark, CPosLandmarkDatabase& aDb); 00073 00074 00075 public: // New Funcs 00076 CAknViewAppUi* ViewAppUi(); 00077 TPosLmItemId SelectedItem() const; 00078 TInt LaunchLandmarksDialogL(); 00079 00080 // Multiple Landmarks Selector dialog 00081 TInt LaunchMultiLandmarkSelectorDialogL(); 00082 00083 // Multiple category selector dialog 00084 TInt LaunchMultiCategorySelectorDialogL(); 00085 00086 // Helper method for checking whether the database is empty or not 00087 TBool IsLmDbEmptyL(); 00088 00089 // Single category selector dialog 00090 TInt CLmUiRefAppView::LaunchSingleCategoeyDialogL(); 00091 00092 public: // From CAknView 00093 TUid Id() const; 00094 void HandleCommandL( TInt aCommand ); 00095 00096 private: //From CAknView 00097 void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, 00098 const TDesC8& aCustomMessage ); 00099 void DoDeactivate(); 00100 00101 protected: // From MEikMenuObserver 00102 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); 00103 00104 private: // Data 00105 /// Own: A pointer to container 00106 CLmUiRefAppContainer* iContainer; 00107 CLmUiRefAppUi* iLmUiRefAppUi; 00108 TPosLmItemId iSelectedItem; 00109 CLmkLandmarkSelectorDlg *iLmkSelectDlg; 00110 CLmkCategorySelectorDlg *iCategorySelectDlg; 00111 CPosLandmarkDatabase* ilDb; 00112 }; 00113 00114 #endif // CLMKBYLMVIEW_H 00115 00116 // End of File 00117
|
© Nokia 2009 |