341 mTimeFormatItem->setContentWidgetData("additionalText", mTimeFormatStringList[1]); |
341 mTimeFormatItem->setContentWidgetData("additionalText", mTimeFormatStringList[1]); |
342 } else { |
342 } else { |
343 mTimeFormatItem->setContentWidgetData("text", mTimeFormatStringList[1]); |
343 mTimeFormatItem->setContentWidgetData("text", mTimeFormatStringList[1]); |
344 mTimeFormatItem->setContentWidgetData("additionalText", mTimeFormatStringList[0]); |
344 mTimeFormatItem->setContentWidgetData("additionalText", mTimeFormatStringList[0]); |
345 } |
345 } |
|
346 mTimeFormatItem->setContentWidgetData("objectName", "timeFormat"); |
346 mForm->addConnection( |
347 mForm->addConnection( |
347 mTimeFormatItem, SIGNAL(clicked()), |
348 mTimeFormatItem, SIGNAL(clicked()), |
348 this, SLOT(handleTimeFormatChange())); |
349 this, SLOT(handleTimeFormatChange())); |
349 |
350 |
350 // Time separator item. |
351 // Time separator item. |
359 } else { |
360 } else { |
360 mTimeSeparatorItem->setContentWidgetData("text", mTimeSeparatorStringList[1]); |
361 mTimeSeparatorItem->setContentWidgetData("text", mTimeSeparatorStringList[1]); |
361 mTimeSeparatorItem->setContentWidgetData( |
362 mTimeSeparatorItem->setContentWidgetData( |
362 "additionalText", mTimeSeparatorStringList[0]); |
363 "additionalText", mTimeSeparatorStringList[0]); |
363 } |
364 } |
|
365 mTimeSeparatorItem->setContentWidgetData("objectName", "timeSeparator"); |
364 mForm->addConnection( |
366 mForm->addConnection( |
365 mTimeSeparatorItem, SIGNAL(clicked()), |
367 mTimeSeparatorItem, SIGNAL(clicked()), |
366 this, SLOT(handleTimeSeparatorChange())); |
368 this, SLOT(handleTimeSeparatorChange())); |
367 |
369 |
368 // Date format. |
370 // Date format. |
371 hbTrId("txt_clock_setlabel_date_format")); |
373 hbTrId("txt_clock_setlabel_date_format")); |
372 index = mSettingsUtility->dateFormat(mDateFormatStringList); |
374 index = mSettingsUtility->dateFormat(mDateFormatStringList); |
373 |
375 |
374 mDateFormatItem->setContentWidgetData("items", mDateFormatStringList); |
376 mDateFormatItem->setContentWidgetData("items", mDateFormatStringList); |
375 mDateFormatItem->setContentWidgetData("currentIndex",index); |
377 mDateFormatItem->setContentWidgetData("currentIndex",index); |
|
378 mDateFormatItem->setContentWidgetData("objectName", "dateFormat"); |
376 mForm->addConnection( |
379 mForm->addConnection( |
377 mDateFormatItem, SIGNAL(currentIndexChanged(QString)), |
380 mDateFormatItem, SIGNAL(currentIndexChanged(QString)), |
378 this, SLOT(handleDateFormatChange(QString))); |
381 this, SLOT(handleDateFormatChange(QString))); |
379 |
382 |
380 // Date separator. |
383 // Date separator. |
383 hbTrId("txt_clock_setlabel_date_separator")); |
386 hbTrId("txt_clock_setlabel_date_separator")); |
384 index = mSettingsUtility->dateSeparator(mDateSeparatorStringList); |
387 index = mSettingsUtility->dateSeparator(mDateSeparatorStringList); |
385 |
388 |
386 mDateSeparatorItem->setContentWidgetData("items", mDateSeparatorStringList); |
389 mDateSeparatorItem->setContentWidgetData("items", mDateSeparatorStringList); |
387 mDateSeparatorItem->setContentWidgetData("currentIndex",index); |
390 mDateSeparatorItem->setContentWidgetData("currentIndex",index); |
|
391 mDateSeparatorItem->setContentWidgetData("objectName", "dateSeparator"); |
388 mForm->addConnection( |
392 mForm->addConnection( |
389 mDateSeparatorItem, SIGNAL(currentIndexChanged(QString)), |
393 mDateSeparatorItem, SIGNAL(currentIndexChanged(QString)), |
390 this, SLOT(handleDateSeparatorChange(QString))); |
394 this, SLOT(handleDateSeparatorChange(QString))); |
391 |
395 |
392 // Workdays. |
396 // Workdays. |
406 static_cast<HbDataFormModelItem::DataItemType> |
410 static_cast<HbDataFormModelItem::DataItemType> |
407 (HbDataFormModelItem::CustomItemBase + 50); |
411 (HbDataFormModelItem::CustomItemBase + 50); |
408 item = new HbDataFormModelItem(workdaysItemType, |
412 item = new HbDataFormModelItem(workdaysItemType, |
409 hbTrId("txt_clock_setlabel_workdays")); |
413 hbTrId("txt_clock_setlabel_workdays")); |
410 mFormModel->appendDataFormItem(item); |
414 mFormModel->appendDataFormItem(item); |
|
415 item->setContentWidgetData("objectName", "workdays"); |
411 |
416 |
412 // Start of week item. |
417 // Start of week item. |
413 item = 0; |
418 item = 0; |
414 item = mFormModel->appendDataFormItem(HbDataFormModelItem::ComboBoxItem, |
419 item = mFormModel->appendDataFormItem(HbDataFormModelItem::ComboBoxItem, |
415 hbTrId("txt_clock_setlabel_week_starts_on")); |
420 hbTrId("txt_clock_setlabel_week_starts_on")); |
416 HbExtendedLocale::WeekDay startOfWeek = locale.startOfWeek(); |
421 HbExtendedLocale::WeekDay startOfWeek = locale.startOfWeek(); |
417 item->setContentWidgetData("items", weekdaysList); |
422 item->setContentWidgetData("items", weekdaysList); |
418 item->setContentWidgetData("currentIndex", startOfWeek); |
423 item->setContentWidgetData("currentIndex", startOfWeek); |
|
424 item->setContentWidgetData("objectName", "startOfWeek"); |
419 } |
425 } |
420 |
426 |
421 /*! |
427 /*! |
422 Returns the weekday list ordered based on start of week. |
428 Returns the weekday list ordered based on start of week. |
423 */ |
429 */ |