Nokia N97 SDK
Example Applications Guide

aknexpopfieldattribsetdialog.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : aknexpopfieldattribsetdialog.h
00004 *  Part of     : Popup-field example
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2004 - 2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef __AKNEXPOPFIELDATTRIBSETDIALOG_H__
00017 #define __AKNEXPOPFIELDATTRIBSETDIALOG_H__
00018 
00019 // INCLUDES
00020 #include <eikmenub.h>
00021 #include "AknExPopFieldBaseDialog.h"
00022 
00023 
00024 // CONSTANTS
00025 const TInt KAknExPopFieldAttribSetControlCount = 2;
00026 const TInt KAknExPopFieldTextMaxValues = 2;
00027 const TInt KAknExPopFieldAttribSetIndexInitialize = 0;
00028 const TInt KAknExPopFieldMaxNumberLines  = 7;
00029 const TInt KAknExPopFieldReplacementTextBufLength = 256;
00030 const TInt KAknExPopFieldGranularityForEmptyArray = 16;
00031 
00032 
00033 // FORWARD DECLARATIONS
00034 class CAknQueryValueTextArray;
00035 class CAknQueryValueText;
00036 
00037 // CLASS DECLARATION
00038 
00039 /**
00040 * CAknExPopFieldAttribSetDialog
00041 */
00042 class CAknExPopFieldAttribSetDialog : public CAknExPopFieldBaseDialog
00043     {
00044     public: // Constructors and destructor
00045 
00046         /**
00047         * ConstructL.
00048         * 2nd phase constructor.
00049         */
00050         static CAknExPopFieldAttribSetDialog* NewLC();
00051 
00052         /**
00053         * CAknExPopFieldAttribSetDialog
00054         * Virtual Destructor.
00055         */
00056         virtual ~CAknExPopFieldAttribSetDialog();
00057 
00058     private: // Constructor.
00059 
00060         /**
00061         * CAknExPopFieldAttribSetDialog
00062         * C++ default constructor.
00063         */
00064         CAknExPopFieldAttribSetDialog();
00065 
00066     private: // New functions
00067 
00068         /**
00069         * DiscardTextArray
00070         * Discard text array in popup field object.
00071         */
00072         void DiscardTextArray();
00073 
00074         /**
00075         * SetIsSaveMenu
00076         * Set flag to indicate if we are in the save menu.
00077         * @param aVal
00078         */
00079         void SetIsSaveMenu( TBool aVal );
00080 
00081         /**
00082         * IsSaveMenu
00083         * Check if we are in the save menu.
00084         * @return TBool is menu saved or not?
00085         */
00086         TBool IsSaveMenu();
00087 
00088     public: // From CAknDialog
00089 
00090         /**
00091         * From CAknExPopfieldBaseDialog, DynInitMenuPaneL.
00092         * Dims "Label", "Add" and "Delete" menu items.
00093         * @param aResourceId 
00094         * @param aMenuPane Pointer to menu-pane object.
00095         */
00096         void DynInitMenuPaneL( TInt aResourceId, 
00097                                CEikMenuPane* aMenuPane );
00098 
00099         /**
00100         * From CAknDialog, ProcessCommandL.
00101         * @param aCommandId
00102         */
00103         void ProcessCommandL( TInt aCommandId );
00104 
00105     protected: // From CAknDialog
00106     
00107         /**
00108         * From CAknDialog, OkToExitL.
00109         * @param aButtonId 
00110         * @return TBool is it ok to exit?
00111         */
00112         TBool OkToExitL( TInt aButtonId );
00113 
00114 
00115     private: // From CAknExPopFieldBaseDialog
00116 
00117         /**
00118         * From CAknExPopFieldBaseDialog, ConfigurePopfieldTextL
00119         * Configuration values (text) into Popup Fields.
00120         */
00121         void ConfigurePopfieldValueL();
00122 
00123         /**
00124         * From CAknForm 
00125         * Save the contents of the form.
00126         * @return TBool Save Form Data?
00127         */
00128         TBool SaveFormDataL();
00129 
00130         /**
00131         * From CAknForm DoNotSaveFormDataL
00132         * Does not save the contents of the form.
00133         */
00134         void DoNotSaveFormDataL();
00135 
00136 
00137     private: // Data
00138 
00139 
00140          /**
00141         * iTextEmptyArray
00142         * Owned by CAknExPopFieldAttribSetDialog object.
00143         */
00144         CDesCArray* iTextEmptyArray[KAknExPopFieldAttribSetControlCount]; 
00145 
00146         /**
00147         * iTextEmptyArray
00148         * Owned by CAknExPopFieldAttribSetDialog object.
00149         */
00150         CAknQueryValueTextArray* iValueTextArrayWithNoElements
00151                          [KAknExPopFieldAttribSetControlCount];
00152 
00153         /**
00154         * iTextValues
00155         * Owned by CAknExPopFieldAttribSetDialog object.
00156         */
00157         CAknQueryValueText* iTextValues[KAknExPopFieldAttribSetControlCount];
00158 
00159 
00160         /** Flag for SaveMenu? **/
00161         TBool iIsSaveMenuFlag;
00162 
00163         /** Counter for indexvalue **/
00164         TInt iIndexValue[KAknExPopFieldAttribSetControlCount];
00165 
00166     };
00167 
00168 #endif  //__AKNEXPOPFIELDATTRIBSETDIALOG_H__
00169 
00170 // End of File

© Nokia 2009

Back to top