meetingrequest/mrgui/mrfieldbuilderplugin/inc/cmrunifiededitorfield.h
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     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 Unified editor field impl.
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CMRUNIFIEDEDITORFIELD_H
       
    19 #define CMRUNIFIEDEDITORFIELD_H
       
    20 
       
    21 // INCLUDES
       
    22 #include "cesmrfield.h"
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CMRLabel;
       
    26 class CMRImage;
       
    27 class CESMRTextItem;
       
    28 
       
    29 /**
       
    30  * This class is a custom field control that shows the event type of calendar events
       
    31  */
       
    32 NONSHARABLE_CLASS( CMRUnifiedEditorField ) : public CESMRField
       
    33     {
       
    34 public:
       
    35     /**
       
    36      * Creates new CMRUnifiedEditorField object. Ownership
       
    37      * is transferred to caller.
       
    38      * @return Pointer to created object,
       
    39      */
       
    40     static CMRUnifiedEditorField* NewL();
       
    41 
       
    42     /**
       
    43      * Destructor.
       
    44      */
       
    45     ~CMRUnifiedEditorField();
       
    46 
       
    47 public: // From CESMRField
       
    48     void InternalizeL( MESMRCalEntry& aEntry );
       
    49     void SetOutlineFocusL( TBool aFocus );
       
    50     TBool ExecuteGenericCommandL( TInt aCommand );
       
    51     void LockL();
       
    52 
       
    53 public: // From CCoeControl
       
    54     TInt CountComponentControls() const;
       
    55     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    56     void SizeChanged();
       
    57 
       
    58 private:
       
    59     /**
       
    60      * Constructor.
       
    61      */
       
    62     CMRUnifiedEditorField();
       
    63 
       
    64     /**
       
    65      * Second phase constructor.
       
    66      */
       
    67     void ConstructL();
       
    68 
       
    69     /**
       
    70      * Updates event type text to aIndex.
       
    71      *
       
    72      * @param aIndex new event type index
       
    73      */
       
    74     void UpdateLabelL( TInt aIndex );
       
    75 
       
    76     /**
       
    77     * Shows query dialog for selecting
       
    78     * event type
       
    79     */
       
    80     void ExecuteTypeQueryL();
       
    81     
       
    82     /**
       
    83     * Sets the correct icon for the field according
       
    84     * to the entry type.
       
    85     */
       
    86     void SetIconL( MESMRCalEntry& aEntry );
       
    87 
       
    88 private:
       
    89     /**
       
    90      * Not owned. Event type label.
       
    91      */
       
    92     CMRLabel* iType;
       
    93 
       
    94     /// Own: Icon field
       
    95     CMRImage* iIcon;
       
    96     
       
    97     /// Own: lock icon
       
    98     CMRImage* iLockIcon;
       
    99 
       
   100     /**
       
   101      * Own. Array of event type objects.
       
   102      */
       
   103     RPointerArray< CESMRTextItem > iArray;
       
   104 
       
   105     /**
       
   106      * Index of selected event type.
       
   107      */
       
   108     TInt iIndex;
       
   109 
       
   110     /**
       
   111      * Own: Filter for dynamic popup, not showing all items
       
   112      */
       
   113     RArray<TInt> iFilter;
       
   114     };
       
   115 
       
   116 #endif  // CMRUNIFIEDEDITORFIELD_H
       
   117