meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrrecurencefield.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     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:  ESMR Recurence field.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRRECURENCEFIELD_H
       
    20 #define CESMRRECURENCEFIELD_H
       
    21 
       
    22 #include "cesmrfield.h"
       
    23 
       
    24 class CMRLabel;
       
    25 class CMRImage;
       
    26 class CESMRRecurrence;
       
    27 class MESMRFieldValidator;
       
    28 
       
    29 NONSHARABLE_CLASS( CESMRRecurenceField ): public CESMRField
       
    30     {
       
    31 public:
       
    32     /**
       
    33      * Creates new CESMRRecurenceField object. Ownership
       
    34      * is transferred to caller.
       
    35      * @return Pointer to created object,
       
    36      */
       
    37     static CESMRRecurenceField* NewL( MESMRFieldValidator* aValidator );
       
    38 
       
    39     /**
       
    40      * Destructor.
       
    41      */
       
    42     ~CESMRRecurenceField();
       
    43 
       
    44 public: // From CESMRField
       
    45     void InternalizeL( MESMRCalEntry& aEntry );
       
    46     void SetOutlineFocusL( TBool aFocus );
       
    47     TBool ExecuteGenericCommandL( TInt aCommand );
       
    48 
       
    49 public: // From CCoeControl
       
    50     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    51     TInt CountComponentControls() const;
       
    52     CCoeControl* ComponentControl( TInt aInd ) const;
       
    53     void SizeChanged();
       
    54     void SetContainerWindowL( const CCoeControl& aContainer );
       
    55 
       
    56 private: // implementation
       
    57     /**
       
    58      * Constructor.
       
    59      *
       
    60      * @param aValidator validator object
       
    61      */
       
    62     CESMRRecurenceField( MESMRFieldValidator* aValidator );
       
    63 
       
    64     /**
       
    65      * Second phase constructor.
       
    66      */
       
    67     void ConstructL();
       
    68 
       
    69     /**
       
    70      * Selects new recurrence value.
       
    71      *
       
    72      * @param aIndex index of new recurrence
       
    73      */
       
    74     void SetRecurrenceL( TInt aIndex );
       
    75 
       
    76     /**
       
    77     * Shows query dialog for selecting
       
    78     * priority
       
    79     *
       
    80     */
       
    81     void ExecuteRecurrenceQueryL();
       
    82 
       
    83 private: // data
       
    84    
       
    85     // Not owned. Label for current recurrence.
       
    86     CMRLabel* iRecurrence;
       
    87     
       
    88     // Own. Field icon.
       
    89     CMRImage* iFieldIcon;
       
    90     
       
    91     // Own. Array of recurrence objects.
       
    92     RPointerArray< CESMRRecurrence > iArray;
       
    93 
       
    94     // Index for selected recurrence (index to iArray)
       
    95     TInt iIndex;
       
    96     };
       
    97 
       
    98 #endif  // CESMRRECURENCEFIELD_H
       
    99