meetingrequest/mrgui/mrfieldbuilderplugin/inc/cmrmulticalenfield.h
branchRCL_3
changeset 33 da5135c61bad
child 60 d620048b4810
equal deleted inserted replaced
32:a3a1ae9acec6 33:da5135c61bad
       
     1 /*
       
     2 * Copyright (c) 2009 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:  MR multi calendar field impl.
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CMRMULTICALENFIELD_H
       
    19 #define CMRMULTICALENFIELD_H
       
    20 
       
    21 // INCLUDES
       
    22 #include "cesmrfield.h"
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CMRLabel;
       
    26 class CMRImage;
       
    27 class CESMRTextItem;
       
    28 class CESMRMultiCalenItem;
       
    29 class MESMRCalDbMgr;
       
    30 
       
    31 /**
       
    32  * This class is a custom field control that shows the calendar type of multi calendar
       
    33  */
       
    34 NONSHARABLE_CLASS( CMRMultiCalenField ) : public CESMRField
       
    35     {
       
    36 public:
       
    37     /**
       
    38      * Creates new CMRMultiCalenField object. Ownership
       
    39      * is transferred to caller.
       
    40      * @return Pointer to created object,
       
    41      */
       
    42     static CMRMultiCalenField* NewL();
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     ~CMRMultiCalenField();
       
    48 
       
    49 public: // From CESMRField
       
    50 	void InitializeL();
       
    51     void InternalizeL( MESMRCalEntry& aEntry );
       
    52     void SetOutlineFocusL( TBool aFocus );
       
    53     TBool ExecuteGenericCommandL( TInt aCommand );
       
    54     void LockL();
       
    55 
       
    56 public: // From CCoeControl
       
    57     TInt CountComponentControls() const;
       
    58     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    59     void SizeChanged();
       
    60     void SetContainerWindowL( const CCoeControl& aContainer );
       
    61 
       
    62 private:
       
    63     /**
       
    64      * Constructor.
       
    65      */
       
    66     CMRMultiCalenField();
       
    67 
       
    68     /**
       
    69      * Second phase constructor.
       
    70      */
       
    71     void ConstructL();
       
    72 
       
    73     /**
       
    74      * Updates event type text to aIndex.
       
    75      *
       
    76      * @param aIndex new event type index
       
    77      */
       
    78     void UpdateLabelL( TInt aIndex );
       
    79 
       
    80     /**
       
    81     * Shows query dialog for selecting
       
    82     * event type
       
    83     */
       
    84     void ExecuteTypeQueryL();
       
    85     
       
    86     /**
       
    87      * Sets the label text color dimmed
       
    88      */
       
    89     void SetTextDimmed();
       
    90     
       
    91     /**
       
    92      * Tests if calendar type change is enabled or not.
       
    93      * 
       
    94      * @return Boolean, ETrue if type change is enabled, otherwise EFalse. 
       
    95      */
       
    96     TBool TypeChangeEnabledL();
       
    97 
       
    98 private:
       
    99     /**
       
   100      * Not owned. Event type label.
       
   101      */
       
   102     CMRLabel* iCalenName;
       
   103 
       
   104     /// Own: Icon field
       
   105     CMRImage* iIcon;
       
   106     
       
   107     /// Own: lock icon
       
   108     CMRImage* iLockIcon;
       
   109 
       
   110     /**
       
   111      * Index of selected event type.
       
   112      */
       
   113     TInt iIndex;
       
   114 
       
   115     /**
       
   116      * ref to cur entry
       
   117      */
       
   118     MESMRCalEntry* iEntry;
       
   119 
       
   120     /**
       
   121      * reserve multi-calendar name list
       
   122      */
       
   123     RArray<TPtrC> iCalenNameList;
       
   124     
       
   125     /**
       
   126      * Own: Indicates if calendar type change is enabled or disabled
       
   127      */
       
   128     TBool iTypeChangeEnabled;
       
   129     };
       
   130 
       
   131 #endif  // CMRMULTICALENFIELD_H
       
   132