equal
deleted
inserted
replaced
28 #include <HbInstance> |
28 #include <HbInstance> |
29 #include <HbPushButton> |
29 #include <HbPushButton> |
30 #include <HbListWidget> |
30 #include <HbListWidget> |
31 #include <HbComboBox> |
31 #include <HbComboBox> |
32 #include <HbListWidgetItem> |
32 #include <HbListWidgetItem> |
33 #include <HbApplication> |
33 #include <HbTranslator> |
34 #include <QTranslator> |
|
35 |
34 |
36 // User includes |
35 // User includes |
37 #include "clockregionalsettingsview.h" |
36 #include "clockregionalsettingsview.h" |
38 #include "clocksettingsdocloader.h" |
37 #include "clocksettingsdocloader.h" |
39 #include "clocksettingsdefines.h" |
38 #include "clocksettingsdefines.h" |
59 |
58 |
60 // Construct the settignsutility. |
59 // Construct the settignsutility. |
61 mSettingsUtility = new SettingsUtility(); |
60 mSettingsUtility = new SettingsUtility(); |
62 |
61 |
63 // Load the translation file and install the editor specific translator |
62 // Load the translation file and install the editor specific translator |
64 mTranslator = new QTranslator; |
63 mTranslator = new HbTranslator("clocksettingsview"); |
65 //QString lang = QLocale::system().name(); |
64 mTranslator->loadCommon(); |
66 //QString path = "Z:/resource/qt/translations/"; |
65 |
67 mTranslator->load("clocksettingsview",":/translations"); |
|
68 // TODO: Load the appropriate .qm file based on locale |
|
69 //bool loaded = mTranslator->load("caleneditor_" + lang, path); |
|
70 HbApplication::instance()->installTranslator(mTranslator); |
|
71 // Create the custom prototype. |
66 // Create the custom prototype. |
72 mCustomPrototype = new SettingsCustomItem(); |
67 mCustomPrototype = new SettingsCustomItem(); |
73 } |
68 } |
74 |
69 |
75 /*! |
70 /*! |
88 } |
83 } |
89 if(mFormModel){ |
84 if(mFormModel){ |
90 delete mFormModel; |
85 delete mFormModel; |
91 } |
86 } |
92 // Remove the translator |
87 // Remove the translator |
93 HbApplication::instance()->removeTranslator(mTranslator); |
|
94 if (mTranslator) { |
88 if (mTranslator) { |
95 delete mTranslator; |
89 delete mTranslator; |
96 mTranslator = 0; |
90 mTranslator = 0; |
97 } |
91 } |
98 } |
92 } |