|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cpcallsplugingroup.h" |
|
19 #include "cpplugincommon.h" |
|
20 #include "cppluginlogging.h" |
|
21 #include <psuinotes.h> |
|
22 #include <hbdataformmodel.h> |
|
23 #include <hbdataformmodelitem.h> |
|
24 #include <hbdataformviewitem.h> |
|
25 #include <hbcheckbox.h> |
|
26 #include <QString> |
|
27 #include <hblineedit.h> |
|
28 #include <hbcombobox.h> |
|
29 #include <hbdeviceprogressdialog.h> |
|
30 #include <cpitemdatahelper.h> |
|
31 #include <sssettingswrapper.h> |
|
32 #include <psetwrapper.h> |
|
33 #include <psetcliwrapper.h> |
|
34 |
|
35 |
|
36 /*! |
|
37 CpCallsPluginGroup::CpCallsPluginGroup. |
|
38 */ |
|
39 CpCallsPluginGroup::CpCallsPluginGroup(CpItemDataHelper &helper) |
|
40 :CpSettingFormItemData(HbDataFormModelItem::GroupItem, hbTrId("txt_phone_subhead_call_settings"),0), |
|
41 m_activeNoteId(0), |
|
42 m_helper(helper) |
|
43 { |
|
44 DPRINT << ": IN"; |
|
45 |
|
46 m_cpSettingsWrapper = new CpSettingsWrapper; |
|
47 m_pSetWrapper = new PSetWrapper; |
|
48 DPRINT << "PSetWrapper created"; |
|
49 |
|
50 m_callWaitingWrapper = &m_pSetWrapper->callWaitingWrapper(); |
|
51 DPRINT << "call waiting wrapper created"; |
|
52 QObject::connect( |
|
53 m_callWaitingWrapper, |
|
54 SIGNAL(handleCallWaitingGetStatus( |
|
55 PSetCallWaitingWrapper::PsCallWaitingStatus, const QList<unsigned char> &)), |
|
56 this, |
|
57 SLOT(handleCallWaitingGetStatus( |
|
58 PSetCallWaitingWrapper::PsCallWaitingStatus, const QList<unsigned char> &))); |
|
59 QObject::connect( |
|
60 m_callWaitingWrapper, |
|
61 SIGNAL(handleCallWaitingChanged(PSetCallWaitingWrapper::PsCallWaitingCommand, int)), |
|
62 this, |
|
63 SLOT(handleCallWaitingChanged(PSetCallWaitingWrapper::PsCallWaitingCommand, int))); |
|
64 QObject::connect( |
|
65 m_callWaitingWrapper, |
|
66 SIGNAL(handleCallWaitingRequesting( bool, bool )), |
|
67 this, |
|
68 SLOT(handleCallWaitingRequesting( bool, bool ))); |
|
69 QObject::connect( |
|
70 m_callWaitingWrapper, |
|
71 SIGNAL(handleCallWaitingError( int )), |
|
72 this, |
|
73 SLOT(handleCallWaitingError( int ))); |
|
74 |
|
75 m_ssSettingsWrapper = new SsSettingsWrapper; |
|
76 DPRINT << "SsSettingsWrapper created"; |
|
77 |
|
78 PsUiNotes *phoneNotes = PsUiNotes::instance(); |
|
79 QObject::connect( |
|
80 this, |
|
81 SIGNAL(showGlobalProgressNote(int &, const QString&)), |
|
82 phoneNotes, |
|
83 SLOT(showGlobalProgressNote(int &, const QString&))); |
|
84 QObject::connect( |
|
85 this, |
|
86 SIGNAL(showGlobalNote(int &, const QString&, HbMessageBox::MessageBoxType)), |
|
87 phoneNotes, |
|
88 SLOT(showGlobalNote(int &, const QString&, HbMessageBox::MessageBoxType))); |
|
89 QObject::connect( |
|
90 this, |
|
91 SIGNAL(showGlobalErrorNote(int &, int)), |
|
92 phoneNotes, |
|
93 SLOT(showGlobalErrorNote(int &, int))); |
|
94 QObject::connect( |
|
95 this, |
|
96 SIGNAL(cancelNote(int)), |
|
97 phoneNotes, |
|
98 SLOT(cancelNote(int))); |
|
99 QObject::connect( |
|
100 this, |
|
101 SIGNAL(showNotificationDialog(const QString&)), |
|
102 phoneNotes, |
|
103 SLOT(showNotificationDialog(const QString&))); |
|
104 |
|
105 // Create combobox string <-> setting mappings |
|
106 insertMappedListItems(); |
|
107 |
|
108 // Greate settings items |
|
109 createCLIItem(); |
|
110 createCallWaitingtem(); |
|
111 createSoftRejectItem(); |
|
112 createShowCallDurationItem(); |
|
113 createOwnVideoInReceivedCall(); |
|
114 |
|
115 // Connect setting item signals |
|
116 connectCLIItem(); |
|
117 connectCallWaitingItem(); |
|
118 connectSoftRejectItem(); |
|
119 connectShowCallDurationItem(); |
|
120 connectOwnVideoInReceivedCall(); |
|
121 |
|
122 m_callWaitingDistinguishEnabled = |
|
123 m_cpSettingsWrapper->isFeatureCallWaitingDistiquishNotProvisionedEnabled(); |
|
124 |
|
125 DPRINT << ": OUT"; |
|
126 } |
|
127 |
|
128 /*! |
|
129 CpCallsPluginGroup::~CpCallsPluginGroup. |
|
130 */ |
|
131 CpCallsPluginGroup::~CpCallsPluginGroup() |
|
132 { |
|
133 DPRINT << ": IN"; |
|
134 |
|
135 delete m_cpSettingsWrapper; |
|
136 delete m_pSetWrapper; |
|
137 delete m_ssSettingsWrapper; |
|
138 |
|
139 DPRINT << ": OUT"; |
|
140 } |
|
141 |
|
142 /*! |
|
143 CpCallsPluginGroup::createShowCallDurationItem. |
|
144 */ |
|
145 void CpCallsPluginGroup::createShowCallDurationItem() |
|
146 { |
|
147 DPRINT << ": IN"; |
|
148 |
|
149 // Read show call duration value from Cenrep |
|
150 bool showCallDurationStatus = m_cpSettingsWrapper->showCallDuration(); |
|
151 DPRINT << "showCallDurationStatus:" << showCallDurationStatus; |
|
152 |
|
153 m_DataItemShowCallDuration = |
|
154 new CpSettingFormItemData( |
|
155 HbDataFormModelItem::ToggleValueItem, |
|
156 hbTrId("txt_phone_formlabel_show_call_duration"), |
|
157 this); |
|
158 m_DataItemShowCallDuration->setObjectName( |
|
159 "showCallDurationDataItem"); |
|
160 |
|
161 if (showCallDurationStatus) { |
|
162 m_DataItemShowCallDuration->setContentWidgetData( |
|
163 "text", QVariant(hbTrId("txt_phone_setlabel_val_yes"))); |
|
164 m_DataItemShowCallDuration->setContentWidgetData( |
|
165 "additionalText", QVariant(hbTrId("txt_phone_setlabel_val_no"))); |
|
166 } else { |
|
167 m_DataItemShowCallDuration->setContentWidgetData( |
|
168 "text", QVariant(hbTrId("txt_phone_setlabel_val_no"))); |
|
169 m_DataItemShowCallDuration->setContentWidgetData( |
|
170 "additionalText", QVariant(hbTrId("txt_phone_setlabel_val_yes"))); |
|
171 } |
|
172 |
|
173 DPRINT << ": OUT"; |
|
174 } |
|
175 |
|
176 /*! |
|
177 CpCallsPluginGroup::createSoftRejectItem. |
|
178 */ |
|
179 void CpCallsPluginGroup::createSoftRejectItem() |
|
180 { |
|
181 DPRINT << ": IN"; |
|
182 |
|
183 bool userDefinedTextInUse = false; |
|
184 QString softRejectText; |
|
185 m_cpSettingsWrapper->readSoftRejectText( |
|
186 softRejectText, userDefinedTextInUse); |
|
187 if(!userDefinedTextInUse) { |
|
188 softRejectText = |
|
189 hbTrId("txt_phone_setlabel_soft_reject_val_default_text"); |
|
190 } |
|
191 m_DataItemSoftRejectTextEditor = |
|
192 new CpSettingFormItemData( |
|
193 HbDataFormModelItem::TextItem, |
|
194 hbTrId("txt_phone_setlabel_soft_reject"), |
|
195 this); |
|
196 m_DataItemSoftRejectTextEditor->setObjectName( |
|
197 "softRejectTextEditorDataItem"); |
|
198 |
|
199 m_DataItemSoftRejectTextEditor->setContentWidgetData( |
|
200 "text", QVariant(softRejectText)); |
|
201 m_DataItemSoftRejectTextEditor->setContentWidgetData( |
|
202 "maxLength", QVariant(160)); |
|
203 m_DataItemSoftRejectTextEditor->setContentWidgetData( |
|
204 "maxRows", QVariant(5)); |
|
205 m_DataItemSoftRejectTextEditor->setContentWidgetData( |
|
206 "minRows", QVariant(1)); |
|
207 |
|
208 DPRINT << ": OUT"; |
|
209 } |
|
210 |
|
211 /*! |
|
212 CpCallsPluginGroup::createCLIItem. |
|
213 */ |
|
214 void CpCallsPluginGroup::createCLIItem() |
|
215 { |
|
216 DPRINT << ": IN"; |
|
217 |
|
218 m_DataItemCLI = |
|
219 new CpSettingFormItemData( |
|
220 HbDataFormModelItem::ComboBoxItem, |
|
221 hbTrId("txt_phone_setlabel_send_my_caller_id"), |
|
222 this); |
|
223 m_DataItemCLI->setObjectName("cliDataItem"); |
|
224 |
|
225 // CLI combo box items string list |
|
226 QStringList list; |
|
227 QMapIterator<int, QString> cliSettingMapIterator(m_cliSettingMap); |
|
228 while (cliSettingMapIterator.hasNext()) { |
|
229 cliSettingMapIterator.next(); |
|
230 list << cliSettingMapIterator.value(); |
|
231 }; |
|
232 m_DataItemCLI->setContentWidgetData("items", QVariant(list)); |
|
233 |
|
234 DPRINT << ": OUT"; |
|
235 } |
|
236 |
|
237 /*! |
|
238 CpCallsPluginGroup::createOwnVideoInReceivedCall. |
|
239 */ |
|
240 void CpCallsPluginGroup::createOwnVideoInReceivedCall() |
|
241 { |
|
242 DPRINT << ": IN"; |
|
243 |
|
244 // Read Own video in received call value from Cenrep |
|
245 int ownVideoInReceivedCallStatus = |
|
246 m_cpSettingsWrapper->readVtVideoSending(); |
|
247 DPRINT << "ownVideoInReceivedCallStatus:" << ownVideoInReceivedCallStatus; |
|
248 |
|
249 m_OwnVideoInReceivedCall = |
|
250 new CpSettingFormItemData( |
|
251 HbDataFormModelItem::ComboBoxItem, |
|
252 hbTrId("txt_phone_setlabel_own_video_in_received_call"), |
|
253 this); |
|
254 m_OwnVideoInReceivedCall->setObjectName( |
|
255 "ownVideoInReceivedCallDataItem"); |
|
256 |
|
257 QStringList ownVideoSelections; |
|
258 ownVideoSelections |
|
259 <<hbTrId("txt_phone_setlabel_own_video_in_val_show_automatic") |
|
260 <<hbTrId("txt_phone_setlabel_own_video_in_val_ask_first") |
|
261 <<hbTrId("txt_phone_setlabel_own_video_in_val_dont_show"); |
|
262 |
|
263 m_OwnVideoInReceivedCall->setContentWidgetData( |
|
264 "items", QVariant(ownVideoSelections)); |
|
265 |
|
266 QVariant indexValue(ownVideoInReceivedCallStatus); |
|
267 m_OwnVideoInReceivedCall->setContentWidgetData( |
|
268 QString("currentIndex"), indexValue); |
|
269 |
|
270 DPRINT << ": OUT"; |
|
271 } |
|
272 |
|
273 /*! |
|
274 CpCallsPluginGroup::createCallWaitingtem. |
|
275 */ |
|
276 void CpCallsPluginGroup::createCallWaitingtem() |
|
277 { |
|
278 DPRINT << ": IN"; |
|
279 |
|
280 m_DataItemCallWaiting = |
|
281 new CpSettingFormItemData( |
|
282 HbDataFormModelItem::ToggleValueItem, |
|
283 hbTrId("txt_phone_setlabel_call_waiting"), |
|
284 this); |
|
285 m_DataItemCallWaiting->setObjectName("callWaitingDataItem"); |
|
286 m_DataItemCallWaiting->setContentWidgetData( |
|
287 "text", QVariant(hbTrId("txt_phone_setlabel_call_waiting_val_check_status"))); |
|
288 m_DataItemCallWaiting->setContentWidgetData( |
|
289 "additionalText", QVariant(hbTrId("txt_phone_setlabel_call_waiting_val_check_status"))); |
|
290 |
|
291 DPRINT << ": OUT"; |
|
292 } |
|
293 |
|
294 /*! |
|
295 CpCallsPluginGroup::connectShowCallDurationItem. |
|
296 */ |
|
297 void CpCallsPluginGroup::connectShowCallDurationItem() |
|
298 { |
|
299 DPRINT; |
|
300 m_helper.addConnection( |
|
301 m_DataItemShowCallDuration, SIGNAL(valueChanged(QPersistentModelIndex, QVariant)), |
|
302 this, SLOT(showCallDurationStateChanged())); |
|
303 } |
|
304 |
|
305 /*! |
|
306 CpCallsPluginGroup::connectSoftRejectItem. |
|
307 */ |
|
308 void CpCallsPluginGroup::connectSoftRejectItem() |
|
309 { |
|
310 DPRINT; |
|
311 m_helper.addConnection( |
|
312 m_DataItemSoftRejectTextEditor, SIGNAL(editingFinished()), |
|
313 this, SLOT(softRejectTextChanged())); |
|
314 } |
|
315 |
|
316 /*! |
|
317 CpCallsPluginGroup::connectCLIItem. |
|
318 */ |
|
319 void CpCallsPluginGroup::connectCLIItem() |
|
320 { |
|
321 DPRINT; |
|
322 m_helper.addConnection( |
|
323 m_DataItemCLI, SIGNAL(currentIndexChanged(int)), |
|
324 this, SLOT(cliCurrentIndexChanged(int))); |
|
325 // Fetch current CLI value |
|
326 int cliValue(ClirNetworkDefault); |
|
327 int err = m_ssSettingsWrapper->get(Clir, cliValue); |
|
328 if (!err){ |
|
329 QVariant indexValue(cliValue); |
|
330 m_DataItemCLI->setContentWidgetData( |
|
331 QString("currentIndex"), indexValue); |
|
332 } else { |
|
333 DPRINT << "Error: " << err; |
|
334 } |
|
335 } |
|
336 |
|
337 /*! |
|
338 CpCallsPluginGroup::connectOwnVideoInReceivedCall. |
|
339 */ |
|
340 void CpCallsPluginGroup::connectOwnVideoInReceivedCall() |
|
341 { |
|
342 DPRINT; |
|
343 m_helper.addConnection( |
|
344 m_OwnVideoInReceivedCall, SIGNAL(currentIndexChanged(int)), |
|
345 this, SLOT(ownVideoInReceivedCallStateChanged(int))); |
|
346 } |
|
347 |
|
348 /*! |
|
349 CpCallsPluginGroup::connectCallWaitingItem. |
|
350 */ |
|
351 void CpCallsPluginGroup::connectCallWaitingItem() |
|
352 { |
|
353 DPRINT; |
|
354 m_helper.addConnection( |
|
355 m_DataItemCallWaiting, SIGNAL(valueChanged(QPersistentModelIndex, QVariant)), |
|
356 this, SLOT(callWaitingCurrentIndexChanged())); |
|
357 } |
|
358 |
|
359 /*! |
|
360 CpCallsPluginGroup::showCallDurationStateChanged. |
|
361 */ |
|
362 void CpCallsPluginGroup::showCallDurationStateChanged() |
|
363 { |
|
364 DPRINT << ": IN"; |
|
365 |
|
366 QVariant text = m_DataItemShowCallDuration->contentWidgetData("text"); |
|
367 QString showCallDurationText = text.toString(); |
|
368 |
|
369 if(m_cpSettingsWrapper->isOngoingCall()) { |
|
370 // ongoing call, operation not allowed, refresh ui. |
|
371 bool showCallDurationStatus = m_cpSettingsWrapper->showCallDuration(); |
|
372 DPRINT << ": ongoing call case, status: " << showCallDurationStatus; |
|
373 |
|
374 if (showCallDurationStatus) { |
|
375 m_DataItemShowCallDuration->setContentWidgetData( |
|
376 "text", QVariant(hbTrId("txt_phone_setlabel_val_yes"))); |
|
377 m_DataItemShowCallDuration->setContentWidgetData( |
|
378 "additionalText", QVariant(hbTrId("txt_phone_setlabel_val_no"))); |
|
379 } else { |
|
380 m_DataItemShowCallDuration->setContentWidgetData( |
|
381 "text", QVariant(hbTrId("txt_phone_setlabel_val_no"))); |
|
382 m_DataItemShowCallDuration->setContentWidgetData( |
|
383 "additionalText", QVariant(hbTrId("txt_phone_setlabel_val_yes"))); |
|
384 } |
|
385 emit showGlobalNote( |
|
386 m_activeNoteId, |
|
387 emit hbTrId("txt_phone_info_not_allowed"), |
|
388 HbMessageBox::MessageTypeInformation); |
|
389 } else { |
|
390 if (showCallDurationText == hbTrId("txt_phone_setlabel_val_yes")) { |
|
391 m_cpSettingsWrapper->setShowCallDuration(true); |
|
392 } else if (showCallDurationText == hbTrId("txt_phone_setlabel_val_no")){ |
|
393 m_cpSettingsWrapper->setShowCallDuration(false); |
|
394 } else { |
|
395 DPRINT << "nothing done"; |
|
396 } |
|
397 } |
|
398 |
|
399 DPRINT << ": OUT"; |
|
400 } |
|
401 |
|
402 /*! |
|
403 CpCallsPluginGroup::softRejectTextChanged. |
|
404 */ |
|
405 void CpCallsPluginGroup::softRejectTextChanged() |
|
406 { |
|
407 DPRINT << ": IN"; |
|
408 |
|
409 QVariant text = m_DataItemSoftRejectTextEditor->contentWidgetData("text"); |
|
410 QString softRejectText = text.toString(); |
|
411 if (!softRejectText.isNull()) { |
|
412 DPRINT << "softRejectText:" << softRejectText; |
|
413 m_cpSettingsWrapper->writeSoftRejectText(softRejectText, true); |
|
414 } |
|
415 |
|
416 DPRINT << ": OUT"; |
|
417 } |
|
418 |
|
419 /*! |
|
420 CpCallsPluginGroup::callWaitingCurrentIndexChanged. |
|
421 */ |
|
422 void CpCallsPluginGroup::callWaitingCurrentIndexChanged() |
|
423 { |
|
424 DPRINT << ": IN"; |
|
425 |
|
426 QVariant text = m_DataItemCallWaiting->contentWidgetData("text"); |
|
427 QString callWaitingText = text.toString(); |
|
428 |
|
429 if (callWaitingText == hbTrId("txt_phone_setlabel_call_waiting_val_check_status")) { |
|
430 // Clicked first time, user want to check feature status |
|
431 DPRINT << "checking status"; |
|
432 m_callWaitingWrapper->getCallWaitingStatus(); |
|
433 } else if (callWaitingText == hbTrId("txt_phone_setlabel_call_waiting_val_on")) { |
|
434 DPRINT << "activate"; |
|
435 // User want to activate call waiting feature |
|
436 m_callWaitingWrapper->setCallWaiting( |
|
437 PSetCallWaitingWrapper::ActivateCallWaiting, |
|
438 AllTeleAndBearer); |
|
439 } else if (callWaitingText == hbTrId("txt_phone_setlabel_call_waiting_val_off")) { |
|
440 DPRINT << "deactivate"; |
|
441 // User want to deactivate call waiting feature |
|
442 m_callWaitingWrapper->setCallWaiting( |
|
443 PSetCallWaitingWrapper::DeactivateCallWaiting, |
|
444 AllTeleAndBearer); |
|
445 } else { |
|
446 DWARNING << ": Error, unhandled index!"; |
|
447 } |
|
448 |
|
449 DPRINT << ": OUT"; |
|
450 } |
|
451 |
|
452 /*! |
|
453 CpCallsPluginGroup::cliCurrentIndexChanged. |
|
454 */ |
|
455 void CpCallsPluginGroup::cliCurrentIndexChanged(int index) |
|
456 { |
|
457 DPRINT << ": IN"; |
|
458 |
|
459 if (index >= 0) { |
|
460 QString settingMapString = m_cliSettingMap.value(index); |
|
461 DPRINT << "settingMapString:" << settingMapString; |
|
462 int err = m_ssSettingsWrapper->set(Clir, index); |
|
463 DPRINT << "m_ssSettingsWrapper->set() err: " << err; |
|
464 } else { |
|
465 DPRINT << "Error: negative index!"; |
|
466 } |
|
467 |
|
468 DPRINT << ": OUT"; |
|
469 } |
|
470 |
|
471 /*! |
|
472 CpCallsPluginGroup::ownVideoInReceivedCallStateChanged. |
|
473 */ |
|
474 void CpCallsPluginGroup::ownVideoInReceivedCallStateChanged(int index) |
|
475 { |
|
476 DPRINT << ": IN : index: " << index; |
|
477 |
|
478 if (index >= 0) { |
|
479 //store to Cenrep |
|
480 int ret = m_cpSettingsWrapper->writeVtVideoSending(index); |
|
481 DPRINT << |
|
482 "m_cpSettingsWrapper->writeVtVideoSending(index) ret: " << ret; |
|
483 }else{ |
|
484 DPRINT << "Error: negative index!"; |
|
485 } |
|
486 |
|
487 DPRINT << ": OUT"; |
|
488 } |
|
489 |
|
490 /*! |
|
491 CpCallsPluginGroup::insertMappedListItems. |
|
492 */ |
|
493 void CpCallsPluginGroup::insertMappedListItems() |
|
494 { |
|
495 DPRINT << ": IN"; |
|
496 m_cliSettingMap.insert(ClirNetworkDefault, hbTrId("txt_phone_setlabel_val_default")); |
|
497 m_cliSettingMap.insert(ClirExplicitSuppress, hbTrId("txt_phone_setlabel_val_yes")); |
|
498 m_cliSettingMap.insert(ClirExplicitInvoke, hbTrId("txt_phone_setlabel_val_no")); |
|
499 DPRINT << ": OUT"; |
|
500 } |
|
501 |
|
502 /*! |
|
503 CpCallsPluginGroup::handleCallWaitingGetStatus. |
|
504 */ |
|
505 void CpCallsPluginGroup::handleCallWaitingGetStatus( |
|
506 PSetCallWaitingWrapper::PsCallWaitingStatus status, |
|
507 const QList<unsigned char> &basicServiceGroupIds) |
|
508 { |
|
509 DPRINT << ": IN status: " << status; |
|
510 // This happens only in the very first time when clicked. |
|
511 emit cancelNote(m_activeNoteId); |
|
512 |
|
513 bool alsCaseOnly = false; |
|
514 if (1 == basicServiceGroupIds.count() && |
|
515 AltTele == static_cast<BasicServiceGroups>(basicServiceGroupIds.at(0))) { |
|
516 DPRINT << "Status is only for als"; |
|
517 alsCaseOnly = true; |
|
518 } |
|
519 |
|
520 if (m_callWaitingDistinguishEnabled && |
|
521 PSetCallWaitingWrapper::StatusNotProvisioned == status) { |
|
522 DPRINT << ": not provisioned"; |
|
523 emit showNotificationDialog(hbTrId("txt_phone_info_request_not_completed")); |
|
524 } else if (PSetCallWaitingWrapper::StatusActive == status && !alsCaseOnly) { |
|
525 DPRINT << ": status active"; |
|
526 m_DataItemCallWaiting->setContentWidgetData( |
|
527 "text", QVariant(hbTrId("txt_phone_setlabel_call_waiting_val_on"))); |
|
528 m_DataItemCallWaiting->setContentWidgetData( |
|
529 "additionalText", QVariant(hbTrId("txt_phone_setlabel_call_waiting_val_off"))); |
|
530 |
|
531 } else { |
|
532 DPRINT << ": status not active"; |
|
533 m_DataItemCallWaiting->setContentWidgetData( |
|
534 "text", QVariant(hbTrId("txt_phone_setlabel_call_waiting_val_off"))); |
|
535 m_DataItemCallWaiting->setContentWidgetData( |
|
536 "additionalText", QVariant(hbTrId("txt_phone_setlabel_call_waiting_val_on"))); |
|
537 } |
|
538 |
|
539 DPRINT << ": OUT"; |
|
540 } |
|
541 |
|
542 /*! |
|
543 CpCallsPluginGroup::handleCallWaitingChanged. |
|
544 */ |
|
545 void CpCallsPluginGroup::handleCallWaitingChanged( |
|
546 PSetCallWaitingWrapper::PsCallWaitingCommand command, |
|
547 int result ) |
|
548 { |
|
549 DPRINT << ": IN"; |
|
550 emit cancelNote(m_activeNoteId); |
|
551 if (result) { |
|
552 emit showNotificationDialog(hbTrId("txt_phone_info_request_not_confirmed")); |
|
553 } else { |
|
554 switch (command){ |
|
555 case PSetCallWaitingWrapper::ActivateCallWaiting: |
|
556 emit showNotificationDialog(hbTrId("txt_phone_info_call_waiting_activated")); |
|
557 break; |
|
558 case PSetCallWaitingWrapper::DeactivateCallWaiting: |
|
559 emit showNotificationDialog(hbTrId("txt_phone_info_call_waiting_deactivated")); |
|
560 break; |
|
561 default: |
|
562 emit showNotificationDialog(hbTrId("txt_phone_info_result_unknown")); |
|
563 break; |
|
564 } |
|
565 } |
|
566 DPRINT << ": OUT"; |
|
567 } |
|
568 |
|
569 /*! |
|
570 CpCallsPluginGroup::handleCallWaitingRequesting. |
|
571 */ |
|
572 void CpCallsPluginGroup::handleCallWaitingRequesting(bool ongoing, bool interrupted) |
|
573 { |
|
574 DPRINT << ": IN"; |
|
575 DPRINT << "ongoing:" << ongoing << ", interrupted:" << interrupted; |
|
576 Q_ASSERT(!(ongoing && interrupted)); |
|
577 |
|
578 if (ongoing) { |
|
579 emit showGlobalProgressNote(m_activeNoteId, hbTrId("txt_common_info_requesting")); |
|
580 } |
|
581 |
|
582 if (interrupted) { |
|
583 emit cancelNote(m_activeNoteId); |
|
584 } |
|
585 |
|
586 DPRINT << ": OUT"; |
|
587 } |
|
588 |
|
589 /*! |
|
590 CpCallsPluginGroup::handleCallWaitingError. |
|
591 */ |
|
592 void CpCallsPluginGroup::handleCallWaitingError(int errorCode) |
|
593 { |
|
594 DPRINT << ": IN"; |
|
595 DPRINT << "errorCode:" << errorCode; |
|
596 |
|
597 emit cancelNote(m_activeNoteId); |
|
598 emit showGlobalErrorNote(m_activeNoteId, errorCode); |
|
599 |
|
600 DPRINT << ": OUT"; |
|
601 } |
|
602 |
|
603 // End of File. |