calendarui/views/inc/calenweekview.h
changeset 0 f979ecb2b13e
child 20 9c5b1510919f
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2002-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:   For Week View of Calendar application.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CALENWEEKVIEW_H
       
    20 #define CALENWEEKVIEW_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "calennativeview.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CAknNavigationDecorator;
       
    27 
       
    28 //  CLASS DEFINITIONS
       
    29 /**
       
    30  *  Declares view for Week view
       
    31  */
       
    32 NONSHARABLE_CLASS( CCalenWeekView ) : public CCalenNativeView
       
    33     {
       
    34 public:  // Constructors and destructor
       
    35 
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      */
       
    39     IMPORT_C static CCalenWeekView* NewL( MCalenServices& aServices );
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     virtual ~CCalenWeekView();
       
    44 
       
    45 public:  // New function
       
    46     /**
       
    47      * Set a date text to StatusPane
       
    48      * @param aTime Set a time to StatusPane
       
    49      */
       
    50     void SetStatusPaneFromActiveContextL();
       
    51 
       
    52 public:  // From CCalenView
       
    53     virtual TNextPopulationStep ActiveStepL();
       
    54     virtual void CancelPopulation();
       
    55     virtual TCyclePosition  CyclePosition() const;
       
    56     virtual const TDesC& LocalisedViewNameL( CCalenView::TViewName aViewName );
       
    57     virtual CGulIcon* ViewIconL() const;
       
    58 
       
    59 protected:   // From CCalenNativeView   
       
    60     /**
       
    61      * Clears view specific data
       
    62      */
       
    63     virtual void ClearViewSpecificDataL();
       
    64     
       
    65     /**
       
    66      *  Updates preview pane/preview popup
       
    67      */
       
    68     void UpdatePreviewPaneL();
       
    69 
       
    70     /**
       
    71      * Hides preview pane/preview popup
       
    72      */
       
    73     void HidePreviewPane();
       
    74     
       
    75 private:  // Constructors
       
    76     /**
       
    77      * C++ constructor.
       
    78      */
       
    79     CCalenWeekView( MCalenServices& aServices );
       
    80     /**
       
    81      * By default Symbian OS constructor is private.
       
    82      */
       
    83     void ConstructL();
       
    84 
       
    85 private:    // From CCalenView
       
    86     /**
       
    87      * From CCalenView CCalenView::DoActivateL() calls DoActivateImplL()
       
    88      */
       
    89     void DoActivateImplL(	const TVwsViewId& aPrevViewId,
       
    90                             TUid aCustomMessageId,
       
    91                             const TDesC8& aCustomMessage );
       
    92     /**
       
    93      * From CCalenView
       
    94      * CCalenView::DoDeactivateL() calls DoDeactivateImplL()
       
    95      */
       
    96     void DoDeactivateImpl();
       
    97     /**
       
    98      * From CCalenView Called when cross over midinight or locale change.
       
    99      */
       
   100     void OnLocaleChangedL(TInt aReason);
       
   101 
       
   102     /**
       
   103      * From CCalenView Creates CCalenContainer
       
   104      */
       
   105     CCalenContainer* CreateContainerImplL();
       
   106     /**
       
   107      * From CCalenView Redraw status pane when Form is closed
       
   108      */
       
   109     void RedrawStatusPaneL();
       
   110 
       
   111     /**
       
   112      * From CAknView. Command handling for each view
       
   113      * @param aCommand command id
       
   114      */
       
   115     void HandleCommandL(TInt aCommand);
       
   116     
       
   117 private:
       
   118     // From CAknView
       
   119     TUid Id() const;   
       
   120 
       
   121 private: // From MEikMenuPaneObserver
       
   122     /** 
       
   123      *  Dynamic changes to menu pane 
       
   124      */
       
   125     void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   126 
       
   127 private: // own methods
       
   128     
       
   129     /**
       
   130      * Returns ETrue if the vsd is null.
       
   131      */
       
   132     TBool IsViewSpecificDataNullL();
       
   133 
       
   134 private:    // Data
       
   135 
       
   136     enum TPopulationStep
       
   137         {
       
   138         ENothingDone,
       
   139         ERequestedInstanceView,
       
   140         ESlotTable1Next,
       
   141         ESlotTable2Next,
       
   142         ESetListBoxDataNext,
       
   143         EPopulationDone
       
   144         };
       
   145     TPopulationStep iPopulationStep;
       
   146 
       
   147     // View specific data
       
   148     TTime iTime;
       
   149     TInt iSelectedRowNumber;      // The row number of the highlighted cell.
       
   150     TTimeIntervalMinutes iFirstRowTime;           // The time of the first row on the screen.
       
   151     };
       
   152 
       
   153 #endif //CALENWEEKVIEW_H
       
   154 
       
   155 
       
   156 // End of File