calendarui/editors/inc/calendbfield.h
changeset 0 f979ecb2b13e
child 20 21239b3bcd78
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2005 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   *  Description : Editor DataBase fields functionality for Meeting entry types
       
    14   *
       
    15   */
       
    16 
       
    17 #ifndef CALENDBFIELD_H
       
    18 #define CALENDBFIELD_H
       
    19 
       
    20 // system includes
       
    21 #include <e32base.h>
       
    22 #include <badesca.h>
       
    23 
       
    24 // forward declaration
       
    25 class CCalEntry;
       
    26 class CCalenUnifiedEditor;
       
    27 class CAknQueryValueTextArray;
       
    28 class CAknQueryValueText;
       
    29 class MCalenServices;
       
    30 
       
    31 /**
       
    32  * Implements Calendar field for Calendar Editors.
       
    33  */ 
       
    34 NONSHARABLE_CLASS( CCalenDbField ) : public CBase
       
    35     {
       
    36     public: // Constructors and destructor
       
    37     	
       
    38         /**
       
    39          * @brief Two-phased constructor.
       
    40          * @param aUnifiedEditor     
       
    41          */
       
    42         static CCalenDbField* NewL( CCalenUnifiedEditor& aUnifiedEditor, MCalenServices& aServices );
       
    43         
       
    44         /**
       
    45          * @brief Destructor.
       
    46          */
       
    47         virtual ~CCalenDbField();
       
    48     
       
    49     public:
       
    50     
       
    51     	/**	 
       
    52          * @brief Updates fields just before the form is shown
       
    53          */
       
    54         void InitDbFieldLayoutL();
       
    55         
       
    56         /**
       
    57          * @brief Update data in editor
       
    58          */    
       
    59         void SetDataToEditorL();
       
    60         
       
    61         /**
       
    62          * @brief Read data from form
       
    63          */    
       
    64         void ReadDataFromFormL( TBool aContinueOnError );
       
    65         
       
    66         /**
       
    67          * @brief Prepares for focus transition
       
    68          * @param aFocusedId
       
    69          */    
       
    70         void PrepareForFocusTransitionL( TInt aFocusedId );
       
    71         
       
    72         /**
       
    73          * @brief To habdle the control state change
       
    74          * @param aFocusedId
       
    75          */
       
    76         void HandleControlStateChangeL( TInt aControlId );
       
    77 
       
    78         /*
       
    79          * @brief Get calendar name for where entry belongs to
       
    80          * @return TDesC reference to name of the calendar
       
    81          */
       
    82         const TDesC& GetCalendarNameForEntryL();
       
    83         
       
    84         /*
       
    85          * @brief check if calendar is changed or not
       
    86          * @return TBool true if calendar is chnaged
       
    87          */
       
    88         TBool IsCalendarEdited();
       
    89         
       
    90         /*
       
    91          * @brief Get calendar index from popuplist for entry
       
    92          * @return TInt index from popuplist
       
    93          */
       
    94 		TInt GetCalendarIndexForEntryL();
       
    95         
       
    96     private:
       
    97     
       
    98         /**
       
    99          * @brief C++ constructor
       
   100          * @param aUnifiedEditor 
       
   101          */
       
   102         CCalenDbField( CCalenUnifiedEditor& aUnifiedEditor, MCalenServices& aServices );
       
   103         
       
   104     	/**
       
   105          * @brief second phase constructor
       
   106          */
       
   107         void ConstructL();
       
   108        
       
   109          
       
   110          /*
       
   111           * @brief calendar name finder from array
       
   112           * 
       
   113           * @param aName name of item in array
       
   114           * @param aInfoItem item to be found
       
   115           * @return TBool item found or not
       
   116           */
       
   117          static TBool CalendarInfoNameIdentifierL( const HBufC* aName,
       
   118                                     const CCalCalendarInfo& aInfoItem );
       
   119 
       
   120     public:
       
   121          //previous calendar collection id  
       
   122          TCalCollectionId iPreviousColId;
       
   123         
       
   124          //current collection id
       
   125          TCalCollectionId iCurrentColId;
       
   126     private:
       
   127     
       
   128         /**
       
   129          * @var iUnifiedEditor
       
   130          * @brief Reference to CCalenUnifiedEditor
       
   131          */ 
       
   132         CCalenUnifiedEditor& iUnifiedEditor;   
       
   133         
       
   134         /**
       
   135          * @var iDbNamesArrayText
       
   136          */
       
   137         CDesCArrayFlat* iDbNamesArrayText;
       
   138         
       
   139         /**
       
   140          * @var iDbNamesArray
       
   141          */
       
   142         CAknQueryValueTextArray* iDbNamesArray;
       
   143         
       
   144         /**
       
   145          * @var iDbNamesTextValues
       
   146          */
       
   147         CAknQueryValueText* iDbNamesTextValues;
       
   148         
       
   149         TInt iPreviousIndex;
       
   150         
       
   151         TInt iCurrentIndex;
       
   152         
       
   153         //services referance not owned
       
   154         MCalenServices* iServices;
       
   155         HBufC* iCalendarFileName;
       
   156         
       
   157     };
       
   158 
       
   159 #endif // CALENDBFIELD_H
       
   160 
       
   161 
       
   162 // End of File