calendarui/views/inc/calenmissedalarmsview.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:   Missed Alarm View Declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef     CALENMISSEDALARMSVIEW_H
       
    21 #define     CALENMISSEDALARMSVIEW_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <eiklbv.h>
       
    25 #include <aknview.h>
       
    26 #include <AiwCommon.h>
       
    27 #include <calennotificationhandler.h>
       
    28 #include <calentoolbar.h>                       // MCalenToolbarObserver
       
    29 
       
    30 // user includes
       
    31 #include "calennativeview.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CCalenMissedAlarmsContainer;
       
    35 class CAiwServiceHandler;
       
    36 class CAknButton;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 * CCalenMissedAlarmsView class.
       
    42 * Derived from CAknView.
       
    43 */
       
    44 NONSHARABLE_CLASS( CCalenMissedAlarmsView ) : public CCalenNativeView
       
    45     {
       
    46     public: // Constructors and destructor  
       
    47        
       
    48         /**
       
    49          * Two-phased constructor.
       
    50          * @return CCalenMissedAlarmsView*
       
    51          */
       
    52         IMPORT_C static CCalenMissedAlarmsView* NewL(MCalenServices& aServices);
       
    53 
       
    54         /**
       
    55          * Destructor.
       
    56          */
       
    57         virtual ~CCalenMissedAlarmsView();
       
    58 	
       
    59 	public:  // From CCalenView
       
    60 
       
    61 	    /**
       
    62 	     * View population mechanism
       
    63 	     */
       
    64     	virtual TNextPopulationStep ActiveStepL();
       
    65     	
       
    66     	/**
       
    67     	 * Cancel view population
       
    68     	 */
       
    69     	virtual void CancelPopulation();
       
    70     	
       
    71     	/**
       
    72     	 * Returns view's cycle position
       
    73     	 */
       
    74     	virtual TCyclePosition CyclePosition() const;
       
    75     	
       
    76     	/**
       
    77     	 * Provides view name
       
    78     	 */
       
    79     	virtual const TDesC& LocalisedViewNameL(CCalenView::TViewName aViewName);
       
    80     	
       
    81     	/**
       
    82     	 * Returns view icon
       
    83     	 */
       
    84     	virtual CGulIcon* CCalenMissedAlarmsView::ViewIconL() const;
       
    85     	
       
    86 	protected:  // From CCalenNativeView
       
    87 	    
       
    88 	    /**
       
    89 	     * Clear view specific data
       
    90 	     */
       
    91 	    virtual void ClearViewSpecificDataL();	
       
    92 
       
    93 	private:
       
    94 	
       
    95 	    /**
       
    96 	     * second phase construction
       
    97 	     */
       
    98 	    void ConstructL();
       
    99 	    
       
   100 	    /**
       
   101 	     * C++ constructor.
       
   102 	     */
       
   103 	    CCalenMissedAlarmsView(MCalenServices& aServices);        
       
   104 	
       
   105 	protected:
       
   106 
       
   107 	    /**
       
   108 	     * From CCalenView Second phase DoActivateL
       
   109 	     */
       
   110 	    void DoActivateImplL( const TVwsViewId& aPrevViewId,
       
   111 	                          TUid aCustomMessageId,
       
   112 	                          const TDesC8& aCustomMessage );
       
   113 
       
   114 	    /**
       
   115 	     * From CCalenView Second phase DoDeactivate
       
   116 	     */
       
   117 	    void DoDeactivateImpl();
       
   118 
       
   119 	  	/**
       
   120 	     * From CCalenView. Called when locale was changed and
       
   121 	     *                 time was crossed over
       
   122 	     */
       
   123 	    void OnLocaleChangedL(TInt aReason);
       
   124 
       
   125 	public: // From CCalenView
       
   126 	    
       
   127 	    /**
       
   128 	     * Redraw status pane when Form is closed
       
   129 	     */
       
   130 	    void RedrawStatusPaneL();
       
   131 
       
   132 	    /**
       
   133 	     * From CCalenView Creates CCalenContainer
       
   134 	     **/
       
   135 	    CCalenContainer* CreateContainerImplL();
       
   136 	    
       
   137 	    /**
       
   138 	     * From CCalenView. Normal command handling method.
       
   139 	     * needed for MSK.
       
   140 	     */
       
   141 	    void HandleCommandL(TInt aCommand);
       
   142     
       
   143     private: 
       
   144 
       
   145         /**
       
   146          * Return UID of CCalenMissedAlarmsView
       
   147          * @return UID of CCalenMissedAlarmsView, KCalenMissedAlarmsView
       
   148          */
       
   149         TUid Id() const;
       
   150 
       
   151         /** 
       
   152          * From MEikMenuObserver, Delete meaningless menu item.
       
   153          * @param aResourceId : resource ID of menu pane
       
   154          * @param aMenuPane : Pointer of menu pane object
       
   155          */
       
   156         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   157 
       
   158 	    /**
       
   159 	     * Returns pointer to the missed alarm container
       
   160 	     * @return CCalenMissedAlarmsContainer*
       
   161 	     */		 	
       
   162 	 	CCalenMissedAlarmsContainer* Container();
       
   163 	 	
       
   164 	  	/**
       
   165 	 	 * Updates the cba based on the missed alarm entries
       
   166 	 	 */
       
   167 	 	void UpdateCbaL();
       
   168      	
       
   169      private: //data members
       
   170         TInt iMissedAlarmsCount;
       
   171         
       
   172         enum TPopulationStep
       
   173         	{
       
   174 			ENothingDone,
       
   175 			EPopulationDone	
       
   176         	};
       
   177     	TPopulationStep iPopulationStep;
       
   178     	TBool iShowCloseButtonOnCba;
       
   179     	TInt iHighlightedRowNumber;
       
   180     };
       
   181 
       
   182 #endif //  CALENMISSEDALARMSVIEW_H