locationlandmarksrefappfors60/Inc/LandmarksCategoriesView.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *     See class description below
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __LANDMARKS_CATEGORIES_VIEW_H__
       
    21 #define __LANDMARKS_CATEGORIES_VIEW_H__
       
    22 
       
    23 
       
    24 #include <aknview.h>
       
    25 
       
    26 
       
    27 class CLandmarksCategoriesContainer;
       
    28 class CLandmarksApplicationEngine;
       
    29 class CEikMenuPane;
       
    30 
       
    31 
       
    32 
       
    33 /**
       
    34 *  CLandmarksCategoriesView is the view displaying categories in the Landmarks 
       
    35 *  Reference application.
       
    36 */
       
    37 class CLandmarksCategoriesView: public CAknView
       
    38     {
       
    39     public: // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         *
       
    44         * @param aEngine the engine used for fetching category data. 
       
    45         * This object takes ownership of the engine.
       
    46         */
       
    47         static CLandmarksCategoriesView* NewLC(
       
    48             CLandmarksApplicationEngine* aEngine);
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         ~CLandmarksCategoriesView();
       
    54 
       
    55     public: // from CAknView
       
    56 
       
    57         /**
       
    58         * Id Identity of this view to the system
       
    59         *
       
    60         * @return the ID of this view
       
    61         */
       
    62         TUid Id() const;
       
    63 
       
    64         /** 
       
    65         * HandleCommandL handles user menu selections.
       
    66         *
       
    67         * @param aCommand the enumerated code for the option selected
       
    68         */
       
    69         void HandleCommandL(TInt aCommand);
       
    70 
       
    71         /**
       
    72         * DoActivateL Responsible for activating this view.
       
    73         *
       
    74         * @param aPrevViewId The id of the previous view
       
    75         * @param aCustomMessageId message identifier
       
    76         * @param aCustomMessage custom message provided when the view is changed
       
    77         */
       
    78         void DoActivateL(
       
    79             const TVwsViewId& aPrevViewId,
       
    80             TUid aCustomMessageId,
       
    81             const TDesC8& aCustomMessage);
       
    82 
       
    83         /**
       
    84         * DoDeactivate Responsible for deactivating this view.
       
    85         */
       
    86         void DoDeactivate();
       
    87 
       
    88         /** 
       
    89         * DynInitMenuPaneL initializes the menu pane before it is displayed.
       
    90         *
       
    91         * @param aResourceId a resource ID indetifying the menu bar containing 
       
    92         * the menu pane to be initialized.
       
    93         * @param aMenuPane the menu pane to initialize.
       
    94         */
       
    95         void DynInitMenuPaneL(
       
    96             TInt aResourceId,
       
    97             CEikMenuPane* aMenuPane);
       
    98 
       
    99         /** Forwards resource change event to container. Used for 
       
   100          *  layout change handling */
       
   101         void HandleResourceChange( TInt aType );
       
   102 
       
   103     private:
       
   104 
       
   105         /**
       
   106         * C++ constructor.
       
   107         *        
       
   108         * @param aEngine the engine used for fetching categories data.
       
   109         */
       
   110         CLandmarksCategoriesView(
       
   111             CLandmarksApplicationEngine* aEngine);
       
   112 
       
   113         /**
       
   114         * By default Symbian 2nd phase constructor is private.
       
   115         */
       
   116         void ConstructL();
       
   117 
       
   118         /**
       
   119         * Launches a text query dialog and adds a category to the database.
       
   120         */
       
   121         void AddCategoryL();
       
   122 
       
   123         /**
       
   124         * Launches a text query dialog and renames a category in the database.
       
   125         */
       
   126         void RenameCategoryL();
       
   127 
       
   128     private: // Data
       
   129 
       
   130         //! The container containing the graphical components of the view
       
   131         CLandmarksCategoriesContainer* iContainer;
       
   132 
       
   133         //! The application engine used for modifying categories
       
   134         CLandmarksApplicationEngine* iEngine;
       
   135 
       
   136     };
       
   137 
       
   138 #endif // __LANDMARKS_CATEGORIES_VIEW_H__
       
   139