meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrsingletimefield.h
branchRCL_3
changeset 64 3533d4323edc
equal deleted inserted replaced
63:d189ee25cf9d 64: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 single time field implementation
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRSINGLETIMEFIELD_H
       
    20 #define CESMRSINGLETIMEFIELD_H
       
    21 
       
    22 #include "cesmrfield.h"
       
    23 
       
    24 class MESMRFieldValidator;
       
    25 class CEikTimeEditor;
       
    26 class CMRImage;
       
    27 class CAknsBasicBackgroundControlContext;
       
    28 
       
    29 NONSHARABLE_CLASS( CESMRSingleTimeField ): public CESMRField
       
    30     {
       
    31 
       
    32 public:
       
    33     /**
       
    34      * Creates new CESMRSingleTimeField object. Ownership
       
    35      * is transferred to caller.
       
    36      * @return Pointer to created object,
       
    37      */
       
    38     static CESMRSingleTimeField* NewL( MESMRFieldValidator* aValidator );
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     ~CESMRSingleTimeField();
       
    44 
       
    45 public: // From CESMRField
       
    46     TBool OkToLoseFocusL( TESMREntryFieldId aNextItem );
       
    47     void SetOutlineFocusL( TBool aFocus );
       
    48     void SetValidatorL( MESMRFieldValidator* aValidator );
       
    49     TBool ExecuteGenericCommandL( TInt aCommand );
       
    50 
       
    51 public: // From CCoeControl
       
    52     TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, TEventCode aType );
       
    53     void SizeChanged();
       
    54     TInt CountComponentControls() const;
       
    55     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    56     void SetContainerWindowL( const CCoeControl& aContainer );
       
    57 
       
    58 private:
       
    59     /**
       
    60      * Constructor.
       
    61      * @param aValidator validator object
       
    62      */
       
    63     CESMRSingleTimeField( MESMRFieldValidator* aValidator );
       
    64 
       
    65     /**
       
    66      * Second phase constructor.
       
    67      */
       
    68     void ConstructL();
       
    69 
       
    70     void CheckIfValidatingNeededL( TInt aStartFieldIndex );
       
    71 
       
    72     void DoEnvChangeL();
       
    73     
       
    74 private:
       
    75 
       
    76     // Not owned. Time editor.
       
    77     CEikTimeEditor* iTime;
       
    78     
       
    79     // Own. Field icon
       
    80     CMRImage* iFieldIcon;
       
    81         
       
    82     // Own. Background control context.
       
    83     CAknsBasicBackgroundControlContext* iBgCtrlContext;
       
    84     /// Ref: Pointer to container window
       
    85     const CCoeControl* iContainerWindow;
       
    86     };
       
    87 
       
    88 #endif  // CESMRSINGLETIMEFIELD_H
       
    89