equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "cpnetworkpluginview.h" |
18 #include "cpnetworkpluginview.h" |
19 #include <QApplication> |
|
20 #include <QLocale> |
|
21 #include <QTranslator> |
|
22 #include "cpnetworkpluginform.h" |
19 #include "cpnetworkpluginform.h" |
23 #include "cppluginlogging.h" |
20 #include "cppluginlogging.h" |
24 |
21 |
25 /*! |
22 /*! |
26 CpNetworkPluginView::CpNetworkPluginView |
23 CpNetworkPluginView::CpNetworkPluginView |
29 CpBaseSettingView(0, parent), |
26 CpBaseSettingView(0, parent), |
30 m_networkSettingsForm(0) |
27 m_networkSettingsForm(0) |
31 { |
28 { |
32 DPRINT << ": IN"; |
29 DPRINT << ": IN"; |
33 |
30 |
34 // Localization file loading |
|
35 QTranslator translator; |
|
36 QString lang = QLocale::system().name(); |
|
37 QString path = "z:/resource/qt/translations/"; |
|
38 DPRINT << ": loading translation: " << QString(path + "telephone_cp_" + lang); |
|
39 bool translatorLoaded = translator.load(path + "telephone_cp_" + lang); |
|
40 DPRINT << ": translator loaded: " << translatorLoaded; |
|
41 if (translatorLoaded) { |
|
42 qApp->installTranslator(&translator); |
|
43 DPRINT << ": translator installed"; |
|
44 } |
|
45 |
|
46 m_networkSettingsForm = new CpNetworkPluginForm(); |
31 m_networkSettingsForm = new CpNetworkPluginForm(); |
47 // base class takes ownership of the form |
32 // base class takes ownership of the form |
48 this->setSettingForm(m_networkSettingsForm); |
33 this->setWidget(m_networkSettingsForm); |
49 |
34 |
50 DPRINT << ": OUT"; |
35 DPRINT << ": OUT"; |
51 } |
36 } |
52 |
37 |
53 /*! |
38 /*! |
65 */ |
50 */ |
66 void CpNetworkPluginView::SearchAvailableNetworks() |
51 void CpNetworkPluginView::SearchAvailableNetworks() |
67 { |
52 { |
68 DPRINT << ": IN"; |
53 DPRINT << ": IN"; |
69 |
54 |
70 m_networkSettingsForm->SearchAvailableNetworks(); |
55 m_networkSettingsForm->searchAvailableNetworks(); |
71 |
56 |
72 DPRINT << ": OUT"; |
57 DPRINT << ": OUT"; |
73 } |
58 } |
74 |
59 |
75 // End of File. |
60 // End of File. |