equal
deleted
inserted
replaced
29 #include <tz.h> |
29 #include <tz.h> |
30 #include <vtzrules.h> |
30 #include <vtzrules.h> |
31 #include <aknnotewrappers.h> |
31 #include <aknnotewrappers.h> |
32 #include <centralrepository.h> |
32 #include <centralrepository.h> |
33 #include <hlplch.h> |
33 #include <hlplch.h> |
|
34 #include <AknPopupField.h> |
|
35 #include <AknQueryValueText.h> |
|
36 #include <calenconstants.h> |
34 |
37 |
35 // User includes |
38 // User includes |
36 #include "clockalarmeditorimpl.h" |
39 #include "clockalarmeditorimpl.h" |
37 #include "clock.hrh" |
40 #include "clock.hrh" |
38 #include "clock.h" |
41 #include "clock.h" |
95 |
98 |
96 iCoeEnv->DeleteResourceFile( iOffset ); |
99 iCoeEnv->DeleteResourceFile( iOffset ); |
97 |
100 |
98 // Don't set the title pane text. |
101 // Don't set the title pane text. |
99 TRAP_IGNORE( SetTitleL( EFalse ) ); |
102 TRAP_IGNORE( SetTitleL( EFalse ) ); |
100 |
103 if(iAlmDayFieldTextValue) |
|
104 { |
|
105 delete iAlmDayFieldTextValue; |
|
106 } |
|
107 |
|
108 if(iAlmDayFieldTextArray) |
|
109 { |
|
110 delete iAlmDayFieldTextArray; |
|
111 } |
101 // Close the session with alarm server. |
112 // Close the session with alarm server. |
102 iAlarmSrvSes.Close(); |
113 iAlarmSrvSes.Close(); |
103 |
114 |
104 __PRINTS( "CClockAlarmEditorImpl::~CClockAlarmEditorImpl - Exit" ); |
115 __PRINTS( "CClockAlarmEditorImpl::~CClockAlarmEditorImpl - Exit" ); |
105 } |
116 } |
389 // Set the value in the time editor control. |
400 // Set the value in the time editor control. |
390 SetTTimeEditorValue( EControlTimeEditor, iAlarmInfo.iAlarmTime ); |
401 SetTTimeEditorValue( EControlTimeEditor, iAlarmInfo.iAlarmTime ); |
391 |
402 |
392 //Single click integration |
403 //Single click integration |
393 // Set the value to be displayed in the control. |
404 // Set the value to be displayed in the control. |
394 CAknPopupFieldText* alarmDaySelectionControl = |
405 |
395 static_cast< CAknPopupFieldText* > ( Control( EControlAlarmDayPopup ) ); |
406 |
396 |
|
397 if ( alarmDaySelectionControl ) |
|
398 { |
|
399 alarmDaySelectionControl->SetCurrentValueIndex( iDayIndex ); |
|
400 } |
|
401 |
407 |
402 // Now the alarm description. |
408 // Now the alarm description. |
403 HBufC* alarmDescription = HBufC::NewL( KMaxAlarmMessageLength ); |
409 HBufC* alarmDescription = HBufC::NewL( KMaxAlarmMessageLength ); |
404 CleanupStack::PushL( alarmDescription ); |
410 CleanupStack::PushL( alarmDescription ); |
405 // Copy the alarm description. |
411 // Copy the alarm description. |
687 void CClockAlarmEditorImpl::HandleAlarmDayCmdL() |
693 void CClockAlarmEditorImpl::HandleAlarmDayCmdL() |
688 { |
694 { |
689 __PRINTS( "CClockAlarmEditorImpl::HandleAlarmDayCmdL - Entry" ); |
695 __PRINTS( "CClockAlarmEditorImpl::HandleAlarmDayCmdL - Entry" ); |
690 //Single click integration |
696 //Single click integration |
691 // Get the value to be stored in iDayIndex |
697 // Get the value to be stored in iDayIndex |
692 CAknPopupFieldText* alarmDaySelectionControl = |
698 |
693 (CAknPopupFieldText*)Control( EControlAlarmDayPopup ); |
699 if ( iShowAlarmDayControl && iAlmDayFieldTextValue) |
694 |
700 { |
695 if ( alarmDaySelectionControl ) |
701 iDayIndex = iAlmDayFieldTextValue->CurrentValueIndex(); |
696 { |
|
697 iDayIndex = alarmDaySelectionControl->CurrentValueIndex(); |
|
698 } |
702 } |
699 } |
703 } |
700 |
704 |
701 // --------------------------------------------------------- |
705 // --------------------------------------------------------- |
702 // CClockAlarmEditorImpl::GetSelectedOccIndex |
706 // CClockAlarmEditorImpl::GetSelectedOccIndex |
823 TInt lineCount = GetNumberOfLinesOnPage( KZerothDay ); |
827 TInt lineCount = GetNumberOfLinesOnPage( KZerothDay ); |
824 |
828 |
825 // Insert the line at the position above. |
829 // Insert the line at the position above. |
826 InsertLineL( lineCount, R_CLOCK_ALARMDAY_POPUP_LINE, KZerothDay); |
830 InsertLineL( lineCount, R_CLOCK_ALARMDAY_POPUP_LINE, KZerothDay); |
827 |
831 |
828 CAknPopupFieldText* iAlmDayCtrl = static_cast< CAknPopupFieldText* > ( Control( EControlAlarmDayPopup ) ); |
832 CDesCArrayFlat* workDaysList = iCoeEnv->ReadDesCArrayResourceL( R_CLOCK_WEEK_DAYS_ARRAY ); |
829 iAlmDayCtrl->SetCurrentValueIndex( dayIndex ); |
833 iAlmDayFieldTextArray = CAknQueryValueTextArray::NewL(); |
|
834 iAlmDayFieldTextArray->SetArray( *workDaysList ); |
|
835 iAlmDayFieldTextValue = CAknQueryValueText::NewL(); |
|
836 iAlmDayFieldTextValue->SetArrayL( iAlmDayFieldTextArray ); |
|
837 iAlmDayFieldTextValue->SetCurrentValueIndex(dayIndex); |
|
838 CAknPopupField* aAlmDayCtrl = static_cast< CAknPopupField* > ( Control( EControlAlarmDayPopup ) ); |
|
839 aAlmDayCtrl->SetQueryValueL(iAlmDayFieldTextValue); |
830 |
840 |
831 // Set the flag to indicate that the alarm day control is present in the form. |
841 // Set the flag to indicate that the alarm day control is present in the form. |
832 iShowAlarmDayControl = ETrue; |
842 iShowAlarmDayControl = ETrue; |
833 |
843 |
834 // Update the page. |
844 // Update the page. |