119 qSort(mPlugins.begin(), mPlugins.end(), CpWpaCmnUiPrivate::pluginLessThan); |
119 qSort(mPlugins.begin(), mPlugins.end(), CpWpaCmnUiPrivate::pluginLessThan); |
120 |
120 |
121 mCmnUi = new CpSettingFormItemData(HbDataFormModelItem::GroupItem, |
121 mCmnUi = new CpSettingFormItemData(HbDataFormModelItem::GroupItem, |
122 hbTrId("txt_occ_subhead_security_settings")); |
122 hbTrId("txt_occ_subhead_security_settings")); |
123 |
123 |
|
124 mCmnUi->setContentWidgetData("objectName", "CpWpaCmUi"); |
|
125 |
124 //LoadUi based on the security mode |
126 //LoadUi based on the security mode |
125 loadUi(); |
127 loadUi(); |
126 |
128 |
127 OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEUI_EXIT, this ); |
129 OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEUI_EXIT, this ); |
128 return mCmnUi; |
130 return mCmnUi; |
153 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEWPATYPESELECTOR_ENTRY, this ); |
155 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEWPATYPESELECTOR_ENTRY, this ); |
154 |
156 |
155 // In case of the object exists just update the data |
157 // In case of the object exists just update the data |
156 if (!mWpaEapItem) { |
158 if (!mWpaEapItem) { |
157 mWpaEapItem = new CpSettingFormItemData( |
159 mWpaEapItem = new CpSettingFormItemData( |
158 HbDataFormModelItem::ComboBoxItem, hbTrId( |
160 HbDataFormModelItem::ComboBoxItem, |
159 "txt_occ_setlabel_wpawpa2"), mCmnUi); |
161 hbTrId("txt_occ_setlabel_wpawpa2")); |
160 |
162 |
161 QStringList wpatype; |
163 QStringList wpatype; |
162 wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_eap")); |
164 wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_eap")); |
163 wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_preshared_key")); |
165 wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_preshared_key")); |
164 |
166 |
|
167 mWpaEapItem->setContentWidgetData("objectName", "CpWpaCmnUiTypeSelector"); |
165 mWpaEapItem->setContentWidgetData("items", wpatype); |
168 mWpaEapItem->setContentWidgetData("items", wpatype); |
166 |
169 |
167 mDataHelper.addConnection(mWpaEapItem, |
170 mDataHelper.addConnection(mWpaEapItem, |
168 SIGNAL(currentIndexChanged(int)), this, |
171 SIGNAL(currentIndexChanged(int)), this, |
169 SLOT(wpaTypeChanged(int))); |
172 SLOT(wpaTypeChanged(int))); |
170 |
173 |
171 mCmnUi->appendChild(mWpaEapItem); |
174 mCmnUi->appendChild(mWpaEapItem); |
172 } |
175 } |
173 |
176 |
174 mWpaEapItem->setContentWidgetData("currentIndex", mEnablePskMode ? 1 : 0); |
177 mWpaEapItem->setContentWidgetData("currentIndex", mEnablePskMode ? 1 : 0); |
186 { |
189 { |
187 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEPSKEDITOR_ENTRY, this ); |
190 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEPSKEDITOR_ENTRY, this ); |
188 |
191 |
189 if (!mPskKeyText) { |
192 if (!mPskKeyText) { |
190 mPskKeyText = new CpSettingFormItemData( |
193 mPskKeyText = new CpSettingFormItemData( |
191 HbDataFormModelItem::TextItem, hbTrId( |
194 HbDataFormModelItem::TextItem, |
192 "txt_occ_setlabel_preshared_key"), mCmnUi); |
195 hbTrId("txt_occ_setlabel_preshared_key")); |
193 |
196 |
|
197 mPskKeyText->setContentWidgetData("objectName", "CpWpaCmnUiPskEditor"); |
194 mPskKeyText->setContentWidgetData("echoMode", HbLineEdit::PasswordEchoOnEdit); |
198 mPskKeyText->setContentWidgetData("echoMode", HbLineEdit::PasswordEchoOnEdit); |
195 mPskKeyText->setContentWidgetData("smileysEnabled", "false"); |
199 mPskKeyText->setContentWidgetData("smileysEnabled", "false"); |
196 mDataHelper.addConnection(mPskKeyText, SIGNAL( editingFinished ()), |
200 mDataHelper.addConnection( |
197 this, SLOT(pskKeyChanged() )); |
201 mPskKeyText, SIGNAL( editingFinished ()), |
|
202 this, SLOT(pskKeyChanged() )); |
198 |
203 |
199 mDataHelper.connectToForm(SIGNAL(itemShown (const QModelIndex &) ), |
204 mDataHelper.connectToForm( |
200 this, SLOT(setEditorPreferences(const QModelIndex &))); |
205 SIGNAL(itemShown (const QModelIndex &) ), |
|
206 this, SLOT(setEditorPreferences(const QModelIndex &))); |
201 |
207 |
202 mCmnUi->appendChild(mPskKeyText); |
208 mCmnUi->appendChild(mPskKeyText); |
203 } |
209 } |
204 |
210 |
205 mPskKeyText->setContentWidgetData("text", mKeyData); |
211 mPskKeyText->setContentWidgetData("text", mKeyData); |
226 QList<EapQtPluginInfo>::iterator i; |
232 QList<EapQtPluginInfo>::iterator i; |
227 for (i = mPlugins.begin() ; i != mPlugins.end() ; ++i){ |
233 for (i = mPlugins.begin() ; i != mPlugins.end() ; ++i){ |
228 list << i->localizationId(); |
234 list << i->localizationId(); |
229 } |
235 } |
230 |
236 |
|
237 mEapPlugins->setContentWidgetData("objectName", "CpWpaCmnUiEapTypeSelector"); |
231 mEapPlugins->setContentWidgetData("items", list); |
238 mEapPlugins->setContentWidgetData("items", list); |
232 |
239 |
233 mDataHelper.addConnection(mEapPlugins, |
240 mDataHelper.addConnection(mEapPlugins, |
234 SIGNAL(currentIndexChanged(int)), this, |
241 SIGNAL(currentIndexChanged(int)), this, |
235 SLOT(eapTypeChanged(int))); |
242 SLOT(eapTypeChanged(int))); |
251 EapEntryItemData* CpWpaCmnUiPrivate::createEapEntryItem() |
258 EapEntryItemData* CpWpaCmnUiPrivate::createEapEntryItem() |
252 { |
259 { |
253 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEEAPENTRYITEM_ENTRY, this ); |
260 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEEAPENTRYITEM_ENTRY, this ); |
254 |
261 |
255 if (!mEapEntry) { |
262 if (!mEapEntry) { |
256 mEapEntry = new EapEntryItemData(this, mDataHelper, hbTrId( |
263 mEapEntry = new EapEntryItemData( |
257 "txt_occ_button_eap_type_settings")); |
264 this, |
258 |
265 mDataHelper, |
|
266 hbTrId("txt_occ_button_eap_type_settings")); |
|
267 |
|
268 mEapEntry->setContentWidgetData("objectName", "CpWpaCmnUiEapEntryItem"); |
259 mCmnUi->appendChild(mEapEntry); |
269 mCmnUi->appendChild(mEapEntry); |
260 } |
270 } |
261 |
271 |
262 OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEEAPENTRYITEM_EXIT, this ); |
272 OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEEAPENTRYITEM_EXIT, this ); |
263 return mEapEntry; |
273 return mEapEntry; |
272 { |
282 { |
273 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEUNENCRYPTEDBOX_ENTRY, this ); |
283 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEUNENCRYPTEDBOX_ENTRY, this ); |
274 |
284 |
275 if (!mUnencryptedConnection) { |
285 if (!mUnencryptedConnection) { |
276 mUnencryptedConnection = new CpSettingFormItemData( |
286 mUnencryptedConnection = new CpSettingFormItemData( |
277 HbDataFormModelItem::CheckBoxItem, hbTrId( |
287 HbDataFormModelItem::CheckBoxItem, |
278 "txt_occ_setlabel_unencrypted_connection"), mCmnUi); |
288 hbTrId("txt_occ_setlabel_unencrypted_connection")); |
279 |
289 |
|
290 mUnencryptedConnection->setContentWidgetData( |
|
291 "objectName", |
|
292 "CpWpaCmnUiUnencryptedConnection"); |
280 mUnencryptedConnection->setContentWidgetData("text", hbTrId( |
293 mUnencryptedConnection->setContentWidgetData("text", hbTrId( |
281 "txt_occ_setlabel_unencrypted_connection_val_allowe")); |
294 "txt_occ_setlabel_unencrypted_connection_val_allowe")); |
282 |
295 |
283 mDataHelper.addConnection(mUnencryptedConnection, |
296 mDataHelper.addConnection(mUnencryptedConnection, |
284 SIGNAL( stateChanged(int)), this, |
297 SIGNAL( stateChanged(int)), this, |
530 const QString &text) |
543 const QString &text) |
531 { |
544 { |
532 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_SHOWMESSAGEBOX_ENTRY, this ); |
545 OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_SHOWMESSAGEBOX_ENTRY, this ); |
533 // Create a message box |
546 // Create a message box |
534 mMessageBox = QSharedPointer<HbMessageBox> (new HbMessageBox(type)); |
547 mMessageBox = QSharedPointer<HbMessageBox> (new HbMessageBox(type)); |
|
548 mMessageBox->setObjectName("CpWpaCmnUiMessageBox"); |
535 mMessageBox->setText(text); |
549 mMessageBox->setText(text); |
536 mMessageBox->open(); |
550 mMessageBox->open(); |
537 OstTraceFunctionExit1( CPWPACMNUIPRIVATE_SHOWMESSAGEBOX_EXIT, this ); |
551 OstTraceFunctionExit1( CPWPACMNUIPRIVATE_SHOWMESSAGEBOX_EXIT, this ); |
538 } |
552 } |
539 |
553 |