phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorSyncField.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Phonebook 2 contact editor synchronisation field.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2CONTACTEDITORSYNCFIELD_H
       
    20 #define CPBK2CONTACTEDITORSYNCFIELD_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "CPbk2ContactEditorFieldBase.h"
       
    24 #include <badesca.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CEikCaptionedControl;
       
    28 class CAknPopupField;
       
    29 class CAknQueryValueTextArray;
       
    30 class CAknQueryValueText;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * Phonebook 2 contact editor synchronisation field.
       
    36  */
       
    37 NONSHARABLE_CLASS(CPbk2ContactEditorSyncField) :
       
    38         public CPbk2ContactEditorFieldBase
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41         
       
    42         /**
       
    43          * Creates a new instance of this class.
       
    44          *
       
    45          * @param aContactField         Contact field.
       
    46          * @param aUiBuilder            UI builder for adding the
       
    47          *                              field into dialog.
       
    48          * @param aIconInfoContainer    Icon container for
       
    49          *                              setting the field icon.
       
    50          * @return  A new instance of this class.
       
    51          */
       
    52         static CPbk2ContactEditorSyncField* NewLC(
       
    53             CPbk2PresentationContactField& aContactField,
       
    54             MPbk2ContactEditorUiBuilder& aUiBuilder,
       
    55             CPbk2IconInfoContainer& aIconInfoContainer );
       
    56         
       
    57         /**
       
    58          * Destructor.
       
    59          */
       
    60         virtual ~CPbk2ContactEditorSyncField();
       
    61 
       
    62     public: // From MPbk2ContactEditorField
       
    63         CEikEdwin* Control() const;
       
    64         void SaveFieldL();
       
    65         TBool FieldDataChanged() const;
       
    66 		HBufC* ControlTextL() const;
       
    67         void ActivateL();
       
    68         void AcceptL(
       
    69                 MPbk2ContactEditorFieldVisitor& aVisitor );
       
    70         TBool ConsumesKeyEvent(
       
    71                 const TKeyEvent& aKeyEvent, 
       
    72                 TEventCode aType );
       
    73         TBool HandleCustomFieldCommandL(TInt aCommand );
       
    74         
       
    75     protected: // Implementation
       
    76         CPbk2ContactEditorSyncField(
       
    77                 CPbk2PresentationContactField& aContactField,
       
    78                 MPbk2ContactEditorUiBuilder& aUiBuilder,
       
    79                 CPbk2IconInfoContainer& aIconInfoContainer );
       
    80         void ConstructL();
       
    81         void DoSetFieldValueAsCurrentSelection();
       
    82 
       
    83     protected: // Data
       
    84         /// Ref: Fields editor
       
    85         CAknPopupField* iControl;
       
    86         /// Ref: Fields captioned control
       
    87         CEikCaptionedControl* iCaptionedCtrl;
       
    88         /// Own: Text array of sync items 
       
    89         CDesCArrayFlat* iSyncArrayText;
       
    90         /// Own: Synchronisation query text values
       
    91         CAknQueryValueTextArray* iSyncArray;
       
    92         /// Own: Synchronisation text values
       
    93         CAknQueryValueText* iSyncTextValues;
       
    94         /// Own: Indicates is using default sync value
       
    95         TBool iIsUsingDefaultSyncValue;
       
    96         /// Own: Initial selection index
       
    97         TInt iInitialSyncConfSelection;
       
    98     };
       
    99 
       
   100 #endif // CPBK2CONTACTEDITORSYNCFIELD_H
       
   101             
       
   102 // End of File