meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrsingletimefield.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 single time field implementation
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRSINGLETIMEFIELD_H
       
    20 #define CESMRSINGLETIMEFIELD_H
       
    21 
       
    22 #include "cesmriconfield.h"
       
    23 
       
    24 class MESMRFieldValidator;
       
    25 class CEikTimeEditor;
       
    26 class CAknsFrameBackgroundControlContext;
       
    27 
       
    28 NONSHARABLE_CLASS( CESMRSingleTimeField ): public CESMRIconField
       
    29     {
       
    30 
       
    31 public:
       
    32     /**
       
    33      * Creates new CESMRSingleTimeField object. Ownership
       
    34      * is transferred to caller.
       
    35      * @return Pointer to created object,
       
    36      */
       
    37     static CESMRSingleTimeField* NewL( MESMRFieldValidator* aValidator );
       
    38 
       
    39     /**
       
    40      * Destructor.
       
    41      */
       
    42     ~CESMRSingleTimeField();
       
    43 
       
    44 public: // From CESMRField
       
    45     void InitializeL();
       
    46     TBool OkToLoseFocusL( TESMREntryFieldId aNextItem );
       
    47     void SetOutlineFocusL( TBool aFocus );
       
    48 
       
    49 public: // From CCoeControl
       
    50     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
       
    51     void ActivateL();
       
    52     void PositionChanged();
       
    53 
       
    54 private:
       
    55     /**
       
    56      * Constructor.
       
    57      * @param aValidator validator object
       
    58      */
       
    59     CESMRSingleTimeField( MESMRFieldValidator* aValidator );
       
    60 
       
    61     /**
       
    62      * Second phase constructor.
       
    63      */
       
    64     void ConstructL();
       
    65 
       
    66     void CheckIfValidatingNeededL( TInt aStartFieldIndex );
       
    67 
       
    68 private:
       
    69     /**
       
    70      * Not owned. Validator object.
       
    71      */
       
    72     MESMRFieldValidator* iValidator;
       
    73 
       
    74     /**
       
    75      * Not owned. Time editor.
       
    76      */
       
    77     CEikTimeEditor* iTime;
       
    78 
       
    79     /**
       
    80      * Background control context. Not own
       
    81      */
       
    82     MAknsControlContext* iBackground;
       
    83 
       
    84     /**
       
    85      * Actual background for the editor. Own
       
    86      */
       
    87     CAknsFrameBackgroundControlContext* iFrameBgContext;
       
    88     };
       
    89 
       
    90 #endif  // CESMRSINGLETIMEFIELD_H
       
    91