|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : aknexpopfieldmultipagedialog.cpp 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 // INCLUDE FILES 00017 #include <eikenv.h> 00018 #include <aknpopupfield.h> 00019 #include <aknqueryvaluetext.h> 00020 #include <AknExPopField.rsg> 00021 00022 #include "AknExPopField.hrh" 00023 #include "AknExPopFieldMultiPageDialog.h" 00024 00025 00026 // ================= MEMBER FUNCTIONS ========================================= 00027 00028 // ---------------------------------------------------------------------------- 00029 // CAknExPopFieldMultiPageDialog* CAknExPopFieldMultiPageDialog::NewLC() 00030 // Two-phased constructor. 00031 // ---------------------------------------------------------------------------- 00032 // 00033 CAknExPopFieldMultiPageDialog* CAknExPopFieldMultiPageDialog::NewLC() 00034 { 00035 CAknExPopFieldMultiPageDialog* self = 00036 new ( ELeave ) CAknExPopFieldMultiPageDialog; 00037 CleanupStack::PushL( self ); 00038 self->ConstructL(); 00039 return self; 00040 } 00041 00042 // ---------------------------------------------------------------------------- 00043 // CAknExPopFieldMultiPageDialog::~CAknExPopFieldMultiPageDialog() 00044 // Destructor. 00045 // ---------------------------------------------------------------------------- 00046 // 00047 CAknExPopFieldMultiPageDialog::~CAknExPopFieldMultiPageDialog() 00048 { 00049 DiscardArray(); 00050 } 00051 00052 // ---------------------------------------------------------------------------- 00053 // CAknExPopFieldMultiPageDialog::CAknExPopFieldMultiPageDialog() 00054 // C++ default constructor can NOT contain any code, that might leave. 00055 // ---------------------------------------------------------------------------- 00056 // 00057 CAknExPopFieldMultiPageDialog::CAknExPopFieldMultiPageDialog() : 00058 iTextArray( NULL ), 00059 iValueTextArray( NULL ), 00060 iNumberArray( NULL ), 00061 iValueNumberArray( NULL ), 00062 iPhoneArray( NULL ), 00063 iValuePhoneArray( NULL ), 00064 iTimeArray( NULL ), 00065 iValueTimeArray( NULL ), 00066 iDateArray( NULL ), 00067 iValueDateArray( NULL ), 00068 iDurationArray( NULL ), 00069 iValueDurationArray( NULL ) 00070 { 00071 00072 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00073 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00074 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00075 { 00076 iTextValues[ index ] = NULL; 00077 iNumberValues[ index ] = NULL; 00078 iPhoneValues[ index ] = NULL; 00079 iTimeValues[ index ] = NULL; 00080 iDateValues[ index ] = NULL; 00081 iDurationValues[ index ] = NULL; 00082 } 00083 } 00084 00085 // ---------------------------------------------------------------------------- 00086 // CAknExPopFieldMultiPageDialog::DiscardArray() 00087 // Discard array in popup field object. 00088 // ---------------------------------------------------------------------------- 00089 // 00090 void CAknExPopFieldMultiPageDialog::DiscardArray() 00091 { 00092 if ( iTextArray ) 00093 { 00094 delete iTextArray; 00095 iTextArray = NULL; 00096 } 00097 if ( iValueTextArray ) 00098 { 00099 delete iValueTextArray; 00100 iValueTextArray = NULL; 00101 } 00102 if ( iNumberArray ) 00103 { 00104 delete iNumberArray; 00105 iNumberArray = NULL; 00106 } 00107 if ( iValueNumberArray ) 00108 { 00109 delete iValueNumberArray; 00110 iValueNumberArray = NULL; 00111 } 00112 if ( iPhoneArray ) 00113 { 00114 delete iPhoneArray; 00115 iPhoneArray = NULL; 00116 } 00117 if ( iValuePhoneArray ) 00118 { 00119 delete iValuePhoneArray; 00120 iValuePhoneArray = NULL; 00121 } 00122 if ( iTimeArray ) 00123 { 00124 delete iTimeArray; 00125 iTimeArray = NULL; 00126 } 00127 if ( iValueTimeArray ) 00128 { 00129 delete iValueTimeArray; 00130 iValueTimeArray = NULL; 00131 } 00132 if ( iDateArray ) 00133 { 00134 delete iDateArray; 00135 iDateArray = NULL; 00136 } 00137 if ( iValueDateArray ) 00138 { 00139 delete iValueDateArray; 00140 iValueDateArray = NULL; 00141 } 00142 if ( iDurationArray ) 00143 { 00144 delete iDurationArray; 00145 iDurationArray = NULL; 00146 } 00147 if ( iValueDurationArray ) 00148 { 00149 delete iValueDurationArray; 00150 iValueDurationArray = NULL; 00151 } 00152 00153 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00154 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00155 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00156 { 00157 if ( iTextValues[index] ) 00158 { 00159 delete iTextValues[ index ]; 00160 iTextValues[ index ] = NULL; 00161 } 00162 if ( iNumberValues[ index ] ) 00163 { 00164 delete iNumberValues[ index ]; 00165 iNumberValues[ index ] = NULL; 00166 } 00167 if ( iPhoneValues[ index ] ) 00168 { 00169 delete iPhoneValues[ index ]; 00170 iPhoneValues[ index ] = NULL; 00171 } 00172 if ( iTimeValues[ index ] ) 00173 { 00174 delete iTimeValues[ index ]; 00175 iTimeValues[ index ] = NULL; 00176 } 00177 if ( iDateValues[ index ] ) 00178 { 00179 delete iDateValues[ index ]; 00180 iDateValues[ index ] = NULL; 00181 } 00182 if ( iDurationValues[ index ] ) 00183 { 00184 delete iDurationValues[ index ]; 00185 iDurationValues[ index ] = NULL; 00186 } 00187 } 00188 } 00189 00190 // ---------------------------------------------------------------------------- 00191 // CAknExPopFieldMultiPageDialog::ConfigurePopfieldValueL() 00192 // Configuration values into Popup Fields. 00193 // ---------------------------------------------------------------------------- 00194 // 00195 void CAknExPopFieldMultiPageDialog::ConfigurePopfieldValueL() 00196 { 00197 // Discard array. 00198 DiscardArray(); 00199 00200 ConfigurePageTextL(); 00201 ConfigurePageNumberL(); 00202 ConfigurePagePhoneL(); 00203 ConfigurePageTimeL(); 00204 ConfigurePageDateL(); 00205 ConfigurePageDurationL(); 00206 } 00207 00208 // ---------------------------------------------------------------------------- 00209 // CAknExPopFieldMultiPageDialog::ConfigurePageTextL() 00210 // Configuration values (text) into Popup Fields. 00211 // ---------------------------------------------------------------------------- 00212 // 00213 void CAknExPopFieldMultiPageDialog::ConfigurePageTextL() 00214 { 00215 // Calculate number of pop-up field. 00216 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00217 TInt count( KAknExPopFieldMultiPageCountInitialize ); 00218 TInt controlId( KAknExPopFieldMultiPageControlIdInitialize ); 00219 CAknPopupField* popup[ KAknExPopFieldMaxMultiPageValueField ]; 00220 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00221 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00222 { 00223 popup[ index ] = NULL; 00224 controlId = EAknExPopFieldDlgCtrlIdText01 + index; 00225 CCoeControl* control = ControlOrNull( controlId ); 00226 if ( control ) 00227 { 00228 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00229 count++; 00230 } 00231 } 00232 00233 // Create text array. 00234 iTextArray = iCoeEnv->ReadDesCArrayResourceL( 00235 R_AKNEXPOPFIELD_SIX_TEXT_ARRAY ); 00236 iValueTextArray = CAknQueryValueTextArray::NewL(); 00237 iValueTextArray->SetArray( *iTextArray ); 00238 00239 // Set the same array into all the values, and initial value index. 00240 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00241 index < count; index++ ) 00242 { 00243 iTextValues[ index ] = CAknQueryValueText::NewL(); 00244 iTextValues[ index ]->SetArrayL( iValueTextArray ); 00245 iTextValues[ index ]->SetCurrentValueIndex( NULL ); 00246 iTextValues[ index ]->SetQueryCaption( R_AKNEXPOPFIELD_QUERY_PROMPT ); 00247 } 00248 00249 // Set values into popup fields. 00250 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00251 index < count; index++ ) 00252 { 00253 popup[ index ]->SetQueryValueL( iTextValues[ index ] ); 00254 } 00255 } 00256 00257 // ---------------------------------------------------------------------------- 00258 // CAknExPopFieldMultiPageDialog::ConfigurePageNumberL() 00259 // Configuration values (number) into Popup Fields. 00260 // ---------------------------------------------------------------------------- 00261 // 00262 void CAknExPopFieldMultiPageDialog::ConfigurePageNumberL() 00263 { 00264 // Calculate number of pop-up field. 00265 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00266 TInt count( KAknExPopFieldMultiPageCountInitialize ); 00267 TInt controlId( KAknExPopFieldMultiPageControlIdInitialize ); 00268 CAknPopupField* popup[KAknExPopFieldMaxMultiPageValueField]; 00269 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00270 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00271 { 00272 popup[index] = NULL; 00273 controlId = EAknExPopFieldDlgCtrlIdNum01 + index; 00274 CCoeControl* control = ControlOrNull( controlId ); 00275 if ( control ) 00276 { 00277 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00278 count++; 00279 } 00280 } 00281 00282 // create an array of numbers 00283 iNumberArray = new ( ELeave ) CArrayFixFlat<TInt>( 00284 KAknExPopFieldMultiPageInitialArrayElementCount ); 00285 TInt value( KAknExPopFieldValueInitialize ); 00286 for ( value = KAknExPopFieldNumberArrayMinimumValue; 00287 value < KAknExPopFieldNumberArrayMaximumValue ; 00288 value += KAknExPopFieldNumberArrayStepValue ) 00289 { 00290 iNumberArray->AppendL( value ); 00291 } 00292 00293 // wrap the number array 00294 iValueNumberArray = CAknQueryValueNumberArray::NewL( 00295 R_AKNEXPOPFIELD_NUM_FORMAT_STRING_TEXT ); 00296 iValueNumberArray->SetArray( *iNumberArray ); 00297 00298 // set the same array into all the values, and set initial index values 00299 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00300 index < count; index++ ) 00301 { 00302 iNumberValues[ index ] = CAknQueryValueNumber::NewL(); 00303 iNumberValues[ index ]->SetArrayL( iValueNumberArray ); 00304 iNumberValues[ index ]->SetCurrentValueIndex( NULL ); 00305 iNumberValues[ index ]->SetQueryCaption( 00306 R_AKNEXPOPFIELD_QUERY_PROMPT ); 00307 } 00308 00309 // set values into popup fields 00310 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00311 index < count; index++ ) 00312 { 00313 popup[ index ]->SetQueryValueL( iNumberValues[ index ] ); 00314 } 00315 } 00316 00317 // ---------------------------------------------------------------------------- 00318 // CAknExPopFieldMultiPageDialog::ConfigurePagePhoneL() 00319 // Configuration values (phone) into Popup Fields. 00320 // ---------------------------------------------------------------------------- 00321 // 00322 void CAknExPopFieldMultiPageDialog::ConfigurePagePhoneL() 00323 { 00324 // Calculate number of pop-up field. 00325 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00326 TInt count( KAknExPopFieldMultiPageCountInitialize ); 00327 TInt controlId( KAknExPopFieldMultiPageControlIdInitialize ); 00328 CAknPopupField* popup[ KAknExPopFieldMaxMultiPageValueField ]; 00329 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00330 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00331 { 00332 popup[ index ] = NULL; 00333 controlId = EAknExPopFieldDlgCtrlIdPhon01 + index; 00334 CCoeControl* control = ControlOrNull( controlId ); 00335 if ( control ) 00336 { 00337 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00338 count++; 00339 } 00340 } 00341 00342 // create an array of phone 00343 iPhoneArray = iCoeEnv->ReadDesCArrayResourceL( 00344 R_AKNEXPOPFIELD_SIX_PHONE_ARRAY ); 00345 iValuePhoneArray = CAknQueryValuePhoneArray::NewL(); 00346 iValuePhoneArray->SetArray( *iPhoneArray ); 00347 00348 // set the same array into all the values, and set initial index values 00349 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00350 index < count; index++ ) 00351 { 00352 iPhoneValues[ index ] = CAknQueryValuePhone::NewL(); 00353 iPhoneValues[ index ]->SetArrayL( iValuePhoneArray ); 00354 iPhoneValues[ index ]->SetCurrentValueIndex( NULL ); 00355 iPhoneValues[ index ]->SetQueryCaption( R_AKNEXPOPFIELD_QUERY_PROMPT ); 00356 } 00357 // set values into popup fields 00358 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00359 index < count; index++ ) 00360 { 00361 popup[ index ]->SetQueryValueL( iPhoneValues[ index ] ); 00362 } 00363 } 00364 00365 // ---------------------------------------------------------------------------- 00366 // CAknExPopFieldMultiPageDialog::ConfigurePageTimeL() 00367 // Configuration values (time) into Popup Fields. 00368 // ---------------------------------------------------------------------------- 00369 // 00370 void CAknExPopFieldMultiPageDialog::ConfigurePageTimeL() 00371 { 00372 // Calculate number of pop-up field. 00373 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00374 TInt count( KAknExPopFieldMultiPageCountInitialize ); 00375 TInt controlId( KAknExPopFieldMultiPageControlIdInitialize ); 00376 CAknPopupField* popup[ KAknExPopFieldMaxMultiPageValueField ]; 00377 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00378 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00379 { 00380 popup[ index ] = NULL; 00381 controlId = EAknExPopFieldDlgCtrlIdTime01 + index; 00382 CCoeControl* control = ControlOrNull( controlId ); 00383 if ( control ) 00384 { 00385 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00386 count++; 00387 } 00388 } 00389 00390 // create an array of time 00391 TBuf<KAknExPopFieldArrayTextBufLength> text( NULL ); 00392 iCoeEnv->ReadResource( text, R_AKNEXPOPFIELD_TIME_INITIAL_TEXT ); 00393 iTimeArray = new ( ELeave ) CArrayFixFlat<TTime>( 00394 KAknExPopFieldMultiPageInitialArrayElementCount ); 00395 TTime value( text ); 00396 TInt step( KAknExPopFieldStepInitialize ); 00397 for ( step = KAknExPopFieldStepInitialize; 00398 step < KAknExPopFieldTimeArrayStepNumber; step++ ) 00399 { 00400 iTimeArray->AppendL( value ); 00401 value += KAknExPopFieldTimeArrayStepHour; 00402 } 00403 00404 // wrap the time array 00405 iValueTimeArray = CAknQueryValueTimeArray::NewL( 00406 R_AKNEXPOPFIELD_TIME_FORMAT_STRING_TEXT ); 00407 iValueTimeArray->SetArray( *iTimeArray ); 00408 00409 // set the same array into all the values, and set initial index values 00410 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00411 index < count; index++ ) 00412 { 00413 iTimeValues[ index ] = CAknQueryValueTime::NewL(); 00414 iTimeValues[ index ]->SetArrayL( iValueTimeArray ); 00415 iTimeValues[ index ]->SetCurrentValueIndex( NULL ); 00416 iTimeValues[ index ]->SetQueryCaption( R_AKNEXPOPFIELD_QUERY_PROMPT ); 00417 } 00418 00419 // set values into popup fields 00420 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00421 index < count; index++ ) 00422 { 00423 popup[ index ]->SetQueryValueL( iTimeValues[ index ] ); 00424 } 00425 } 00426 00427 // ---------------------------------------------------------------------------- 00428 // CAknExPopFieldMultiPageDialog::ConfigurePageDateL() 00429 // Configuration values (date) into Popup Fields. 00430 // ---------------------------------------------------------------------------- 00431 // 00432 void CAknExPopFieldMultiPageDialog::ConfigurePageDateL() 00433 { 00434 // Calculate number of pop-up field. 00435 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00436 TInt count( KAknExPopFieldMultiPageCountInitialize ); 00437 TInt controlId( KAknExPopFieldMultiPageControlIdInitialize ); 00438 CAknPopupField* popup[ KAknExPopFieldMaxMultiPageValueField ]; 00439 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00440 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00441 { 00442 popup[ index ] = NULL; 00443 controlId = EAknExPopFieldDlgCtrlIdDate01 + index; 00444 CCoeControl* control = ControlOrNull( controlId ); 00445 if ( control ) 00446 { 00447 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00448 count++; 00449 } 00450 } 00451 00452 // create an array of date 00453 TBuf<KAknExPopFieldArrayTextBufLength> text( NULL ); 00454 iCoeEnv->ReadResource( text, R_AKNEXPOPFIELD_DATE_INITIAL_TEXT ); 00455 iDateArray = new ( ELeave ) CArrayFixFlat<TTime>( 00456 KAknExPopFieldMultiPageInitialArrayElementCount ); 00457 TTime value( text ); 00458 TInt step( KAknExPopFieldStepInitialize ); 00459 for ( step = KAknExPopFieldStepInitialize; 00460 step < KAknExPopFieldDateArrayStepNumber; step++ ) 00461 { 00462 iDateArray->AppendL( value ); 00463 value += KAknExPopFieldDateArrayStepDay; 00464 } 00465 00466 // wrap the date array 00467 iValueDateArray = CAknQueryValueDateArray::NewL( 00468 R_AKNEXPOPFIELD_DATE_FORMAT_STRING_TEXT ); 00469 iValueDateArray->SetArray( *iDateArray ); 00470 00471 // set the same array into all the values, and set initial index values 00472 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00473 index < count; index++ ) 00474 { 00475 iDateValues[ index ] = CAknQueryValueDate::NewL(); 00476 iDateValues[ index ]->SetArrayL( iValueDateArray ); 00477 iDateValues[ index ]->SetCurrentValueIndex( NULL ); 00478 iDateValues[ index ]->SetQueryCaption( R_AKNEXPOPFIELD_QUERY_PROMPT ); 00479 } 00480 // set values into popup fields 00481 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00482 index < count; index++ ) 00483 { 00484 popup[ index ]->SetQueryValueL( iDateValues[ index ] ); 00485 } 00486 } 00487 00488 // ---------------------------------------------------------------------------- 00489 // CAknExPopFieldMultiPageDialog::ConfigurePageDurationL() 00490 // Configuration values (duration) into Popup Fields. 00491 // ---------------------------------------------------------------------------- 00492 // 00493 void CAknExPopFieldMultiPageDialog::ConfigurePageDurationL() 00494 { 00495 // Calculate number of pop-up field. 00496 TInt index( KAknExPopFieldMultiPageIndexInitialize ); 00497 TInt count( KAknExPopFieldMultiPageCountInitialize ); 00498 TInt controlId( KAknExPopFieldMultiPageControlIdInitialize ); 00499 CAknPopupField* popup[ KAknExPopFieldMaxMultiPageValueField ]; 00500 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00501 index < KAknExPopFieldMaxMultiPageValueField; index++ ) 00502 { 00503 popup[index] = NULL; 00504 controlId = EAknExPopFieldDlgCtrlIdDura01 + index; 00505 CCoeControl* control = ControlOrNull( controlId ); 00506 if ( control ) 00507 { 00508 popup[ count ] = static_cast<CAknPopupField*> ( control ); 00509 count++; 00510 } 00511 } 00512 00513 // create an array of duration 00514 iDurationArray = new ( ELeave ) CArrayFixFlat<TTimeIntervalSeconds>( 00515 KAknExPopFieldMultiPageInitialArrayElementCount ); 00516 TInt value( KAknExPopFieldValueInitialize ); 00517 for ( value = KAknExPopFieldDuraArrayMinimumValue; 00518 value < KAknExPopFieldDuraArrayMaximumValue; 00519 value += KAknExPopFieldDuraArrayStepValue ) 00520 { 00521 TTimeIntervalSeconds interval( value ); 00522 iDurationArray->AppendL( interval ); 00523 } 00524 00525 // wrap the duration array 00526 iValueDurationArray = CAknQueryValueDurationArray::NewL( 00527 R_AKNEXPOPFIELD_DURA_FORMAT_STRING_TEXT ); 00528 iValueDurationArray->SetArray( *iDurationArray ); 00529 00530 // set the same array into all the values, and set initial index values 00531 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00532 index < count; index++ ) 00533 { 00534 iDurationValues[ index ] = CAknQueryValueDuration::NewL(); 00535 iDurationValues[ index ]->SetArrayL( iValueDurationArray ); 00536 iDurationValues[ index ]->SetCurrentValueIndex( NULL ); 00537 iDurationValues[ index ]-> 00538 SetQueryCaption( R_AKNEXPOPFIELD_QUERY_PROMPT ); 00539 } 00540 00541 // set values into popup fields 00542 for ( index = KAknExPopFieldMultiPageIndexInitialize; 00543 index < count; index++ ) 00544 { 00545 popup[ index ]->SetQueryValueL( iDurationValues[ index ] ); 00546 } 00547 } 00548 00549 // ---------------------------------------------------------------------------- 00550 // CAknExPopFieldMultiPageDialog::SaveFormDataL() 00551 // Save form data. 00552 // ---------------------------------------------------------------------------- 00553 // 00554 TBool CAknExPopFieldMultiPageDialog::SaveFormDataL() 00555 { 00556 for ( TInt i = KAknExPopFieldMultiPageIndexInitialize; 00557 i < KAknExPopFieldMaxMultiPageValueField; i++ ) 00558 { 00559 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdText01+i ) ) 00560 { 00561 iIndexValueText[ i ] = iTextValues[ i ]->CurrentValueIndex(); 00562 } 00563 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdNum01+i ) ) 00564 { 00565 iIndexValueNumber[ i ] = iNumberValues[ i ]->CurrentValueIndex(); 00566 } 00567 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdPhon01+ i ) ) 00568 { 00569 iIndexValuePhone[ i ] = iPhoneValues[ i ]->CurrentValueIndex(); 00570 } 00571 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdTime01+i ) ) 00572 { 00573 iIndexValueTime[ i ] = iTimeValues[ i ]->CurrentValueIndex(); 00574 } 00575 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdDate01+i ) ) 00576 { 00577 iIndexValueDate[ i ] = iDateValues[ i ]->CurrentValueIndex(); 00578 } 00579 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdDura01+i ) ) 00580 { 00581 iIndexValueDuration[ i ] = 00582 iDurationValues[ i ]->CurrentValueIndex(); 00583 } 00584 } 00585 00586 return ETrue; 00587 } 00588 00589 // ---------------------------------------------------------------------------- 00590 // CAknExPopFieldMultiPageDialog::DoNotSaveFormDataL() 00591 // Does not save form data. 00592 // ---------------------------------------------------------------------------- 00593 // 00594 void CAknExPopFieldMultiPageDialog::DoNotSaveFormDataL() 00595 { 00596 for ( TInt i = KAknExPopFieldMultiPageIndexInitialize; 00597 i < KAknExPopFieldMaxMultiPageValueField; i++ ) 00598 { 00599 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdText01+i ) ) 00600 { 00601 iTextValues[ i ]->SetCurrentValueIndex( iIndexValueText[ i ] ); 00602 } 00603 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdNum01+i ) ) 00604 { 00605 iNumberValues[ i ]->SetCurrentValueIndex( iIndexValueNumber[ i ] ); 00606 } 00607 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdPhon01+i ) ) 00608 { 00609 iPhoneValues[ i ]->SetCurrentValueIndex( iIndexValuePhone[ i ] ); 00610 } 00611 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdTime01+i ) ) 00612 { 00613 iTimeValues[ i ]->SetCurrentValueIndex( iIndexValueTime[ i ] ); 00614 } 00615 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdDate01+i ) ) 00616 { 00617 iDateValues[ i ]->SetCurrentValueIndex( iIndexValueDate[ i ] ); 00618 } 00619 if ( ControlOrNull( EAknExPopFieldDlgCtrlIdDura01+i ) ) 00620 { 00621 iDurationValues[ i ]-> 00622 SetCurrentValueIndex( iIndexValueDuration[ i ] ); 00623 } 00624 } 00625 } 00626 00627 // End of File
|
© Nokia 2009 |