locationcentre/lcapp/inc/lcview.h
changeset 0 522cd55cc3d7
child 6 91123d004e8f
equal deleted inserted replaced
-1:000000000000 0:522cd55cc3d7
       
     1 /*
       
     2 * Copyright (c) 2007 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:  View class for Location Centre Application UI.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_LCAPPVIEW_H_
       
    20 #define C_LCAPPVIEW_H_
       
    21 
       
    22 //  SYSTEM INCLUDES
       
    23 #include <aknview.h>
       
    24 #include <aknviewappui.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CLcContainer;
       
    28 class MLcEventHandler;
       
    29 class CLcListBoxModel;
       
    30 
       
    31 /**
       
    32  *  Location Centre Application's View class.
       
    33  *
       
    34  *  @lib lcapp.exe
       
    35  *  @since S60 v5.0
       
    36  */
       
    37 class CLcView : public CAknView
       
    38     {
       
    39 public:
       
    40 	/**
       
    41 	 * Static Two phase constructor
       
    42 	 *
       
    43 	 * @param[in] aEventHandler, Location Centre Event Handle.
       
    44 	 * @param[in] aListBoxModel, List box model.
       
    45 	 * @return CLcView*, Pointer to the newly created object.
       
    46 	 */                                              
       
    47     static CLcView* NewL( MLcEventHandler&	aEventHandler,
       
    48     					  CLcListBoxModel&	aListBoxModel );
       
    49     
       
    50 	/**
       
    51 	 * Static Two phase constructor.
       
    52 	 * Leaves the created instance on the Cleanup Stack.
       
    53 	 *
       
    54 	 * @param[in] aEventHandler, Location Centre Event Handle.
       
    55 	 * @param[in] aListBoxModel, List box model.
       
    56 	 * @return CLcView*, Pointer to the newly created object.
       
    57 	 */                                                
       
    58     static CLcView* NewLC( MLcEventHandler&	aEventHandler,
       
    59     					   CLcListBoxModel&	aListBoxModel );
       
    60     
       
    61     /**
       
    62      * C++ Destructor.
       
    63      */
       
    64     virtual ~CLcView ();
       
    65 
       
    66 	/**
       
    67 	 * Handles the event generated when the Screen size is changed when
       
    68 	 * this View is being displayed.
       
    69 	 */
       
    70 	void ScreenSizeChanged();
       
    71 	
       
    72     /**
       
    73      * Updates the View object with a new list of Location based Applications
       
    74      * and Contents/Services.
       
    75      *
       
    76      * @param[in] aListBoxModel, New List box model object.
       
    77      */	
       
    78 	void UpdateL( CLcListBoxModel&	aListBoxModel );
       
    79 	
       
    80  	/**
       
    81  	 * Updates the listbox icons for Location Centre List Box.
       
    82  	 */	
       
    83 	void UpdateIconsL();
       
    84 	
       
    85     /**
       
    86      * Returns the Selected List box item
       
    87      *
       
    88      * @return TInt Index corresponding selected List box item.
       
    89      */
       
    90     TInt GetFocussedItem();	
       
    91 	    
       
    92 public: // Inherited from Base classes
       
    93     
       
    94   	/**
       
    95   	 * Inherited from CAknView
       
    96   	 */     
       
    97     void DoActivateL( const TVwsViewId& aPrevViewId,
       
    98                             TUid        aCustomMessageId,
       
    99                       const TDesC8&     aCustomMessage );
       
   100 
       
   101   	/**
       
   102   	 * Inherited from CAknView
       
   103   	 */ 
       
   104     void DoDeactivate();
       
   105 
       
   106   	/**
       
   107   	 * Inherited from CAknView
       
   108   	 */ 
       
   109     TUid Id() const;
       
   110 
       
   111   	/**
       
   112   	 * Inherited from CAknView
       
   113   	 */ 
       
   114     void HandleCommandL(TInt aCommand);
       
   115    
       
   116   	/**
       
   117   	 * Inherited from CAknView
       
   118   	 */    
       
   119     void DynInitMenuPaneL( TInt 			aResourceId, 
       
   120     					   CEikMenuPane* 	aMenuPane );
       
   121     					                   
       
   122 private:
       
   123 	/**
       
   124 	 * Overloaded C++ Contructor.
       
   125 	 */
       
   126     CLcView( MLcEventHandler&	aEventHandler,
       
   127     		 CLcListBoxModel&	aListBoxModel );
       
   128 
       
   129 	/**
       
   130 	 * Second phase of the two phase constructor.
       
   131 	 */
       
   132     void ConstructL();
       
   133     
       
   134     /**
       
   135      * Handles the visbility of the S60 Help feature.
       
   136      *
       
   137      * @param aMenuPane, Menu pane object on which the Help feature must
       
   138      *                   be evaluated.
       
   139      */
       
   140     void HandleHelpFeature( CEikMenuPane& aMenuPane ) const;
       
   141         
       
   142 private:
       
   143 	/**
       
   144 	 * Location Centre Container.
       
   145 	 * Owns.
       
   146 	 */
       
   147     CLcContainer*   	iContainer;
       
   148     
       
   149 	/**
       
   150 	 * Location Centre Event Handler.
       
   151 	 * Reference.
       
   152 	 */    
       
   153     MLcEventHandler&    iEventHandler;
       
   154     
       
   155 	/**
       
   156 	 * Location Centre Listbox model.
       
   157 	 * Reference.
       
   158 	 */    
       
   159     CLcListBoxModel*	iListBoxModel;
       
   160     
       
   161     };          
       
   162 
       
   163 #endif // C_LCAPPVIEW_H_
       
   164