equal
deleted
inserted
replaced
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
|
17 |
|
18 #include "emailtrace.h" |
17 |
19 |
18 #include <cpsettingformentryitemdataimpl.h> |
20 #include <cpsettingformentryitemdataimpl.h> |
19 #include <HbApplication> |
21 #include <HbApplication> |
20 #include <QTranslator> |
22 #include <QTranslator> |
21 #include <QLocale> |
23 #include <QLocale> |
37 Constructor of NmSettingsPlugin. |
39 Constructor of NmSettingsPlugin. |
38 */ |
40 */ |
39 NmSettingsPlugin::NmSettingsPlugin() |
41 NmSettingsPlugin::NmSettingsPlugin() |
40 : mTranslator(0) |
42 : mTranslator(0) |
41 { |
43 { |
|
44 NM_FUNCTION; |
|
45 |
42 mTranslator = new QTranslator(); |
46 mTranslator = new QTranslator(); |
43 QString lang = QLocale::system().name(); |
47 QString lang = QLocale::system().name(); |
44 QString appName = "mail_"; |
48 QString appName = "mail_"; |
45 QString path = "z:/resource/qt/translations/"; |
49 QString path = "z:/resource/qt/translations/"; |
46 mTranslator->load(appName + lang, path); |
50 mTranslator->load(appName + lang, path); |
50 /*! |
54 /*! |
51 Destructor of NmSettingsPlugin. |
55 Destructor of NmSettingsPlugin. |
52 */ |
56 */ |
53 NmSettingsPlugin::~NmSettingsPlugin() |
57 NmSettingsPlugin::~NmSettingsPlugin() |
54 { |
58 { |
|
59 NM_FUNCTION; |
|
60 |
55 delete mTranslator; |
61 delete mTranslator; |
56 } |
62 } |
57 |
63 |
58 /*! |
64 /*! |
59 Creates a data form model item, that is used by the control panel framework. |
65 Creates a data form model item, that is used by the control panel framework. |
65 Caller is the owner of the returned instance. |
71 Caller is the owner of the returned instance. |
66 */ |
72 */ |
67 CpSettingFormItemData *NmSettingsPlugin::createSettingFormItemData( |
73 CpSettingFormItemData *NmSettingsPlugin::createSettingFormItemData( |
68 CpItemDataHelper &itemDataHelper) const |
74 CpItemDataHelper &itemDataHelper) const |
69 { |
75 { |
|
76 NM_FUNCTION; |
|
77 |
70 HbIcon icon("qtg_large_email"); |
78 HbIcon icon("qtg_large_email"); |
71 |
79 |
72 return new NmSettingsViewFactory(itemDataHelper, |
80 return new NmSettingsViewFactory(itemDataHelper, |
73 hbTrId("txt_mail_title_control_panel"), "", |
81 hbTrId("txt_mail_title_control_panel"), "", |
74 icon); |
82 icon); |