107 |
107 |
108 if(iAlmDayFieldTextArray) |
108 if(iAlmDayFieldTextArray) |
109 { |
109 { |
110 delete iAlmDayFieldTextArray; |
110 delete iAlmDayFieldTextArray; |
111 } |
111 } |
|
112 if(iWeekDaysList) |
|
113 { |
|
114 delete iWeekDaysList; |
|
115 } |
112 // Close the session with alarm server. |
116 // Close the session with alarm server. |
113 iAlarmSrvSes.Close(); |
117 iAlarmSrvSes.Close(); |
114 |
118 |
115 __PRINTS( "CClockAlarmEditorImpl::~CClockAlarmEditorImpl - Exit" ); |
119 __PRINTS( "CClockAlarmEditorImpl::~CClockAlarmEditorImpl - Exit" ); |
116 } |
120 } |
400 // Set the value in the time editor control. |
404 // Set the value in the time editor control. |
401 SetTTimeEditorValue( EControlTimeEditor, iAlarmInfo.iAlarmTime ); |
405 SetTTimeEditorValue( EControlTimeEditor, iAlarmInfo.iAlarmTime ); |
402 |
406 |
403 //Single click integration |
407 //Single click integration |
404 // Set the value to be displayed in the control. |
408 // Set the value to be displayed in the control. |
405 |
409 if ( iShowAlarmDayControl && iAlmDayFieldTextValue) |
406 |
410 { |
|
411 iAlmDayFieldTextValue->SetCurrentValueIndex(iDayIndex); |
|
412 CAknPopupField* almDayCtrl = static_cast< CAknPopupField* > ( Control( EControlAlarmDayPopup ) ); |
|
413 if(almDayCtrl) |
|
414 { |
|
415 almDayCtrl->SetQueryValueL(iAlmDayFieldTextValue); |
|
416 } |
|
417 } |
|
418 |
407 |
419 |
408 // Now the alarm description. |
420 // Now the alarm description. |
409 HBufC* alarmDescription = HBufC::NewL( KMaxAlarmMessageLength ); |
421 HBufC* alarmDescription = HBufC::NewL( KMaxAlarmMessageLength ); |
410 CleanupStack::PushL( alarmDescription ); |
422 CleanupStack::PushL( alarmDescription ); |
411 // Copy the alarm description. |
423 // Copy the alarm description. |
567 // Initialize member data. |
579 // Initialize member data. |
568 iSelectedControl = KFirstLine; |
580 iSelectedControl = KFirstLine; |
569 iOccuranceIndex = KZerothDay; |
581 iOccuranceIndex = KZerothDay; |
570 iDayIndex = KZerothDay; |
582 iDayIndex = KZerothDay; |
571 iShowAlarmDayControl = ETrue; |
583 iShowAlarmDayControl = ETrue; |
572 |
584 |
|
585 // Alarm day field text control init. |
|
586 iWeekDaysList = iCoeEnv->ReadDesCArrayResourceL( R_CLOCK_WEEK_DAYS_ARRAY ); |
|
587 iAlmDayFieldTextArray = CAknQueryValueTextArray::NewL(); |
|
588 iAlmDayFieldTextArray->SetArray( *iWeekDaysList ); |
|
589 iAlmDayFieldTextValue = CAknQueryValueText::NewL(); |
|
590 iAlmDayFieldTextValue->SetArrayL( iAlmDayFieldTextArray ); |
|
591 |
573 // Connect to the alarm server. |
592 // Connect to the alarm server. |
574 User::LeaveIfError( iAlarmSrvSes.Connect() ); |
593 User::LeaveIfError( iAlarmSrvSes.Connect() ); |
575 |
594 |
576 // Get the alarm information if the alarm ID has been sent by the client. |
595 // Get the alarm information if the alarm ID has been sent by the client. |
577 SClkAlarmInfo alarmInfo; |
596 SClkAlarmInfo alarmInfo; |
827 TInt lineCount = GetNumberOfLinesOnPage( KZerothDay ); |
846 TInt lineCount = GetNumberOfLinesOnPage( KZerothDay ); |
828 |
847 |
829 // Insert the line at the position above. |
848 // Insert the line at the position above. |
830 InsertLineL( lineCount, R_CLOCK_ALARMDAY_POPUP_LINE, KZerothDay); |
849 InsertLineL( lineCount, R_CLOCK_ALARMDAY_POPUP_LINE, KZerothDay); |
831 |
850 |
832 CDesCArrayFlat* workDaysList = iCoeEnv->ReadDesCArrayResourceL( R_CLOCK_WEEK_DAYS_ARRAY ); |
|
833 iAlmDayFieldTextArray = CAknQueryValueTextArray::NewL(); |
|
834 iAlmDayFieldTextArray->SetArray( *workDaysList ); |
|
835 iAlmDayFieldTextValue = CAknQueryValueText::NewL(); |
|
836 iAlmDayFieldTextValue->SetArrayL( iAlmDayFieldTextArray ); |
|
837 iAlmDayFieldTextValue->SetCurrentValueIndex(dayIndex); |
851 iAlmDayFieldTextValue->SetCurrentValueIndex(dayIndex); |
838 CAknPopupField* aAlmDayCtrl = static_cast< CAknPopupField* > ( Control( EControlAlarmDayPopup ) ); |
852 CAknPopupField* almDayCtrl = static_cast< CAknPopupField* > ( Control( EControlAlarmDayPopup ) ); |
839 aAlmDayCtrl->SetQueryValueL(iAlmDayFieldTextValue); |
853 if(almDayCtrl) |
840 |
854 { |
|
855 almDayCtrl->SetQueryValueL(iAlmDayFieldTextValue); |
|
856 } |
841 // Set the flag to indicate that the alarm day control is present in the form. |
857 // Set the flag to indicate that the alarm day control is present in the form. |
842 iShowAlarmDayControl = ETrue; |
858 iShowAlarmDayControl = ETrue; |
843 |
859 |
844 // Update the page. |
860 // Update the page. |
845 UpdatePageL( ETrue ); |
861 UpdatePageL( ETrue ); |