phonebookui/Phonebook/View/inc/CPbkContactEditorSyncField.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *     Phonebook contact editor syncronization field.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkContactEditorSyncField_H__
       
    21 #define __CPbkContactEditorSyncField_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CPbkContactEditorFieldBase.h"
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CEikEdwin;
       
    29 class MPbkContactEditorUiBuilder;
       
    30 class CPbkContactItem;
       
    31 class CEikCaptionedControl;
       
    32 class CAknPopupField;
       
    33 class CAknQueryValueTextArray;
       
    34 class CAknQueryValueText;
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40  * Phonebook Contact editor syncronization field. 
       
    41  */
       
    42 NONSHARABLE_CLASS(CPbkContactEditorSyncField) : 
       
    43         public CPbkContactEditorFieldBase
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         /**
       
    47          * Creates a new instance of this class - text editor to a field.
       
    48 		 * @param aField the to be edited field
       
    49 		 * @param aUiBuilder reference to UI builder
       
    50 		 * @param aIconInfoContainer reference to icon info container
       
    51          */
       
    52 		static CPbkContactEditorSyncField* NewL(
       
    53                 TPbkContactItemField& aField,
       
    54                 MPbkContactEditorUiBuilder& aUiBuilder,
       
    55 				CPbkIconInfoContainer& aIconInfoContainer);
       
    56         
       
    57         /**
       
    58          * Destructor.
       
    59          */
       
    60         ~CPbkContactEditorSyncField();
       
    61 		
       
    62     public:  // from MPbkContactEditorField
       
    63         void SaveFieldL();
       
    64         TBool FieldDataChanged() const;
       
    65         void AddFieldL(CPbkContactItem& aContact);
       
    66         void ActivateL();
       
    67         void AcceptL(MPbkFieldEditorVisitor& aVisitor);
       
    68         TBool ConsumesKeyEvent(const TKeyEvent& aKeyEvent, 
       
    69                 TEventCode aType);
       
    70 
       
    71     protected: // from MPbkFieldEditorControl
       
    72         CEikEdwin* Control();
       
    73         TPbkFieldId FieldId();
       
    74                 
       
    75     protected:  // Implementation
       
    76         CPbkContactEditorSyncField(
       
    77 				TPbkContactItemField& aField, 
       
    78 				CPbkIconInfoContainer& aIconInfoContainer,
       
    79 				MPbkContactEditorUiBuilder& aUiBuilder);
       
    80     
       
    81     private:    // implementation
       
    82         void ConstructL();
       
    83         void DoSetFieldValueAsCurrentSelection();
       
    84 
       
    85     protected:  // Data
       
    86         /// Ref: Fields editor
       
    87         CAknPopupField* iControl;
       
    88         /// Ref: fields captioned control
       
    89         CEikCaptionedControl* iCaptionedCtrl;
       
    90         ///Own: text array of sync items 
       
    91         CDesCArrayFlat* iSyncArrayText;
       
    92         ///Own: Syncronization query text values
       
    93         CAknQueryValueTextArray* iSyncArray;
       
    94         ///Own: Syncronization text values
       
    95         CAknQueryValueText* iSyncTextValues;
       
    96         ///Own: Is using default sync value
       
    97         TBool iIsUsingDefaultSyncValue;
       
    98         ///Own: Initial selection index
       
    99         TInt iInitialSyncConfSelection;
       
   100          
       
   101     };
       
   102 
       
   103 #endif // __CPbkContactEditorSyncField_H__
       
   104             
       
   105 // End of File