16 */ |
16 */ |
17 |
17 |
18 #include "cptelephonypluginview.h" |
18 #include "cptelephonypluginview.h" |
19 #include "cppluginlogging.h" |
19 #include "cppluginlogging.h" |
20 #include <QPluginLoader> |
20 #include <QPluginLoader> |
21 #include <QApplication> |
|
22 #include <QLocale> |
|
23 #include <QTranslator> |
|
24 #include <hbdataformmodel.h> |
21 #include <hbdataformmodel.h> |
25 #include <cpplugininterface.h> |
22 #include <cpplugininterface.h> |
26 #include <cpsettingformitemdata.h> |
23 #include <cpsettingformitemdata.h> |
27 #include <cpitemdatahelper.h> |
24 #include <cpitemdatahelper.h> |
28 #include <cppluginutility.h> |
25 #include <cppluginutility.h> |
29 #include <cppluginloader.h> |
26 #include <cppluginloader.h> |
30 |
27 |
|
28 |
|
29 /*! |
|
30 CpTelephonyPluginView::CpTelephonyPluginView() |
|
31 */ |
31 CpTelephonyPluginView::CpTelephonyPluginView() : |
32 CpTelephonyPluginView::CpTelephonyPluginView() : |
32 CpBaseSettingView(0,0), |
33 CpBaseSettingView(0,0), |
33 m_helper(NULL) |
34 m_helper(NULL) |
34 { |
35 { |
35 DPRINT << ": IN"; |
36 DPRINT << ": IN"; |
36 |
|
37 // Localization file loading |
|
38 QTranslator translator; |
|
39 QString lang = QLocale::system().name(); |
|
40 QString path = "z:/resource/qt/translations/"; |
|
41 DPRINT << ": loading translation: " << QString(path + "telephone_cp_" + lang); |
|
42 bool translatorLoaded = translator.load(path + "telephone_cp_" + lang); |
|
43 DPRINT << ": translator loaded: " << translatorLoaded; |
|
44 if (translatorLoaded) { |
|
45 qApp->installTranslator(&translator); |
|
46 DPRINT << ": translator installed"; |
|
47 } |
|
48 |
37 |
49 HbDataForm *form = qobject_cast<HbDataForm*>(widget()); |
38 HbDataForm *form = qobject_cast<HbDataForm*>(widget()); |
50 if (form) { |
39 if (form) { |
51 HbDataFormModel *model = new HbDataFormModel; |
40 HbDataFormModel *model = new HbDataFormModel; |
52 form->setHeading(hbTrId("txt_phone_subhead_telephone")); |
41 form->setHeading(hbTrId("txt_phone_subhead_telephone")); |