calendarui/views/inc/calendayview.h
branchRCL_3
changeset 66 bd7edf625bdd
child 67 1539a383d7b6
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     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:   Declares view class of View architecture for Day view.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CALENDAYVIEW_H
       
    21 #define CALENDAYVIEW_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "calennativeview.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CAknNavigationDecorator;
       
    28 
       
    29 //  CLASS DEFINITIONS
       
    30 
       
    31 /**
       
    32  *  Declares view for Day view
       
    33  */
       
    34 NONSHARABLE_CLASS( CCalenDayView ) : public CCalenNativeView
       
    35     {
       
    36 public: // Constructors and destructor
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      */
       
    40     IMPORT_C static CCalenDayView* NewL( MCalenServices& aServices );
       
    41 
       
    42     /**
       
    43      * Destructor.
       
    44      */
       
    45     virtual ~CCalenDayView();
       
    46 
       
    47 public:  // New function
       
    48     /**
       
    49      * Set a date text to StatusPane
       
    50      * @param aTime Set a time
       
    51      */
       
    52     void SetStatusPaneFromActiveContextL();
       
    53 
       
    54     /**
       
    55      * Update CBA buttons depending on if we have items or not in view
       
    56      * Callend from Day Container as well as DoActivateViewImpl.
       
    57      * 
       
    58      */
       
    59     void UpdateCbaL();
       
    60     
       
    61     /**
       
    62      * To check if the Command to open event view 
       
    63      * from day view is handled
       
    64      * @return ETrue : if eventview command is handled 
       
    65      */
       
    66     TBool isEventViewCommandHandled();
       
    67 
       
    68 public:  // From CCalenView
       
    69     virtual TNextPopulationStep ActiveStepL();
       
    70     virtual void CancelPopulation();
       
    71     virtual TCyclePosition CyclePosition() const;
       
    72     virtual const TDesC& LocalisedViewNameL( CCalenView::TViewName aViewName );
       
    73     virtual CGulIcon* CCalenDayView::ViewIconL() const;
       
    74 
       
    75 protected:  // From CCalenNativeView
       
    76     /**
       
    77      * Clears view specific data
       
    78      */
       
    79     virtual void ClearViewSpecificDataL();
       
    80     
       
    81     /**
       
    82      * Update date form context when entry is saved
       
    83      */
       
    84     void UpdateDateFromContextL();
       
    85 
       
    86 private: // Constructors
       
    87     /**
       
    88      * C++ constructor.
       
    89      */
       
    90     CCalenDayView( MCalenServices& aServices );
       
    91 
       
    92 private:
       
    93     /**
       
    94      * By default Symbian OS constructor is private.
       
    95      */
       
    96     void ConstructL();
       
    97 
       
    98     /**
       
    99      * From CCalenView Second phase DoActivateL
       
   100      */
       
   101     void DoActivateImplL(	const TVwsViewId& aPrevViewId,
       
   102                             TUid aCustomMessageId,
       
   103                             const TDesC8& aCustomMessage );
       
   104 
       
   105     /**
       
   106      * From CCalenView Second phase DoDeactivate
       
   107      */
       
   108     void DoDeactivateImpl();
       
   109 
       
   110     /**
       
   111      * From CCalenView. Called when locale was changed and
       
   112      *                 time was crossed over
       
   113      */
       
   114     void OnLocaleChangedL(TInt aReason);
       
   115 
       
   116     /**
       
   117      * From CCalenView Creates container control for DayView
       
   118      */
       
   119     CCalenContainer* CreateContainerImplL();
       
   120 
       
   121     /**
       
   122      * From CCalenView Redraw status pane when Form is closed
       
   123      */
       
   124     void RedrawStatusPaneL();
       
   125     
       
   126     /**
       
   127      * From CCalenView. Normal command handling method.
       
   128      * needed for MSK.
       
   129      */
       
   130     void HandleCommandL(TInt aCommand);
       
   131     
       
   132     TUid Id() const;
       
   133 	
       
   134 	
       
   135     
       
   136 private:  // From MEikMenuObserver
       
   137     /**
       
   138      * From MEikMenuObserver Changes MenuPane dynamically
       
   139      */
       
   140     void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   141 
       
   142 private: 
       
   143 
       
   144     /**
       
   145      * Returns ETrue if the vsd is null.
       
   146      */
       
   147     TBool IsViewSpecificDataNullL();
       
   148     
       
   149 private:   // Data
       
   150 
       
   151     TBool iShowBackButtonOnCba; // BACK cba button test variable
       
   152     TVwsViewId iPreviousViewId;   // view id that the day view is switched from
       
   153 
       
   154 private: 
       
   155     enum TPopulationStep
       
   156         {
       
   157         ENothingDone,        
       
   158         ERequestedInstanceView,
       
   159         ECreateSlotTableNext,
       
   160         ESizedChanged,
       
   161         ECreateListBoxDataNext,
       
   162         EPopulationDone
       
   163         };
       
   164     TPopulationStep iPopulationStep;
       
   165 
       
   166     // View specific data, day container gets references to all of these.
       
   167     TTime iDate;                    // Date of current focus.
       
   168     TInt iHighlightedRowNumber;     // The row number highlighted.
       
   169     TInt iFirstEntryOnScreenIndex;  // The offset of the topmost item on screen to the first entry.
       
   170     TInt iEventViewCommandHandled;
       
   171     };
       
   172 
       
   173 #endif  // CALENDAYVIEW_H
       
   174 
       
   175 // End of File