Nokia N97 SDK
Example Applications Guide

aknexpopfieldmultipagedialog.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : aknexpopfieldmultipagedialog.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 __AKNEXPOPFIELDMULTIPAGEDIALOG_H__
00017 #define __AKNEXPOPFIELDMULTIPAGEDIALOG_H__
00018 
00019 // INCLUDES
00020 #include "AknExPopFieldBaseDialog.h"
00021 #include <AknQueryValueNumber.h>
00022 #include <AknQueryValuePhone.h>
00023 #include <AknQueryValueTime.h>
00024 #include <AknQueryValueDate.h>
00025 #include <AknQueryValueDuration.h>
00026 
00027 // CONSTANTS
00028 const TInt KAknExPopFieldMaxMultiPageValueField = 6;
00029 const TInt KAknExPopFieldMultiPageIndexInitialize = 0;
00030 const TInt KAknExPopFieldMultiPageCountInitialize = 0;
00031 const TInt KAknExPopFieldMultiPageControlIdInitialize = 0;
00032 const TInt KAknExPopFieldValueInitialize = 0;
00033 const TInt KAknExPopFieldStepInitialize = 0;
00034 const TInt KAknExPopFieldArrayTextBufLength = 256;
00035 const TInt KAknExPopFieldMultiPageInitialArrayElementCount = 4;
00036 const TInt KAknExPopFieldNumberArrayMinimumValue = 10;
00037 const TInt KAknExPopFieldNumberArrayMaximumValue = 100;
00038 const TInt KAknExPopFieldNumberArrayStepValue = 10;
00039 const TInt KAknExPopFieldTimeArrayStepNumber = 24;
00040 const TInt KAknExPopFieldDateArrayStepNumber = 31;
00041 const TInt KAknExPopFieldDuraArrayMinimumValue = 600;
00042 const TInt KAknExPopFieldDuraArrayMaximumValue = 6000;
00043 const TInt KAknExPopFieldDuraArrayStepValue = 600;
00044 
00045 #define KAknExPopFieldTimeArrayStepHour TTimeIntervalHours( 1 )
00046 #define KAknExPopFieldDateArrayStepDay TTimeIntervalDays( 1 )
00047 
00048 
00049 // FORWARD DECLARATIONS
00050 class CAknQueryValueTextArray;
00051 class CAknQueryValueNumberArray;
00052 class CAknQueryValuePhoneArray;
00053 class CAknQueryValueTimeArray;
00054 class CAknQueryValueDateArray;
00055 class CAknQueryValueDurationArray;
00056 class CAknQueryValueText;
00057 class CAknQueryValueNumber;
00058 class CAknQueryValuePhone;
00059 class CAknQueryValueTime;
00060 class CAknQueryValueDate;
00061 class CAknQueryValueDuration;
00062 
00063 
00064 
00065 // CLASS DECLARATION
00066 
00067 /**
00068 * CAknExPopFieldMultiPageDialog
00069 */
00070 class CAknExPopFieldMultiPageDialog : public CAknExPopFieldBaseDialog
00071     {
00072     public: // Constructors and destructor
00073 
00074         /**
00075         * NewLC
00076         * Two-phase constructor.
00077         */
00078         static CAknExPopFieldMultiPageDialog* NewLC();
00079 
00080         /**
00081         * CAknExPopFieldMultiPageDialog
00082         * Virtual Destructor.
00083         */
00084         virtual ~CAknExPopFieldMultiPageDialog();
00085 
00086     private: // Constructors.
00087 
00088         /**
00089         * CAknExPopFieldMultiPageDialog
00090         * C++ default constructor.
00091         */
00092         CAknExPopFieldMultiPageDialog();
00093 
00094     private: // New functions
00095 
00096         /**
00097         * DiscardArray
00098         * Discard array in popup field object.
00099         */
00100         void DiscardArray();
00101 
00102     private: // From CAknExPopFieldBaseDialog
00103 
00104         /**
00105         * From CAknExPopFieldBaseDialog, ConfigurePopfieldTextL
00106         * Configuration values into Popup Fields.
00107         */
00108         void ConfigurePopfieldValueL();
00109 
00110 
00111     private: // New functions
00112         /**
00113         * Configuration values (text) into Popup Fields.
00114         */
00115         void ConfigurePageTextL();
00116 
00117         /**
00118         * Configuration values (number) into Popup Fields.
00119         */
00120         void ConfigurePageNumberL();
00121 
00122         /**
00123         * Configuration values (phone) into Popup Fields.
00124         */
00125         void ConfigurePagePhoneL();
00126 
00127         /**
00128         * Configuration values (time) into Popup Fields.
00129         */
00130         void ConfigurePageTimeL();
00131 
00132         /**
00133         * Configuration values (date) into Popup Fields.
00134         */
00135         void ConfigurePageDateL();
00136 
00137         /**
00138         * Configuration values (duration) into Popup Fields.
00139         */
00140         void ConfigurePageDurationL();
00141 
00142         /**
00143         * From CAknForm 
00144         * Save the contents of the form.
00145         * @return TBool Save form data?
00146         */
00147         TBool SaveFormDataL(); 
00148 
00149         /**
00150         * From CAknForm, DoNotSaveFormDataL
00151         * Does not save the contents of the form.
00152         */
00153         void DoNotSaveFormDataL();
00154 
00155 
00156     private: // Data
00157 
00158         // For text array
00159 
00160         /**
00161         * iTextArray
00162         * Owned by CAknExPopFieldMultiPageDialog object.
00163         */
00164         CDesCArray*     iTextArray;
00165         
00166         /**
00167         * iValueTextArray
00168         * Owned by CAknExPopFieldMultiPageDialog object.
00169         */
00170         CAknQueryValueTextArray* iValueTextArray;
00171         
00172         /**
00173         * iTextValues
00174         * Owned by CAknExPopFieldMultiPageDialog object.
00175         */
00176         CAknQueryValueText* iTextValues[KAknExPopFieldMaxMultiPageValueField];
00177 
00178 
00179         // For number array
00180         
00181         /**
00182         * iNumberArray
00183         * Owned by CAknExPopFieldMultiPageDialog object.
00184         */
00185         CArrayFixFlat<TInt>* iNumberArray;
00186         /**
00187         * iValueNumberArray
00188         * Owned by CAknExPopFieldMultiPageDialog object.
00189         */
00190         CAknQueryValueNumberArray* iValueNumberArray;
00191         
00192         /**
00193         * iNumberValues
00194         * Owned by CAknExPopFieldMultiPageDialog object.
00195         */CAknQueryValueNumber* iNumberValues[
00196                                  KAknExPopFieldMaxMultiPageValueField];
00197 
00198 
00199         // For phone array
00200 
00201         /**
00202         * iPhoneArray
00203         * Owned by CAknExPopFieldMultiPageDialog object.
00204         */
00205         CDesCArray* iPhoneArray;
00206         
00207         /**
00208         * iValuePhoneArray
00209         * Owned by CAknExPopFieldMultiPageDialog object.
00210         */
00211         CAknQueryValuePhoneArray* iValuePhoneArray;
00212         
00213         /**
00214         * iTextArray
00215         * Owned by CAknExPopFieldMultiPageDialog object.
00216         */
00217         CAknQueryValuePhone* iPhoneValues[
00218                               KAknExPopFieldMaxMultiPageValueField];
00219 
00220 
00221         // For time array
00222         
00223         /**
00224         * iTimeArray
00225         * Owned by CAknExPopFieldMultiPageDialog object.
00226         */
00227         CArrayFixFlat<TTime>* iTimeArray;
00228         
00229         /**
00230         * iValueTimeArray
00231         * Owned by CAknExPopFieldMultiPageDialog object.
00232         */
00233         CAknQueryValueTimeArray* iValueTimeArray;
00234         
00235         /**
00236         * iTimeValues
00237         * Owned by CAknExPopFieldMultiPageDialog object.
00238         */
00239         CAknQueryValueTime* iTimeValues[
00240                              KAknExPopFieldMaxMultiPageValueField];
00241 
00242 
00243         // For date array
00244         
00245         /**
00246         * iDateArray
00247         * Owned by CAknExPopFieldMultiPageDialog object.
00248         */
00249         CArrayFixFlat<TTime>* iDateArray;
00250         
00251        /**
00252         * iValueDateArray
00253         * Owned by CAknExPopFieldMultiPageDialog object.
00254         */ 
00255         CAknQueryValueDateArray* iValueDateArray;
00256         
00257         /**
00258         * iDateValues
00259         * Owned by CAknExPopFieldMultiPageDialog object.
00260         */
00261         CAknQueryValueDate* iDateValues[
00262                              KAknExPopFieldMaxMultiPageValueField];
00263 
00264         // For duration array
00265         
00266         /**
00267         * iDurationArray
00268         * Owned by CAknExPopFieldMultiPageDialog object.
00269         */
00270         CArrayFixFlat<TTimeIntervalSeconds>* iDurationArray;
00271         
00272         /**
00273         * iValueDurationArray
00274         * Owned by CAknExPopFieldMultiPageDialog object.
00275         */
00276         CAknQueryValueDurationArray* iValueDurationArray;
00277         
00278         /**
00279         * iDurationValues
00280         * Owned by CAknExPopFieldMultiPageDialog object.
00281         */
00282         CAknQueryValueDuration* iDurationValues[
00283                                  KAknExPopFieldMaxMultiPageValueField];
00284         
00285         
00286         // Integers for field values.
00287         TInt iIndexValueText[KAknExPopFieldMaxMultiPageValueField];
00288         TInt iIndexValueNumber[KAknExPopFieldMaxMultiPageValueField];
00289         TInt iIndexValuePhone[KAknExPopFieldMaxMultiPageValueField];
00290         TInt iIndexValueTime[KAknExPopFieldMaxMultiPageValueField];
00291         TInt iIndexValueDate[KAknExPopFieldMaxMultiPageValueField];
00292         TInt iIndexValueDuration[KAknExPopFieldMaxMultiPageValueField];
00293     };
00294 
00295 #endif  //__AKNEXPOPFIELDMULTIPAGEDIALOG_H__
00296 
00297 // End of File

© Nokia 2009

Back to top