landmarksui/app/inc/CLmkCategoryContentsContainer.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2002 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:    LandmarksUi Content File -    LM application category content view's container class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CLMKCATEGORYCONTENTSCONTAINER_H
       
    20 #define CLMKCATEGORYCONTENTSCONTAINER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecobs.h>
       
    24 #include "CLmkLbWithFilterContainer.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 class CAknView; // For landscape support
       
    29 
       
    30 class CEikTextListBox;
       
    31 class CLmkAppLmSelectorImpl;
       
    32 class CAknNavigationDecorator;
       
    33 class CPosLandmark;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 /**
       
    37 *  CLmkCategoryContentsContainer  container control class.
       
    38 *
       
    39 */
       
    40 class CLmkCategoryContentsContainer : public CLmkLbWithFilterContainer, public MCoeControlObserver
       
    41     {
       
    42     public: // Constructors and destructor
       
    43         /**
       
    44         * Two-phased constructor
       
    45 		* @param aKeyProcessor
       
    46 		* @param aParent
       
    47 		* @param aRect A rectangle for drawing.
       
    48 		* @return The newly created object.
       
    49 		*/
       
    50 
       
    51 		// For landscape Support
       
    52 
       
    53 		static CLmkCategoryContentsContainer* NewL(
       
    54                                         MLmkKeyProcessor& aKeyProcessor,
       
    55                                         MObjectProvider* aParent,
       
    56 		                                const TRect& aRect, CAknView& aView);
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         ~CLmkCategoryContentsContainer();
       
    61 
       
    62     public: // from CCoeControl
       
    63         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    64                                      TEventCode aType );
       
    65         // For Landscape Support
       
    66 		void  HandleResourceChange( TInt aType );
       
    67 		
       
    68 	public: // New functions
       
    69 		TInt GetSelectedLandmarksL(RPointerArray<CPosLandmark> &aArray);
       
    70 		TBool IsLandmarkDataEmptyL(CPosLandmark* aLandmark);
       
    71 	    TBool IsEditorOpened();	      
       
    72 		void SetEditorOpenedBool(TBool aBoolvalue);
       
    73 
       
    74     public: // From MCoeControlObserver
       
    75 
       
    76         /**
       
    77         * HandleControlEventL handles an event from an observed control.
       
    78         *
       
    79         * @param aControl the control that reported the event
       
    80         * @param aEventType contains info about the event
       
    81         */
       
    82        void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
       
    83 
       
    84    public://for MSK
       
    85    		/**
       
    86         * This function, removes opened category from selected landmarks.
       
    87         */
       
    88 		void RemoveFromThisCategoryL();
       
    89 		/**
       
    90         * This function checks, if the category opened is 'Uncategorized' .
       
    91         * @return ETrue if opened category is 'Uncategorized' else Efalse.
       
    92         */
       
    93 		TBool IsUncategorizedCategory();
       
    94 
       
    95     protected: // From CLmkLbWithFilterContainer
       
    96         void SetupTitlePaneL();
       
    97         void SetupSelectorAndListL( CPosLandmarkDatabase& aDb,
       
    98                                     CLmkSender& aSender );
       
    99         void SetupNaviPaneL();
       
   100         
       
   101     public ://from CLmkBaseContainer
       
   102     	TLmkMskDispItem ResolveMskDisplayItem();
       
   103     	void UpdateMskContainerForFilterL();
       
   104     	
       
   105     private:
       
   106         /**
       
   107         * C++ default constructor.
       
   108         * @param aKeyProcessor
       
   109         * @return newly instantiated object
       
   110         */
       
   111 		CLmkCategoryContentsContainer( MLmkKeyProcessor& aKeyProcessor , CAknView& aView);
       
   112 		void FocusChanged(TDrawNow aDrawNow);
       
   113 
       
   114         /**
       
   115         * Symbian 2nd phase constructor
       
   116         * @param aRect
       
   117         */
       
   118         void ConstructL( const TRect& aRect );
       
   119 
       
   120 	private://from MLmkMskObserver
       
   121 
       
   122     	void UpdateMskContainerL();
       
   123 
       
   124 	private:	// Data
       
   125 		CAknView& iView;
       
   126 		TBool iIsEditorOpened;
       
   127 		TBool iIsRemoveOperation;
       
   128     };
       
   129 
       
   130 #endif // CLMKCATEGORYCONTENTSCONTAINER_H
       
   131 
       
   132 // End of File