clock/clockui/clocksettingsview/src/clockregionalsettingsview.cpp
changeset 63 a3cb48f6c889
parent 57 bb2d3e476f29
child 70 a5ed90760192
equal deleted inserted replaced
57:bb2d3e476f29 63:a3cb48f6c889
    52  */
    52  */
    53 
    53 
    54 /*!
    54 /*!
    55 	Default constructor.
    55 	Default constructor.
    56  */
    56  */
    57 ClockRegionalSettingsView::ClockRegionalSettingsView(QObject *parent)
    57 ClockRegionalSettingsView::ClockRegionalSettingsView(QObject *parent, bool launchedByClock)
    58 :QObject(parent),
    58 :QObject(parent),
    59  mView(0),
    59  mView(0),
    60  mLoader(0)
    60  mLoader(0),
       
    61  mLauncedByClock(launchedByClock)
    61 {
    62 {
    62 	OstTraceFunctionEntry0( CLOCKREGIONALSETTINGSVIEW_CLOCKREGIONALSETTINGSVIEW_ENTRY );
    63 	OstTraceFunctionEntry0( CLOCKREGIONALSETTINGSVIEW_CLOCKREGIONALSETTINGSVIEW_ENTRY );
    63 	// Construct the document loader.
    64 	// Construct the document loader.
    64 	mLoader = new ClockSettingsDocLoader;
    65 	mLoader = new ClockSettingsDocLoader;
    65 	
    66 	
   140 
   141 
   141 	// Create the form model.
   142 	// Create the form model.
   142 	createModel();
   143 	createModel();
   143 
   144 
   144 	// Set the view as the current view.
   145 	// Set the view as the current view.
       
   146 	if(!mLauncedByClock) {
       
   147 	    mView->setTitle(hbTrId("txt_clock_title_control_panel"));
       
   148 	}
   145 	HbMainWindow *window = hbInstance->allMainWindows().first();
   149 	HbMainWindow *window = hbInstance->allMainWindows().first();
   146 	window->addView(mView);
   150 	window->addView(mView);
   147 	window->setCurrentView(mView);
   151 	window->setCurrentView(mView);
   148 
   152 
   149 	// Add the back softkey.
   153 	// Add the back softkey.
   435 			<< qLocale.dayName(6)
   439 			<< qLocale.dayName(6)
   436 			<< qLocale.dayName(7);
   440 			<< qLocale.dayName(7);
   437 	
   441 	
   438 	HbDataFormModelItem::DataItemType workdaysItemType =
   442 	HbDataFormModelItem::DataItemType workdaysItemType =
   439 			static_cast<HbDataFormModelItem::DataItemType>
   443 			static_cast<HbDataFormModelItem::DataItemType>
   440 			(HbDataFormModelItem::CustomItemBase + 50);
   444 			(HbDataFormModelItem::CustomItemBase + WorkdaysItemOffset);
   441 	item = new HbDataFormModelItem(workdaysItemType,
   445 	item = new HbDataFormModelItem(workdaysItemType,
   442 			hbTrId("txt_clock_setlabel_workdays"));
   446 			hbTrId("txt_clock_setlabel_workdays"));
   443 	mFormModel->appendDataFormItem(item);
   447 	mFormModel->appendDataFormItem(item);
   444 	item->setContentWidgetData("objectName", "workdays");
   448 	item->setContentWidgetData("objectName", "workdays");
   445 
   449