S60 3rd Edition SDK for Symbian OS
Example Applications Guide

LandmarksCategoriesView.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : LandmarksCategoriesView.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_CATEGORIES_VIEW_H__
00017 #define __LANDMARKS_CATEGORIES_VIEW_H__
00018 
00019 // INCLUDES
00020 #include <aknview.h>
00021 
00022 // FORWARD DECLARATIONS
00023 class CLandmarksCategoriesContainer;
00024 class CLandmarksApplicationEngine;
00025 class CEikMenuPane;
00026 
00027 // CLASS DECLARATION
00028 
00029 /**
00030 *  CLandmarksCategoriesView is the view displaying categories in the Landmarks 
00031 *  Reference application.
00032 */
00033 class CLandmarksCategoriesView: public CAknView
00034     {
00035     public: // Constructors and destructor
00036 
00037         /**
00038         * Two-phased constructor.
00039         *
00040         * @param aEngine the engine used for fetching category data. 
00041         * This object takes ownership of the engine.
00042         */
00043         static CLandmarksCategoriesView* NewLC(
00044             CLandmarksApplicationEngine* aEngine);
00045 
00046         /**
00047         * Destructor.
00048         */
00049         ~CLandmarksCategoriesView();
00050 
00051     public: // from CAknView
00052 
00053         /**
00054         * Id Identity of this view to the system
00055         *
00056         * @return the ID of this view
00057         */
00058         TUid Id() const;
00059 
00060         /** 
00061         * HandleCommandL handles user menu selections.
00062         *
00063         * @param aCommand the enumerated code for the option selected
00064         */
00065         void HandleCommandL(TInt aCommand);
00066 
00067         /**
00068         * DoActivateL Responsible for activating this view.
00069         *
00070         * @param aPrevViewId The id of the previous view
00071         * @param aCustomMessageId message identifier
00072         * @param aCustomMessage custom message provided when the view is changed
00073         */
00074         void DoActivateL(
00075             const TVwsViewId& aPrevViewId,
00076             TUid aCustomMessageId,
00077             const TDesC8& aCustomMessage);
00078 
00079         /**
00080         * DoDeactivate Responsible for deactivating this view.
00081         */
00082         void DoDeactivate();
00083 
00084         /** 
00085         * DynInitMenuPaneL initializes the menu pane before it is displayed.
00086         *
00087         * @param aResourceId a resource ID indetifying the menu bar containing 
00088         * the menu pane to be initialized.
00089         * @param aMenuPane the menu pane to initialize.
00090         */
00091         void DynInitMenuPaneL(
00092             TInt aResourceId,
00093             CEikMenuPane* aMenuPane);
00094 
00095     private:
00096 
00097         /**
00098         * C++ constructor.
00099         *        
00100         * @param aEngine the engine used for fetching categories data.
00101         */
00102         CLandmarksCategoriesView(
00103             CLandmarksApplicationEngine* aEngine);
00104 
00105         /**
00106         * By default Symbian 2nd phase constructor is private.
00107         */
00108         void ConstructL();
00109 
00110         /**
00111         * Launches a text query dialog and adds a category to the database.
00112         */
00113         void AddCategoryL();
00114 
00115         /**
00116         * Launches a text query dialog and renames a category in the database.
00117         */
00118         void RenameCategoryL();
00119 
00120     private: // Data
00121 
00122         //! The container containing the graphical components of the view
00123         CLandmarksCategoriesContainer* iContainer;
00124 
00125         //! The application engine used for modifying categories
00126         CLandmarksApplicationEngine* iEngine;
00127 
00128     };
00129 
00130 #endif // __LANDMARKS_CATEGORIES_VIEW_H__
00131 
00132 // End of File
00133 

© Nokia 2006

Back to top