calendarui/editors/inc/caleneventtypefield.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:  To handle entrytype feild
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef __CALENEVENTTYPEFIELD_H__
       
    19 #define __CALENEVENTTYPEFIELD_H__
       
    20 
       
    21 // system includes
       
    22 #include <e32base.h>
       
    23 #include <badesca.h>
       
    24 #include <calcommon.h>
       
    25 
       
    26 // user includes
       
    27 #include "calenunifiededitor.h"
       
    28 
       
    29 // forward declaration
       
    30 class CCalEntry;
       
    31 class CAknQueryValueTextArray;
       
    32 class CAknQueryValueText;
       
    33 class TCalRule;
       
    34 
       
    35 /**
       
    36  * Implements event type field for Calendar unified Editor.
       
    37  */ 
       
    38 NONSHARABLE_CLASS( CCalenEventTypeField ) : public CBase
       
    39     {
       
    40     public:
       
    41         /**
       
    42          * 
       
    43          */
       
    44         static CCalenEventTypeField* NewL( CCalenUnifiedEditor& aUnifiedEditor );
       
    45         
       
    46         /**
       
    47          * @brief default destructor
       
    48          */
       
    49         virtual ~CCalenEventTypeField();
       
    50     
       
    51     public:
       
    52         /**
       
    53          * @brief To read data from form
       
    54          */
       
    55         void ReadDataFromFormL( TBool aContinueOnError );
       
    56         
       
    57         /**
       
    58          * @brief update EntryType field in the Editor
       
    59          */
       
    60         void SetDataToEditorL();
       
    61         
       
    62         /**
       
    63          * @brief Updates fields just before the form is shown.
       
    64          */
       
    65         void InitEventTypeFieldLayoutL();
       
    66         
       
    67         /**
       
    68          * @brief Handle EventType field change
       
    69          * @param aFocusedId
       
    70          */
       
    71         void HandleControlStateChangeL(TInt aControlId);
       
    72            
       
    73         /**
       
    74          * @brief Handle focus transition from EventType field
       
    75          * @param aFocusedId
       
    76          */
       
    77         void PrepareForFocusTransitionL(TInt aFocusedId);
       
    78     
       
    79     private:
       
    80         
       
    81         /**
       
    82          * @brief This function is used when the top item of each form
       
    83          */
       
    84         void NotifyEventTypeChangeL();
       
    85         
       
    86     private:
       
    87         /**
       
    88          * @brief C++ constructor
       
    89          * @param aUnifiedEditor referance to CCalenUnifiedEditor
       
    90          */
       
    91         CCalenEventTypeField( CCalenUnifiedEditor& aUnifiedEditor );
       
    92         
       
    93         /**
       
    94          * @brief Two-Phase constructor
       
    95          */
       
    96         void ConstructL();
       
    97     
       
    98     private: 
       
    99         /** 
       
   100          * @brief enum for Calender Event Type 
       
   101          */
       
   102         enum TCalenEventType
       
   103             {
       
   104             EMeeting,
       
   105             EBirthDay,
       
   106             ETodo,
       
   107             };
       
   108         
       
   109         /**
       
   110          * @var iUnifiedEditor
       
   111          * @brief referanace to CCalenUnifiedEditor
       
   112          */
       
   113         CCalenUnifiedEditor&       iUnifiedEditor;
       
   114         
       
   115         /**
       
   116          * @var iEventTypeArrayText
       
   117          * @brief CDesCArrayFlat for EventType text values 
       
   118          */
       
   119         CDesCArrayFlat*            iEventTypeArrayText;
       
   120         
       
   121         /**
       
   122          * @var iEventTypeArray
       
   123          */
       
   124         CAknQueryValueTextArray*   iEventTypeArray;
       
   125         
       
   126         /**
       
   127          * @var iEventTypeTextValues
       
   128          */
       
   129         CAknQueryValueText*        iEventTypeTextValues;
       
   130     };
       
   131 
       
   132 #endif