phonebookui/Phonebook2/inc/CPbk2SettingsListControl.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-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 settings list control.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2SETTINGSLISTCONTROL_H
       
    20 #define CPBK2SETTINGSLISTCONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <aknsettingitemlist.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MPbk2SettingsControlExtension;
       
    27 class CPbk2SortOrderManager;
       
    28 class CPbk2DefaultSavingStorageSettingItem;
       
    29 class CPbk2MemorySelectionSettingItem;
       
    30 class CPbk2SettingsListState;
       
    31 class MPbk2SettingsControlExtension;
       
    32 class CPbk2PredictiveSearchSettingItem;
       
    33 
       
    34 /**
       
    35  * Phonebook 2 settings list control.
       
    36  */
       
    37 class CPbk2SettingsListControl : public CAknSettingItemList
       
    38     {
       
    39     public: // Constructors and destructor
       
    40 
       
    41         /**
       
    42          * Creates a new instance of this class.
       
    43          *
       
    44          * @param aContainer            Control container.
       
    45          * @param aSortOrderManager     Sort order manager.
       
    46          * @param aControlExtension     Control extension.
       
    47          * @return  A new instance of this class.
       
    48          */
       
    49         IMPORT_C static CPbk2SettingsListControl* NewL(
       
    50             const CCoeControl* aContainer,
       
    51             CPbk2SortOrderManager& aSortOrderManager,
       
    52             MPbk2SettingsControlExtension& aControlExtension);
       
    53 
       
    54         /**
       
    55          * Destructor.
       
    56          */
       
    57         ~CPbk2SettingsListControl();
       
    58 
       
    59     public: // Interface
       
    60 
       
    61         /**
       
    62          * Commits settings.
       
    63          */
       
    64         IMPORT_C void CommitSettingsL();
       
    65         
       
    66     public: // From CCoeControl
       
    67         void SizeChanged();        
       
    68 
       
    69     public: // From CAknSettingItemList
       
    70         void EditItemL(
       
    71                 TInt aIndex,
       
    72                 TBool aCalledFromMenu );
       
    73         void HandleResourceChange( TInt aType );
       
    74 
       
    75     	void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    76     	
       
    77     protected: // From CAknSettingItemList
       
    78         CAknSettingItem* CreateSettingItemL(
       
    79                 TInt aSettingId );
       
    80 
       
    81     private: // Implementation
       
    82         CPbk2SettingsListControl(
       
    83                 CPbk2SortOrderManager& aSortOrderManager,
       
    84                 MPbk2SettingsControlExtension& aControlExtension );
       
    85         void ConstructL(
       
    86                 const CCoeControl* aContainer );
       
    87         void LaunchMemorySelectionSettingPageL();
       
    88         void PopulateSelectionItemListL();
       
    89         void StoreSettings();
       
    90         
       
    91         /**
       
    92         * Checks name ordering visibility from resource file
       
    93         */
       
    94         TBool ShowNameOrderingSettingL();
       
    95         
       
    96         /**
       
    97          * get predictive search enable flag from central repository,
       
    98          * save it to iPredictiveSearchSettingsValue
       
    99          */
       
   100         void PredictiveSearchEnableInfoFromCenrepL();
       
   101         
       
   102         /**
       
   103          * @return ETrue if there is physical keyboard
       
   104          */
       
   105         TBool PhysicalKeyboardExistL();
       
   106         
       
   107         /**
       
   108          * reset the cenrep for predictive search, so that predictive search is disabled.
       
   109          */
       
   110         void DisablePredictiveSearchInCenrepL();
       
   111 
       
   112     private: // Data
       
   113         /// Ref: This control's container
       
   114         const CCoeControl* iContainer;
       
   115         /// Ref: Sort order manager
       
   116         CPbk2SortOrderManager& iSortOrderManager;
       
   117         /// Ref: Settings control extension
       
   118         MPbk2SettingsControlExtension& iControlExtension;
       
   119         /// Own: Settings list state
       
   120         CPbk2SettingsListState* iSettingListState;
       
   121         /// Ref: Default saving store setting item
       
   122         CPbk2DefaultSavingStorageSettingItem* iDefaultSavingStorageItem;
       
   123         /// Ref: Selection setting item
       
   124         CPbk2MemorySelectionSettingItem* iSelectionSettingItem;
       
   125         /// Ref: predictive search setting item
       
   126         CPbk2PredictiveSearchSettingItem* iPredictiveSearchItem;
       
   127         
       
   128         /// Own: Default name display order
       
   129         TInt iDefaultNameDisplayOrder;
       
   130         /// Own: Default saving store
       
   131         TInt iDefaultSavingStorage;
       
   132         /// own, settings value for predictive search 
       
   133         TBool iPredictiveSearchSettingsValue;
       
   134     };
       
   135 
       
   136 #endif // CPBK2SETTINGSLISTCONTROL_H
       
   137 
       
   138 // End of File