calendarui/views/inc/caleneventview.h
branchRCL_3
changeset 66 bd7edf625bdd
child 67 1539a383d7b6
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     1 /*
       
     2 * Copyright (c) 2008 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:   Declares view class of View architecture for Event view.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CALENEVENTVIEW_H
       
    21 #define CALENEVENTVIEW_H
       
    22 
       
    23 // Include Files
       
    24 #include <calentoolbar.h>                       // MCalenToolbarObserver
       
    25 #include "calennativeview.h"
       
    26 
       
    27 //Forward declarations
       
    28 class CAknButton;
       
    29 class CCalenEventViewContainer;
       
    30 
       
    31 // class declaration
       
    32 /**
       
    33  * Declares view for event view
       
    34  */
       
    35 NONSHARABLE_CLASS(CCalenEventView):public CCalenNativeView
       
    36 	{
       
    37 public: // Constructors and destructor
       
    38     
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      */
       
    42     IMPORT_C static CCalenEventView* NewL( MCalenServices& aServices );
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     virtual ~CCalenEventView();
       
    48 
       
    49 public:  // From CCalenView
       
    50 
       
    51     virtual TNextPopulationStep ActiveStepL();
       
    52     virtual void CancelPopulation();
       
    53     virtual TCyclePosition CyclePosition() const;
       
    54     virtual const TDesC& LocalisedViewNameL( CCalenView::TViewName aViewName );
       
    55     virtual CGulIcon* CCalenEventView::ViewIconL() const;
       
    56 
       
    57 protected:  // From CCalenNativeView
       
    58     /**
       
    59      * Clears view specific data
       
    60      */
       
    61     virtual void ClearViewSpecificDataL();
       
    62 
       
    63 private:
       
    64     /**
       
    65      * By default Symbian OS constructor is private.
       
    66      */
       
    67     void ConstructL();
       
    68     
       
    69     /**
       
    70      * C++ constructor.
       
    71      */
       
    72     CCalenEventView( MCalenServices& aServices );
       
    73 
       
    74 protected:
       
    75 
       
    76     /**
       
    77      * From CCalenView Second phase DoActivateL
       
    78      */
       
    79     void DoActivateImplL(	const TVwsViewId& aPrevViewId,
       
    80                             TUid aCustomMessageId,
       
    81                             const TDesC8& aCustomMessage );
       
    82 
       
    83     /**
       
    84      * From CCalenView Second phase DoDeactivate
       
    85      */
       
    86     void DoDeactivateImpl();
       
    87 
       
    88   	/**
       
    89      * From CCalenView. Called when locale was changed and
       
    90      *                 time was crossed over
       
    91      */
       
    92     void OnLocaleChangedL(TInt aReason);
       
    93 
       
    94 public: // From CCalenView
       
    95     
       
    96     /**
       
    97      * Redraw status pane when Form is closed
       
    98      **/
       
    99     void RedrawStatusPaneL();
       
   100 
       
   101     /**
       
   102      * From CCalenView Creates CCalenContainer
       
   103      **/
       
   104     CCalenContainer* CreateContainerImplL();
       
   105     
       
   106     /**
       
   107      * From CCalenView. Normal command handling method.
       
   108      * needed for MSK.
       
   109      */
       
   110     void HandleCommandL(TInt aCommand);
       
   111     
       
   112     /**
       
   113     * Checks whether event viewer is launched from alarm or not.
       
   114     * @return ETrue, if event viewer launched from alarm(MSK case).
       
   115     */
       
   116     TBool IsAlarmActiveInViewer(); // IsEventViewerLaunchedFromAlarm
       
   117     
       
   118     /*
       
   119      * Hides the navi pane
       
   120      */
       
   121     void HideNaviPane();
       
   122     
       
   123 public:
       
   124     
       
   125     /**
       
   126      * Update CBA buttons depending on if we have items or not in view
       
   127      * Callend from Day Container as well as DoActivateViewImpl.
       
   128      * 
       
   129      */
       
   130     void UpdateCbaL();
       
   131 	
       
   132 private:  // From MEikMenuObserver
       
   133     /**
       
   134      * From MEikMenuObserver Changes MenuPane dynamically
       
   135      */
       
   136     void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   137 
       
   138 private:  // From CAknView
       
   139     TUid Id() const;
       
   140 
       
   141 	// For toolbar support
       
   142 	/**
       
   143 	* Create calendar toolbar buttons
       
   144 	*/
       
   145 	CAknButton* CreateButtonL( CGulIcon* aIcon, 
       
   146                                const TDesC& aText,
       
   147                                TInt aTooltipID,
       
   148                                CAknToolbar& aToolbar );
       
   149     
       
   150     /**
       
   151 	* Removes the event viewer toolbar buttons and unhides the view cycling buttons
       
   152 	*/                           
       
   153     void RemoveToolbarButtonsL();
       
   154     
       
   155     /**
       
   156 	* Adds the necessary toolbar buttons on the existing toolbar for event viewer
       
   157 	*/
       
   158     void AddToolbarButtonsL();
       
   159     
       
   160     /**
       
   161      * Updates the toolbar buttons on the existing toolbar for event viewer
       
   162      */
       
   163     void UpdateToolbarButtonsL();
       
   164     
       
   165     /**
       
   166      * Set date to Status pane. Default implementation does nothing.
       
   167      * @param aTime it will be refrect to StatusPane
       
   168      */
       
   169     void SetStatusPaneFromActiveContextL();
       
   170 private:
       
   171     TVwsViewId iPreviousViewId;  
       
   172 
       
   173 private: 
       
   174     enum TPopulationStep
       
   175         {
       
   176 		ENothingDone,
       
   177 		EBuildTextEditor,
       
   178 		ERequestInstanceView,
       
   179 		EAddField,
       
   180 		EPopulationDone	
       
   181         };
       
   182     enum TEventViewCBA
       
   183 	    {	    
       
   184 	    EShowClose=1,
       
   185 	    EShowAlarm,
       
   186 	    EShowAlarmStopOnly,
       
   187 	    EShowBack	    	
       
   188 	    };    
       
   189     TEventViewCBA iEventViewCBA;
       
   190     TPopulationStep iPopulationStep;
       
   191  	};
       
   192 
       
   193 #endif // CALENEVENTVIEW_H