21 #include <HbExtendedLocale> |
21 #include <HbExtendedLocale> |
22 |
22 |
23 // User includes |
23 // User includes |
24 #include "datetimesettingsplugin.h" |
24 #include "datetimesettingsplugin.h" |
25 #include "datetimesettingsview.h" |
25 #include "datetimesettingsview.h" |
|
26 #include "OstTraceDefinitions.h" |
|
27 #ifdef OST_TRACE_COMPILER_IN_USE |
|
28 #include "datetimesettingspluginTraces.h" |
|
29 #endif |
|
30 |
26 |
31 |
27 /*! |
32 /*! |
28 Constructor. |
33 Constructor. |
29 */ |
34 */ |
30 DateTimeSettingsPlugin::DateTimeSettingsPlugin() |
35 DateTimeSettingsPlugin::DateTimeSettingsPlugin() |
31 { |
36 { |
|
37 OstTraceFunctionEntry0( DATETIMESETTINGSPLUGIN_DATETIMESETTINGSPLUGIN_ENTRY ); |
|
38 OstTraceFunctionExit0( DATETIMESETTINGSPLUGIN_DATETIMESETTINGSPLUGIN_EXIT ); |
32 } |
39 } |
33 |
40 |
34 /*! |
41 /*! |
35 Destructor. |
42 Destructor. |
36 */ |
43 */ |
37 DateTimeSettingsPlugin::~DateTimeSettingsPlugin() |
44 DateTimeSettingsPlugin::~DateTimeSettingsPlugin() |
38 { |
45 { |
|
46 OstTraceFunctionEntry0( DUP1_DATETIMESETTINGSPLUGIN_DATETIMESETTINGSPLUGIN_ENTRY ); |
|
47 OstTraceFunctionExit0( DUP1_DATETIMESETTINGSPLUGIN_DATETIMESETTINGSPLUGIN_EXIT ); |
39 } |
48 } |
40 |
49 |
41 /*! |
50 /*! |
42 Returns the uid of the plugin. |
51 Returns the uid of the plugin. |
43 */ |
52 */ |
44 int DateTimeSettingsPlugin::uid() const |
53 int DateTimeSettingsPlugin::uid() const |
45 { |
54 { |
|
55 OstTraceFunctionEntry0( DATETIMESETTINGSPLUGIN_UID_ENTRY ); |
46 // UID of the plugin. |
56 // UID of the plugin. |
|
57 OstTraceFunctionExit0( DATETIMESETTINGSPLUGIN_UID_EXIT ); |
47 return 0x102818E9; |
58 return 0x102818E9; |
48 } |
59 } |
49 |
60 |
50 /*! |
61 /*! |
51 Creates the object of DateTimeSettingsView class. |
62 Creates the object of DateTimeSettingsView class. |
52 */ |
63 */ |
53 QList<CpSettingFormItemData*> DateTimeSettingsPlugin:: |
64 QList<CpSettingFormItemData*> DateTimeSettingsPlugin:: |
54 createSettingFormItemData( |
65 createSettingFormItemData( |
55 CpItemDataHelper &itemDataHelper) const |
66 CpItemDataHelper &itemDataHelper) const |
56 { |
67 { |
|
68 OstTraceFunctionEntry0( DATETIMESETTINGSPLUGIN_CREATESETTINGFORMITEMDATA_ENTRY ); |
57 HbIcon icon ; |
69 HbIcon icon ; |
58 HbExtendedLocale locale = HbExtendedLocale::system(); |
70 HbExtendedLocale locale = HbExtendedLocale::system(); |
59 QString timeInfo = locale.format( |
71 QString timeInfo = locale.format( |
60 QTime::currentTime(), r_qtn_time_usual_with_zero); |
72 QTime::currentTime(), r_qtn_time_usual_with_zero); |
61 QString dateinfo = locale.format( |
73 QString dateinfo = locale.format( |
68 QList<CpSettingFormItemData*> entryItemList; |
80 QList<CpSettingFormItemData*> entryItemList; |
69 CpSettingFormItemData *entryItem = new DateTimeSettingsView( |
81 CpSettingFormItemData *entryItem = new DateTimeSettingsView( |
70 itemDataHelper,hbTrId("txt_cp_main_view_list_time_date"), |
82 itemDataHelper,hbTrId("txt_cp_main_view_list_time_date"), |
71 displayString,icon); |
83 displayString,icon); |
72 entryItemList.append(entryItem); |
84 entryItemList.append(entryItem); |
|
85 OstTraceFunctionExit0( DATETIMESETTINGSPLUGIN_CREATESETTINGFORMITEMDATA_EXIT ); |
73 return entryItemList; |
86 return entryItemList; |
74 } |
87 } |
75 |
88 |
76 Q_EXPORT_PLUGIN2(DateTimeSettingsPlugin, DateTimeSettingsPlugin) |
89 Q_EXPORT_PLUGIN2(DateTimeSettingsPlugin, DateTimeSettingsPlugin) |
77 |
90 |