S60 3rd Edition SDK FP2 for Symbian OS
CommonDialogsEx

CommonDialogsExSettingsDialog.h

00001 /*
00002 * ============================================================================
00003 *  Name        : commondialogsexsettingsdialog.cpp
00004 *  Part of     : CommonDialogsEx
00005 *  Description : For settings dialog.
00006 *  Version     :
00007 *
00008 *  Copyright (c) 2006 Nokia Corporation.
00009 *  This material, including documentation and any related
00010 *  computer programs, is protected by copyright controlled by
00011 *  Nokia Corporation.
00012 * ==============================================================================
00013 */
00014 
00015 #ifndef __CCOMMONDIALOGSEXSETTINGSDIALOG_H__
00016 #define __CCOMMONDIALOGSEXSETTINGSDIALOG_H__
00017 
00018 //  INCLUDES
00019 #include <eikdialg.h>
00020 #include <CAknMemorySelectionDialog.h>
00021 #include <aknsettingitemlist.h>
00022 
00023 // CLASS DECLARATION
00024 
00025 /**
00026 * This class defines a settings dialog for application.
00027 */
00028 class CCommonDialogsExSettingsDialog
00029     : public CEikDialog,
00030       public MEikListBoxObserver
00031     {
00032 
00033     public:  // Constructors and destructor
00034         
00035         /**
00036         * Destructor.
00037         */
00038         ~CCommonDialogsExSettingsDialog();
00039 
00040         /**
00041         * Two-phased constructor.
00042         */
00043         static CCommonDialogsExSettingsDialog* NewL(
00044             TInt aResId, TBool aMultiDriveSupport);
00045     private: // Constructors
00046 
00047         /**
00048         * Default constructor. Inlined to save a few bytes.
00049         * Parameters to array: granularity, isnumered, 1st ordinal
00050         */
00051         inline CCommonDialogsExSettingsDialog() : iSettingItemArray( 1, EFalse, 1 ) {} 
00052         
00053     protected: // from CEikDialog
00054 
00055         /**
00056         * Tests if it is OK to exit the dialog.
00057         * @param aButtonId The ID of the button that was activated.
00058         * @return ETrue to validate and exit the dialog,
00059         *         EFalse to keep the dialog active.
00060         */
00061         TBool OkToExitL( TInt aButtonId );
00062 
00063         /**
00064         * Pre-layout dialog initialisation.
00065         */
00066         void PreLayoutDynInitL();
00067 
00068         void ProcessCommandL( TInt aCommandId );
00069         
00070 
00071     public: // From MEikListBoxObserver
00072 
00073         /**
00074         * Handles list box events.
00075         * This is invoked by CEikListBox to notify the observer of
00076         * list box events.
00077         * @param aListBox The originating list box.
00078         * @param aEventType A code for the event.
00079         */
00080         void HandleListBoxEventL( CEikListBox* aListBox,
00081                                   TListBoxEvent aEventType );
00082 
00083    private:    // data
00084 
00085         /**
00086         * Array of setting items contained in the listbox. Owned.
00087         */
00088         CAknSettingItemArray iSettingItemArray;
00089 
00090         /**
00091         * Selected memo store
00092         */
00093         CAknMemorySelectionDialog::TMemory iMemory;
00094         
00095         TInt iResourceId; // for memory selection setting page
00096         
00097         TBool iMultiDriveSupport;
00098         
00099         TDriveNumber iDriveNumber;
00100     };
00101 
00102 #endif  // __CCOMMONDIALOGSEXSETTINGSDIALOG_H__

© Nokia 2007

Back to top