meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrdatefield.h
changeset 0 8466d47a6819
child 16 4ce476e64c59
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-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 date field impl.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRDATEFIELD_H
       
    20 #define CESMRDATEFIELD_H
       
    21 
       
    22 #include "cesmriconfield.h"
       
    23 
       
    24 class MESMRFieldValidator;
       
    25 class CEikDateEditor;
       
    26 class CAknsFrameBackgroundControlContext;
       
    27 class MAknsControlContext;
       
    28 
       
    29 NONSHARABLE_CLASS( CESMRDateField ): public CESMRIconField
       
    30     {
       
    31 public:
       
    32     /**
       
    33      * Two phase constructor.
       
    34      *
       
    35      * @param aValidator validator object
       
    36      * @param aId field id
       
    37      */
       
    38     static CESMRDateField* NewL( MESMRFieldValidator* aValidator, TESMREntryFieldId aId );
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     ~CESMRDateField();
       
    44 
       
    45 public: // From CESMRField
       
    46     void InitializeL();
       
    47     TBool OkToLoseFocusL( TESMREntryFieldId aId );
       
    48     void SetOutlineFocusL( TBool aFocus );
       
    49 
       
    50 public: // From CCoeControl
       
    51     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
       
    52     void ActivateL();
       
    53     void PositionChanged();
       
    54 
       
    55 private: // Implementation
       
    56     CESMRDateField( MESMRFieldValidator* aValidator );
       
    57     void ConstructL( TESMREntryFieldId aId );
       
    58     void CheckIfValidatingNeededL(
       
    59             TInt aStartFieldIndex );
       
    60     TBool TriggerValidatorL();
       
    61     
       
    62 private:
       
    63     /**
       
    64      * Not owned. Date editor.
       
    65      */
       
    66     CEikDateEditor* iDate;
       
    67 
       
    68     /**
       
    69      * Not owned. Validator object.
       
    70      */
       
    71     MESMRFieldValidator* iValidator;
       
    72 
       
    73     // Background control context
       
    74     MAknsControlContext* iBackground;
       
    75 
       
    76     // Actual background for the editor
       
    77     CAknsFrameBackgroundControlContext* iFrameBgContext;//own
       
    78 
       
    79     // Rect of this field
       
    80     TRect iFieldRect;
       
    81     };
       
    82 
       
    83 #endif  // CESMRDATEFIELD_H
       
    84