|
Nokia N97 SDK Example Applications Guide |
#include <aknexpopfieldoptionallistdialog.h>
Inheritance diagram for CAknExPopFieldOptionalListDialog:

Definition at line 46 of file aknexpopfieldoptionallistdialog.h.
Public Member Functions |
|
| virtual | ~CAknExPopFieldOptionalListDialog () |
| virtual void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
| virtual void | ProcessCommandL (TInt aCommandId) |
Static Public Member Functions |
|
| static CAknExPopFieldOptionalListDialog * | NewLC () |
Protected Member Functions |
|
| virtual TBool | OkToExitL (TInt aButtonId) |
Private Types |
|
| enum | TAknExPopFieldTextArrayIndex { EAknExPopFieldTextArrayIndex0, EAknExPopFieldTextArrayIndex1, EAknExPopFieldTextArrayIndex2, EAknExPopFieldTextArrayIndex3, EAknExPopFieldTextArrayIndex4, EAknExPopFieldTextArrayIndex5, EAknExPopFieldTextArrayIndex6, EAknExPopFieldTextArrayIndex7, EAknExPopFieldTextArrayIndex8, EAknExPopFieldTextArrayIndex9, EAknExPopFieldTextArrayIndex10, EAknExPopFieldTextArrayIndex11, EAknExPopFieldTextArrayIndex12 } |
Private Member Functions |
|
| CAknExPopFieldOptionalListDialog () | |
| void | DiscardTextArray () |
| void | ConfigurePopfieldValueL () |
| TBool | SaveFormDataL () |
| void | DoNotSaveFormDataL () |
Private Attributes |
|
| CDesCArray * | iTextArray [KAknExPopFieldMaxOLTextValueField] |
| CAknQueryValueTextArray * | iValueTextArray [KAknExPopFieldMaxOLTextValueField] |
| CAknQueryValueText * | iTextValues [KAknExPopFieldMaxOLTextValueField] |
| TInt | iIndexValue [KAknExPopFieldMaxOLTextValueField] |
|
|
CAknExPopFieldOptionalListDialog Virtual Destructor. Definition at line 64 of file aknexpopfieldoptionallistdialog.cpp. References DiscardTextArray(). 00065 { 00066 DiscardTextArray(); 00067 }
|
|
|
CAknExPopFieldOptionalListDialog C++ default constructor. Definition at line 33 of file aknexpopfieldoptionallistdialog.cpp. References iTextArray, iTextValues, and iValueTextArray. 00034 { 00035 TInt index( KAknExPopFieldOLIndexInitialize ); 00036 for ( index = KAknExPopFieldOLIndexInitialize; 00037 index < KAknExPopFieldMaxOLTextValueField; index++ ) 00038 { 00039 iTextArray[ index ] = NULL; 00040 iValueTextArray[ index ] = NULL; 00041 iTextValues[ index ] = NULL; 00042 } 00043 }
|
|
|
NewLC Two-phase constructor. Definition at line 50 of file aknexpopfieldoptionallistdialog.cpp. Referenced by CAknExPopFieldContainer::DisplayOptionalTextPopFieldL(). 00051 { 00052 CAknExPopFieldOptionalListDialog* self = 00053 new ( ELeave ) CAknExPopFieldOptionalListDialog; 00054 CleanupStack::PushL( self ); 00055 self->ConstructL(); 00056 return self; 00057 }
|
|
|
DiscardTextArray Discard text array in popup field object. Definition at line 75 of file aknexpopfieldoptionallistdialog.cpp. References iTextArray, iTextValues, and iValueTextArray. Referenced by ConfigurePopfieldValueL(), and ~CAknExPopFieldOptionalListDialog(). 00076 { 00077 TInt index( KAknExPopFieldOLIndexInitialize ); 00078 for ( index = KAknExPopFieldOLIndexInitialize; 00079 index < KAknExPopFieldMaxOLTextValueField; index++ ) 00080 { 00081 if ( iTextValues[ index ] ) 00082 { 00083 delete iTextValues[ index ]; 00084 iTextValues[ index ] = NULL; 00085 } 00086 if ( iValueTextArray[ index ] ) 00087 { 00088 delete iValueTextArray[ index ]; 00089 iValueTextArray[ index ] = NULL; 00090 } 00091 if ( iTextArray[ index ] ) 00092 { 00093 delete iTextArray[ index ]; 00094 iTextArray[ index ] = NULL; 00095 } 00096 } 00097 }
|
|
|
From CAknExPopFieldBaseDialog, ConfigurePopfieldTextL Configuration values (text) into Popup Fields. Implements CAknExPopFieldBaseDialog. Definition at line 104 of file aknexpopfieldoptionallistdialog.cpp. References DiscardTextArray(), iTextArray, iTextValues, and iValueTextArray. 00105 { 00106 // Discard textarray. 00107 DiscardTextArray(); 00108 00109 // Calculate number of pop-up field. 00110 TInt index( KAknExPopFieldOLIndexInitialize ); 00111 TInt count( KAknExPopFieldOLCountInitialize ); 00112 TInt controlId( KAknExPopFieldOLControlIdInitialize ); 00113 CAknPopupField* popup[ KAknExPopFieldMaxOLTextValueField ]; 00114 for ( index = KAknExPopFieldOLIndexInitialize; 00115 index < KAknExPopFieldMaxOLTextValueField; index++ ) 00116 { 00117 popup[ index ] = NULL; 00118 controlId = EAknExPopFieldDlgCtrlIdPop00 + index; 00119 CCoeControl* control = ControlOrNull( controlId ); 00120 if ( control ) 00121 { 00122 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00123 count++; 00124 } 00125 } 00126 00127 // Create textarray. 00128 iTextArray[ EAknExPopFieldTextArrayIndex0 ] = 00129 new ( ELeave ) CDesCArrayFlat( KAknExPopFieldInitialArrayElementCount ); 00130 iTextArray[ EAknExPopFieldTextArrayIndex1 ] = 00131 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_ONE_TEXT_ARRAY ); 00132 iTextArray[ EAknExPopFieldTextArrayIndex2 ] = 00133 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_TWO_TEXT_ARRAY ); 00134 iTextArray[ EAknExPopFieldTextArrayIndex3 ] = 00135 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_THREE_TEXT_ARRAY ); 00136 iTextArray[ EAknExPopFieldTextArrayIndex4 ] = 00137 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_FOUR_TEXT_ARRAY ); 00138 iTextArray[ EAknExPopFieldTextArrayIndex5 ] = 00139 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_FIVE_TEXT_ARRAY ); 00140 iTextArray[ EAknExPopFieldTextArrayIndex6 ] = 00141 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_SIX_TEXT_ARRAY ); 00142 iTextArray[ EAknExPopFieldTextArrayIndex7 ] = 00143 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_SEVEN_TEXT_ARRAY ); 00144 iTextArray[ EAknExPopFieldTextArrayIndex8 ] = 00145 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_EIGHT_TEXT_ARRAY ); 00146 iTextArray[ EAknExPopFieldTextArrayIndex9 ] = 00147 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_NINE_TEXT_ARRAY ); 00148 iTextArray[ EAknExPopFieldTextArrayIndex10 ] = 00149 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_TEN_TEXT_ARRAY ); 00150 iTextArray[ EAknExPopFieldTextArrayIndex11 ] = 00151 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_ELEVEN_TEXT_ARRAY ); 00152 iTextArray[ EAknExPopFieldTextArrayIndex12 ] = 00153 iCoeEnv->ReadDesCArrayResourceL( R_AKNEXPOPFIELD_TWELVE_TEXT_ARRAY ); 00154 00155 for ( index = KAknExPopFieldOLIndexInitialize; index < count; index++ ) 00156 { 00157 iValueTextArray[ index ] = CAknQueryValueTextArray::NewL(); 00158 iValueTextArray[ index ]->SetArray( *iTextArray[ index ] ); 00159 } 00160 00161 // Set the same textarray into all the values, and initial value index. 00162 for ( index = KAknExPopFieldOLIndexInitialize; index < count; index++ ) 00163 { 00164 iTextValues[ index ] = CAknQueryValueText::NewL(); 00165 iTextValues[ index ]->SetArrayL( iValueTextArray[ index ] ); 00166 if ( index != KAknExPopFieldEmptyFieldIndex ) // array is no empty 00167 { 00168 iTextValues[ index ]->SetCurrentValueIndex( NULL ); 00169 iTextValues[ index ]-> 00170 SetQueryCaption( R_AKNEXPOPFIELD_QUERY_PROMPT ); 00171 } 00172 } 00173 00174 // Set values into popup fields. 00175 for ( index = KAknExPopFieldOLIndexInitialize; index < count; index++ ) 00176 { 00177 popup[ index ]->SetQueryValueL( iTextValues[ index ] ); 00178 } 00179 }
|
|
|
From CAknForm, SaveFormDataL Save the contents of the form.
Definition at line 186 of file aknexpopfieldoptionallistdialog.cpp. References iIndexValue, and iTextValues. 00187 { 00188 for ( TInt i = KAknExPopFieldOLIndexInitialize; 00189 i < KAknExPopFieldMaxOLTextValueField; i++ ) 00190 { 00191 if( ControlOrNull( EAknExPopFieldDlgCtrlIdPop00+i ) ) 00192 { 00193 if ( i != KAknExPopFieldEmptyFieldIndex ) // array is no empty 00194 { 00195 iIndexValue[ i ] = iTextValues[ i ]->CurrentValueIndex(); 00196 } 00197 } 00198 } 00199 00200 return ETrue; 00201 }
|
|
|
From CAknForm, DoNotSaveFormDataL Does not save the contents of the form. Definition at line 208 of file aknexpopfieldoptionallistdialog.cpp. References iIndexValue, and iTextValues. 00209 { 00210 for( TInt i = KAknExPopFieldOLIndexInitialize; 00211 i < KAknExPopFieldMaxOLTextValueField; i++ ) 00212 { 00213 if( ControlOrNull( EAknExPopFieldDlgCtrlIdPop00+i ) ) 00214 { 00215 if ( i != KAknExPopFieldEmptyFieldIndex ) // array is no empty 00216 { 00217 iTextValues[ i ]->SetCurrentValueIndex( iIndexValue[ i ] ); 00218 } 00219 } 00220 } 00221 }
|
|
||||||||||||
|
From CAknDialog, DynInitMenuPaneL. Dims "Label", "Add" and "Delete" menu items.
Reimplemented in CAknExPopFieldAttribSetDialog. Definition at line 54 of file aknexpopfieldbasedialog.cpp. Referenced by CAknExPopFieldAttribSetDialog::DynInitMenuPaneL(). 00056 { 00057 CAknForm::DynInitMenuPaneL( aResourceId, aMenuPane ); 00058 if ( aResourceId == R_AVKON_FORM_MENUPANE ) 00059 { 00060 aMenuPane->SetItemDimmed( EAknFormCmdLabel, ETrue ); 00061 aMenuPane->SetItemDimmed( EAknFormCmdAdd, ETrue ); 00062 aMenuPane->SetItemDimmed( EAknFormCmdDelete, ETrue ); 00063 } 00064 }
|
|
|
From CAknDialog, ProcessCommandL.
Reimplemented in CAknExPopFieldAttribSetDialog. Definition at line 71 of file aknexpopfieldbasedialog.cpp.
|
|
|
From CAknDialog, OkToExitL.
Reimplemented in CAknExPopFieldAttribSetDialog, and CAknExPopFieldTextValueDialog. Definition at line 81 of file aknexpopfieldbasedialog.cpp. Referenced by CAknExPopFieldTextValueDialog::OkToExitL(), and CAknExPopFieldAttribSetDialog::OkToExitL().
|
|
|
iTextArray Owned by CAknExPopFieldOptionalListDialog object. Definition at line 130 of file aknexpopfieldoptionallistdialog.h. Referenced by CAknExPopFieldOptionalListDialog(), ConfigurePopfieldValueL(), and DiscardTextArray(). |
|
|
iValueTextArray Owned by CAknExPopFieldOptionalListDialog object. Definition at line 136 of file aknexpopfieldoptionallistdialog.h. Referenced by CAknExPopFieldOptionalListDialog(), ConfigurePopfieldValueL(), and DiscardTextArray(). |
|
|
iTextValues Owned by CAknExPopFieldOptionalListDialog object. Definition at line 142 of file aknexpopfieldoptionallistdialog.h. Referenced by CAknExPopFieldOptionalListDialog(), ConfigurePopfieldValueL(), DiscardTextArray(), DoNotSaveFormDataL(), and SaveFormDataL(). |
|
© Nokia 2009 |