phonebookui/Phonebook/inc/CPbkSettingsDlg.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 *     Settings list dialog for Phonebook.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkSettingsDlg_H__
       
    21 #define __CPbkSettingsDlg_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <AknDialog.h>
       
    25 #include <cntviewbase.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CPbkSettingsList;
       
    29 class CAknTitlePane;
       
    30 class CAknNavigationDecorator;
       
    31 class CPbkContactEngine;
       
    32 class TCoeHelpContext;
       
    33 class CAknWaitDialog;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Settings list dialog.
       
    39  */
       
    40 class CPbkSettingsDlg :
       
    41 		public CAknDialog,
       
    42 		private MContactViewObserver
       
    43 	{
       
    44 	public: // interface
       
    45         /**
       
    46          * Creates a new instance of this class.
       
    47 		 * @param aEngine reference to Phonebook engine
       
    48          */
       
    49 		IMPORT_C static CPbkSettingsDlg* NewL(CPbkContactEngine& aEngine);
       
    50 
       
    51         /**
       
    52          * Executes the settings dialog.
       
    53          */
       
    54 		IMPORT_C void ExecuteLD();
       
    55 
       
    56 	private: // from CAknDialog
       
    57 		void PreLayoutDynInitL();
       
    58 		void ProcessCommandL(TInt aCommandId);
       
    59 		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
       
    60 			TEventCode aType);
       
    61 		TBool OkToExitL(TInt aButtonId);
       
    62         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
    63         void FocusChanged( TDrawNow aDrawNow );
       
    64     private:  // from MContactViewObserver
       
    65     	void HandleContactViewEvent
       
    66             (const CContactViewBase& aView,const TContactViewEvent& aEvent);
       
    67             
       
    68     private:  // from CCoeControl
       
    69         void SizeChanged();
       
    70 	    void HandleResourceChange(TInt aType);
       
    71 	    
       
    72 	private: // implementation
       
    73 		CPbkSettingsDlg(CPbkContactEngine& aEngine);
       
    74 		void ConstructL();
       
    75 		~CPbkSettingsDlg();
       
    76 		void CreateSettingsListL();
       
    77 		void AttemptExit();
       
    78 		void SaveTitlePaneL();
       
    79 		void SetupPanesL();
       
    80 		void SaveSettingsL();
       
    81 		void GetHelpContext(TCoeHelpContext& aContext) const;
       
    82 		TRect ReadScreenResourceL(TInt aResourceId);
       
    83 
       
    84 	private: // data
       
    85 		/// Ref: phonebook engine
       
    86 		CPbkContactEngine& iEngine;
       
    87 		/// Own: settings list
       
    88 		CPbkSettingsList* iSettingsList;
       
    89         /// Own: title pane text to restore on exit
       
    90         HBufC* iStoredTitlePaneText;
       
    91         /// Ref: application's title pane
       
    92         CAknTitlePane* iTitlePane;
       
    93         /// Own: navi pane control
       
    94         CAknNavigationDecorator* iNaviDecorator;
       
    95         /// Ref: all contacts view
       
    96         CContactViewBase* iAllContactsView;
       
    97 		/// Own: underlying view state
       
    98 		TBool iUnderlyingViewReady;
       
    99         /// Own: wait note wrapper
       
   100         CAknWaitDialog* iWaitNote;
       
   101         /// For testing only
       
   102         friend class CPbkSettingsDlg_TestAccess;
       
   103 	};
       
   104 
       
   105 #endif // __CPbkSettingsDlg_H__
       
   106 
       
   107 // End of File