480 HbDataFormModelItem::CustomItemBase, |
480 HbDataFormModelItem::CustomItemBase, |
481 QString(hbTrId("txt_clk_setlabel_time")), |
481 QString(hbTrId("txt_clk_setlabel_time")), |
482 mAlarmEditorModel->invisibleRootItem()); |
482 mAlarmEditorModel->invisibleRootItem()); |
483 mAlarmTimeItem->setContentWidgetData( |
483 mAlarmTimeItem->setContentWidgetData( |
484 "text", mAlarmInfo.nextDueTime.toString(mTimeFormat)); |
484 "text", mAlarmInfo.nextDueTime.toString(mTimeFormat)); |
|
485 mAlarmTimeItem->setContentWidgetData("objectName", "alarmTime"); |
485 mAlarmEditorForm->addConnection( |
486 mAlarmEditorForm->addConnection( |
486 mAlarmTimeItem, SIGNAL(pressed()), |
487 mAlarmTimeItem, SIGNAL(pressed()), |
487 this, SLOT(launchTimePicker())); |
488 this, SLOT(launchTimePicker())); |
488 |
489 |
489 // Occurence. |
490 // Occurence. |
495 repeatTypes << hbTrId("txt_clk_setlabel_val_once") |
496 repeatTypes << hbTrId("txt_clk_setlabel_val_once") |
496 << hbTrId("txt_clk_setlabel_val_repeat_daily") |
497 << hbTrId("txt_clk_setlabel_val_repeat_daily") |
497 << hbTrId("txt_clk_setlabel_val_repeat_weekly") |
498 << hbTrId("txt_clk_setlabel_val_repeat_weekly") |
498 << hbTrId("txt_clk_setlabel_val_repeat_on_workdays"); |
499 << hbTrId("txt_clk_setlabel_val_repeat_on_workdays"); |
499 mAlarmOccurenceItem->setContentWidgetData("items", repeatTypes); |
500 mAlarmOccurenceItem->setContentWidgetData("items", repeatTypes); |
|
501 mAlarmOccurenceItem->setContentWidgetData( |
|
502 "objectName", "alarmOccurence"); |
500 mAlarmEditorForm->addConnection( |
503 mAlarmEditorForm->addConnection( |
501 mAlarmOccurenceItem, SIGNAL(currentIndexChanged(int)), |
504 mAlarmOccurenceItem, SIGNAL(currentIndexChanged(int)), |
502 this, SLOT(handleOccurenceChanged(int))); |
505 this, SLOT(handleOccurenceChanged(int))); |
503 |
506 |
504 // Get the repeat type of alarm and set the value accordingly. |
507 // Get the repeat type of alarm and set the value accordingly. |
526 currentIndex += KDaysInWeek; |
529 currentIndex += KDaysInWeek; |
527 } |
530 } |
528 mAlarmDayItem->setContentWidgetData("items", alarmDays); |
531 mAlarmDayItem->setContentWidgetData("items", alarmDays); |
529 mAlarmDayItem->setContentWidgetData( |
532 mAlarmDayItem->setContentWidgetData( |
530 "currentIndex",currentIndex); |
533 "currentIndex",currentIndex); |
531 |
534 mAlarmDayItem->setContentWidgetData("objectName", "alarmDay"); |
532 mAlarmDayItemInserted = true; |
535 mAlarmDayItemInserted = true; |
533 }/* else { TODO: check and remove this else block. |
536 }/* else { TODO: check and remove this else block. |
534 HbDataFormModelItem *dayItem = formItem(2); |
537 HbDataFormModelItem *dayItem = formItem(2); |
535 dayItem->setData(mAlarmInfo.alarmDateTime.dayOfWeek() - 1, |
538 dayItem->setData(mAlarmInfo.alarmDateTime.dayOfWeek() - 1, |
536 "selected"); |
539 "selected"); |
549 "text", QString(hbTrId("txt_clk_setlabel_alarm_sound"))); |
552 "text", QString(hbTrId("txt_clk_setlabel_alarm_sound"))); |
550 |
553 |
551 if (AlarmVolumeOn == mAlarmInfo.volumeStatus) { |
554 if (AlarmVolumeOn == mAlarmInfo.volumeStatus) { |
552 mAlarmSoundItem->setContentWidgetData("checkState",Qt::Checked); |
555 mAlarmSoundItem->setContentWidgetData("checkState",Qt::Checked); |
553 } |
556 } |
554 |
557 mAlarmSoundItem->setContentWidgetData("objectName", "alarmaSound"); |
555 mAlarmEditorForm->addConnection( |
558 mAlarmEditorForm->addConnection( |
556 mAlarmSoundItem, SIGNAL(stateChanged(int)), |
559 mAlarmSoundItem, SIGNAL(stateChanged(int)), |
557 this,SLOT(handleAlarmSoundChanged(int))); |
560 this,SLOT(handleAlarmSoundChanged(int))); |
558 |
561 |
559 // Description. |
562 // Description. |
560 mAlarmDescription = mAlarmEditorModel->appendDataFormItem( |
563 mAlarmDescription = mAlarmEditorModel->appendDataFormItem( |
561 HbDataFormModelItem::TextItem, |
564 HbDataFormModelItem::TextItem, |
562 QString(hbTrId("txt_clk_formlabel_description")), |
565 QString(hbTrId("txt_clk_formlabel_description")), |
563 mAlarmEditorModel->invisibleRootItem()); |
566 mAlarmEditorModel->invisibleRootItem()); |
564 mAlarmDescription->setContentWidgetData("text", mAlarmInfo.alarmDesc); |
567 mAlarmDescription->setContentWidgetData("text", mAlarmInfo.alarmDesc); |
|
568 mAlarmDescription->setContentWidgetData("objectName", "alaramDescription"); |
565 |
569 |
566 } |
570 } |
567 |
571 |
568 /*! |
572 /*! |
569 Create the alarm info structure with desired values. |
573 Create the alarm info structure with desired values. |