meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrbooleanfield.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
       
     2 * Copyright (c) 2007 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 boolean field implementation
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRBOOLEANFIELD_H
       
    20 #define CESMRBOOLEANFIELD_H
       
    21 
       
    22 #include "cesmriconfield.h"
       
    23 
       
    24 class CEikLabel;
       
    25 class MESMRFieldValidator;
       
    26 
       
    27 /**
       
    28  * Creates a boolean checkbox type field for misc calendar event related info
       
    29  */
       
    30 NONSHARABLE_CLASS( CESMRBooleanField ): public CESMRIconField
       
    31     {
       
    32 public:
       
    33     /**
       
    34      * Creates new CESMRBooleanField object. Ownership
       
    35      * is transferred to caller.
       
    36      * @return Pointer to created object,
       
    37      */
       
    38     static CESMRBooleanField* NewL( MESMRFieldValidator* aValidator );
       
    39 
       
    40     /**
       
    41      * C++ Destructor.
       
    42      */
       
    43     ~CESMRBooleanField();
       
    44 
       
    45 public: // From CESMRField
       
    46     void InitializeL();
       
    47     void InternalizeL( MESMRCalEntry& aEntry );
       
    48     void SetOutlineFocusL( TBool aFocus );
       
    49     void ExecuteGenericCommandL( TInt aCommand );
       
    50 
       
    51 public: // From CCoeControl
       
    52     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
       
    53     void MakeVisible(TBool aVisible);
       
    54 
       
    55 private:
       
    56     /**
       
    57      * Constructor.
       
    58      *
       
    59      * @param aValidator validator object
       
    60      */
       
    61     CESMRBooleanField( MESMRFieldValidator* aValidator );
       
    62 
       
    63     /**
       
    64      * Second phase constructor.
       
    65      */
       
    66     void ConstructL();
       
    67 
       
    68     /**
       
    69      * Reset field value.
       
    70      */
       
    71     void ResetFieldL();
       
    72 
       
    73     /**
       
    74      * Switch middle softkey: on/off
       
    75      */
       
    76     void SwitchMiddleSoftKeyL();
       
    77 
       
    78 private:
       
    79     /**
       
    80      * Not owned. Field label.
       
    81      */
       
    82     CEikLabel* iLabel;
       
    83 
       
    84     /**
       
    85      * Current value.
       
    86      */
       
    87     TBool iStatus;
       
    88 
       
    89     /**
       
    90      * Not owned. Validator object.
       
    91      */
       
    92     MESMRFieldValidator* iValidator;
       
    93     };
       
    94 
       
    95 #endif  // CESMRBOOLEANFIELD_H
       
    96