63 QMap<PhoneAction::ActionType, PhoneAction *> PhoneResourceAdapter::convert (int symbianResourceId, ...) |
64 QMap<PhoneAction::ActionType, PhoneAction *> PhoneResourceAdapter::convert (int symbianResourceId, ...) |
64 { |
65 { |
65 QMap<PhoneAction::ActionType, PhoneAction *> translatedActions; |
66 QMap<PhoneAction::ActionType, PhoneAction *> translatedActions; |
66 |
67 |
67 switch (symbianResourceId) { |
68 switch (symbianResourceId) { |
68 |
69 |
69 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA: |
|
70 { |
|
71 PhoneAction *leftButton = new PhoneAction; |
|
72 leftButton->setIcon (HbIcon("qtg_mono_send")); |
|
73 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
|
74 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
75 |
|
76 PhoneAction *rightButton = new PhoneAction; |
|
77 rightButton->setIcon (HbIcon("qtg_mono_speaker_off")); |
|
78 rightButton->setCommand (EPhoneCallComingCmdSilent); |
|
79 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
|
80 } |
|
81 break; |
|
82 |
|
83 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA: |
|
84 { |
|
85 PhoneAction *leftButton = new PhoneAction; |
|
86 leftButton->setIcon (HbIcon("qtg_mono_send")); |
|
87 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
|
88 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
89 |
|
90 PhoneAction *rightButton = new PhoneAction; |
|
91 rightButton->setIcon (HbIcon("qtg_mono_reject_call")); |
|
92 rightButton->setCommand (EPhoneCallComingCmdReject); |
|
93 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
|
94 } |
|
95 break; |
|
96 |
|
97 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA: |
|
98 { |
|
99 PhoneAction *leftButton = new PhoneAction; |
|
100 leftButton->setIcon (HbIcon("qtg_mono_send")); |
|
101 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
|
102 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
103 |
|
104 PhoneAction *rightButton = new PhoneAction; |
|
105 rightButton->setIcon (HbIcon("qtg_mono_speaker_off")); |
|
106 rightButton->setDisabled(true); |
|
107 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
|
108 } |
|
109 break; |
|
110 |
|
111 case R_PHONEUI_CALLHANDLING_CALLWAITING_CBA: |
|
112 { |
|
113 PhoneAction *leftButton = new PhoneAction; |
|
114 leftButton->setIcon (HbIcon("qtg_mono_send")); |
|
115 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
|
116 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
117 |
|
118 PhoneAction *rightButton = new PhoneAction; |
|
119 rightButton->setIcon (HbIcon("qtg_mono_join_call")); |
|
120 rightButton->setCommand (EPhoneInCallCmdJoin); |
|
121 rightButton->setDisabled(true); |
|
122 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
|
123 } |
|
124 break; |
|
125 |
|
126 case R_PHONEUI_DIALER_CBA: |
|
127 case R_PHONEUI_INCALL_DIALER_CBA: |
|
128 case R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA: |
|
129 case R_PHONEUI_CALLHANDLING_INCALL_UNHOLD_CBA: |
|
130 { |
|
131 PhoneAction *leftButton = new PhoneAction; |
|
132 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
|
133 leftButton->setCommand(EPhoneInCallCmdDialer); |
|
134 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
135 |
|
136 PhoneAction *centerButton = new PhoneAction; |
|
137 centerButton->setIcon (HbIcon("qtg_mono_mic_mute")); |
|
138 centerButton->setCommand (EPhoneInCallCmdMute); |
|
139 translatedActions [PhoneAction::ToolbarButton2] = centerButton; |
|
140 |
|
141 PhoneAction *centerButton2 = new PhoneAction; |
|
142 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
|
143 { |
|
144 centerButton2->setIcon (HbIcon("qtg_mono_speaker")); |
|
145 centerButton2->setCommand (EPhoneInCallCmdActivateIhf); |
|
146 } |
|
147 else |
|
148 { |
|
149 centerButton2->setIcon (HbIcon("qtg_mono_mobile")); |
|
150 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
|
151 } |
|
152 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
|
153 |
|
154 PhoneAction *rightButton = new PhoneAction; |
|
155 rightButton->setIcon(HbIcon("qtg_mono_contacts")); |
|
156 rightButton->setDisabled( |
|
157 (symbianResourceId== |
|
158 R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA)); |
|
159 rightButton->setCommand(EPhoneInCallCmdContacts); |
|
160 |
|
161 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
|
162 } |
|
163 break; |
|
164 |
|
165 case R_PHONEUI_CALLHANDLING_EMERGENCY_CBA: |
|
166 { |
|
167 PhoneAction *leftButton = new PhoneAction; |
|
168 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
|
169 leftButton->setCommand(EPhoneInCallCmdDialer); |
|
170 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
171 |
|
172 PhoneAction *rightButton = new PhoneAction; |
|
173 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
|
174 { |
|
175 rightButton->setIcon (HbIcon("qtg_mono_speaker")); |
|
176 rightButton->setCommand (EPhoneInCallCmdActivateIhf); |
|
177 } |
|
178 else |
|
179 { |
|
180 rightButton->setIcon (HbIcon("qtg_mono_mobile")); |
|
181 rightButton->setCommand (EPhoneInCallCmdDeactivateIhf); |
|
182 } |
|
183 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
|
184 } |
|
185 break; |
|
186 |
|
187 case R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA: |
|
188 { |
|
189 PhoneAction *leftButton = new PhoneAction; |
|
190 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
|
191 leftButton->setCommand(EPhoneInCallCmdDialer); |
|
192 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
193 |
|
194 PhoneAction *centerButton = new PhoneAction; |
|
195 centerButton->setIcon (HbIcon("qtg_mono_mic_unmute")); |
|
196 centerButton->setCommand (EPhoneInCallCmdUnmute); |
|
197 translatedActions [PhoneAction::ToolbarButton2] = centerButton; |
|
198 |
|
199 PhoneAction *centerButton2 = new PhoneAction; |
|
200 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
|
201 { |
|
202 centerButton2->setIcon (HbIcon("qtg_mono_speaker")); |
|
203 centerButton2->setCommand (EPhoneInCallCmdActivateIhf); |
|
204 } |
|
205 else |
|
206 { |
|
207 centerButton2->setIcon (HbIcon("qtg_mono_mobile")); |
|
208 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
|
209 } |
|
210 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
|
211 |
|
212 PhoneAction *rightButton = new PhoneAction; |
|
213 rightButton->setIcon(HbIcon("qtg_mono_contacts")); |
|
214 rightButton->setCommand(EPhoneInCallCmdContacts); |
|
215 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
|
216 } |
|
217 break; |
|
218 |
|
219 case R_PHONEUI_CALLHANDLING_INCALL_HANDSET_CBA: |
|
220 { |
|
221 PhoneAction *leftButton = new PhoneAction; |
|
222 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
|
223 leftButton->setCommand(EPhoneInCallCmdDialer); |
|
224 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
|
225 |
|
226 PhoneAction *centerButton1 = new PhoneAction; |
|
227 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Hold)) |
|
228 { |
|
229 centerButton1->setIcon (HbIcon("qtg_mono_mic_mute")); |
|
230 centerButton1->setCommand (EPhoneInCallCmdMute); |
|
231 } |
|
232 else |
|
233 { |
|
234 centerButton1->setIcon (HbIcon("qtg_mono_mic_unmute")); |
|
235 centerButton1->setCommand (EPhoneInCallCmdUnmute); |
|
236 } |
|
237 translatedActions [PhoneAction::ToolbarButton2] = centerButton1; |
|
238 |
|
239 PhoneAction *centerButton2 = new PhoneAction; |
|
240 centerButton2->setIcon (HbIcon("qtg_mono_mobile")); |
|
241 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
|
242 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
|
243 |
|
244 PhoneAction *rightButton = new PhoneAction; |
|
245 rightButton->setIcon(HbIcon("qtg_mono_contacts")); |
|
246 rightButton->setCommand(EPhoneInCallCmdContacts); |
|
247 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
|
248 } |
|
249 break; |
|
250 |
|
251 case R_PHONEUI_MTCAL_INCOMING_CALL: |
70 case R_PHONEUI_MTCAL_INCOMING_CALL: |
252 { |
71 { |
253 PhoneAction *text = new PhoneAction; |
72 PhoneAction *text = new PhoneAction; |
254 text->setText (hbTrId("txt_phone_other_incoming_call")); |
73 text->setText (hbTrId("txt_phone_other_incoming_call")); |
255 translatedActions [PhoneAction::Text] = text; |
74 translatedActions [PhoneAction::Text] = text; |
381 string->Length()))); |
197 string->Length()))); |
382 translatedActions [PhoneAction::Text] = text; |
198 translatedActions [PhoneAction::Text] = text; |
383 VA_END (list); |
199 VA_END (list); |
384 } |
200 } |
385 break; |
201 break; |
386 case R_PHONE_IMEI_STRING: |
|
387 { |
|
388 QScopedPointer<PhoneAction> text(new PhoneAction); |
|
389 VA_LIST list; |
|
390 VA_START(list, symbianResourceId); |
|
391 const TDesC *string = static_cast<TDesC*>(VA_ARG(list, TDesC*)); |
|
392 QString serialNumber = |
|
393 QString::fromUtf16(string->Ptr(), string->Length()); |
|
394 text->setText(hbTrId("txt_phone_info_serial_no").arg(serialNumber)); |
|
395 translatedActions[PhoneAction::Text] = text.take(); |
|
396 VA_END(list); |
|
397 } |
|
398 break; |
|
399 case R_PHONEUI_LIFE_TIMER_STRING: |
|
400 { |
|
401 QScopedPointer<PhoneAction> text(new PhoneAction); |
|
402 VA_LIST list; |
|
403 VA_START(list, symbianResourceId); |
|
404 const TDesC *string = static_cast<TDesC*>(VA_ARG(list, TDesC*)); |
|
405 QString lifeTimerText = |
|
406 QString::fromUtf16(string->Ptr(), string->Length()); |
|
407 text->setText(hbTrId("txt_phone_info_life_timer").arg(lifeTimerText)); |
|
408 translatedActions[PhoneAction::Text] = text.take(); |
|
409 VA_END(list); |
|
410 } |
|
411 break; |
|
412 default: |
202 default: |
413 break; |
203 break; |
414 } |
204 } |
415 |
205 |
416 return translatedActions; |
206 return translatedActions; |
417 } |
207 } |
418 |
208 |
419 QString PhoneResourceAdapter::convertToString(int symbianResourceId) const |
209 QString PhoneResourceAdapter::convertToString( |
|
210 int symbianResourceId, const QString &causeCode) const |
420 { |
211 { |
421 QString ret; |
212 QString ret; |
422 |
213 |
423 switch (symbianResourceId) { |
214 switch (symbianResourceId) { |
424 case R_PHONE_ERROR_CALL_NOT_ALLOWED: |
215 case R_PHONE_ERROR_CALL_NOT_ALLOWED: |
425 { |
216 { |
426 ret = hbTrId("txt_phone_dpopinfo_not_allowed"); |
217 ret = hbTrId("txt_phone_dpopinfo_not_allowed").arg(causeCode); |
427 } |
218 } |
428 break; |
219 break; |
429 |
220 |
430 case R_ERROR_NOTE_NOT_ALLOWED: |
221 case R_ERROR_NOTE_NOT_ALLOWED: |
431 { |
222 { |
432 ret = hbTrId("txt_phone_dpopinfo_not_allowed"); |
223 ret = hbTrId("txt_phone_dpopinfo_not_allowed").arg(causeCode); |
433 } |
224 } |
434 break; |
225 break; |
435 |
226 |
436 case R_NOTETEXT_INVALID_PHONENUMBER: |
227 case R_NOTETEXT_INVALID_PHONENUMBER: |
437 { |
228 { |
438 ret = hbTrId("txt_phone_info_invalid_phone_number"); |
229 ret = hbTrId("txt_phone_info_invalid_phone_number").arg(causeCode); |
439 } |
230 } |
440 break; |
231 break; |
441 |
232 |
442 case R_NOTETEXT_NO_ANSWER: |
233 case R_NOTETEXT_NO_ANSWER: |
443 { |
234 { |
444 ret = hbTrId("txt_phone_info_no_answer"); |
235 ret = hbTrId("txt_phone_info_no_answer").arg(causeCode); |
445 } |
236 } |
446 break; |
237 break; |
447 |
238 |
448 case R_PHONE_ERROR_NUMBER_BUSY: |
239 case R_PHONE_ERROR_NUMBER_BUSY: |
449 { |
240 { |
450 ret = hbTrId("txt_phone_info_number_busy"); |
241 ret = hbTrId("txt_phone_info_number_busy").arg(causeCode); |
451 } |
242 } |
452 break; |
243 break; |
453 |
244 |
454 case R_PHONE_SS_NOTIFICATION_MOCAL_WAITING_TEXT: |
245 case R_PHONE_ERROR_REQUEST_REJECTED: |
455 { |
246 { |
456 ret = hbTrId("txt_phone_other_waiting"); |
247 ret = hbTrId("txt_phone_info_request_rejected").arg(causeCode); |
457 } |
248 } |
458 break; |
249 break; |
459 |
250 |
460 case R_PHONE_SS_NOTIFICATION_INCAL_INFO_HOLD_TEXT: |
251 case R_PHONE_SS_NOTIFICATION_INCAL_INFO_HOLD_TEXT: |
461 { |
252 { |
462 ret = hbTrId("txt_phone_other_on_hold"); |
253 ret = hbTrId("txt_phone_dpopinfo_on_hold"); |
463 } |
254 } |
464 break; |
255 break; |
465 |
256 |
466 case R_INCAL_INFO_HOLD_TEXT: |
257 case R_INCAL_INFO_HOLD_TEXT: |
467 { |
258 { |
468 ret = hbTrId("txt_phone_other_on_hold"); |
259 ret = hbTrId("txt_phone_dpopinfo_on_hold"); |
469 } |
260 } |
470 break; |
261 break; |
471 |
262 |
472 case R_INCAL_REMOTE_ACTIVE_TEXT: |
263 case R_INCAL_REMOTE_ACTIVE_TEXT: |
473 { |
264 { |
474 ret = hbTrId("txt_phone_info_connected"); |
265 ret = hbTrId("txt_phone_info_connected"); |
475 } |
266 } |
476 break; |
267 break; |
477 |
268 |
478 case R_INCAL_INFO_CONF_HOLD_TEXT: |
|
479 { |
|
480 ret = hbTrId("Conference on hold"); |
|
481 } |
|
482 break; |
|
483 case R_PHONE_INCALL_INFO_NO_NETWORK_SUPPORT: |
269 case R_PHONE_INCALL_INFO_NO_NETWORK_SUPPORT: |
484 { |
270 { |
485 ret = hbTrId("txt_phone_info_no_network_support_for_video_call"); |
271 ret = hbTrId("txt_phone_info_no_network_support_for_video_call").arg(causeCode); |
486 } |
272 } |
487 break; |
273 break; |
488 case R_PHONE_ERROR_EMERGENCY_CALLS_ONLY: |
274 case R_PHONE_ERROR_EMERGENCY_CALLS_ONLY: |
489 { |
275 { |
490 ret = hbTrId("txt_phone_info_emergency_calls_only"); |
276 ret = hbTrId("txt_phone_info_emergency_calls_only").arg(causeCode); |
491 } |
277 } |
492 break; |
278 break; |
493 case R_NOTETEXT_NUMBER_NOT_IN_USE: |
279 case R_NOTETEXT_NUMBER_NOT_IN_USE: |
494 { |
280 { |
495 ret = hbTrId("txt_phone_info_number_not_in_use"); |
281 ret = hbTrId("txt_phone_info_number_not_in_use").arg(causeCode); |
496 } |
282 } |
497 break; |
283 break; |
498 case R_NOTETEXT_NETWORK_BUSY: |
284 case R_NOTETEXT_NETWORK_BUSY: |
499 { |
285 { |
500 ret = hbTrId("txt_phone_info_network_busy"); |
286 ret = hbTrId("txt_phone_info_network_busy").arg(causeCode); |
501 } |
287 } |
502 break; |
288 break; |
503 case R_NOTETEXT_ERROR_IN_CONNECTION: |
289 case R_NOTETEXT_ERROR_IN_CONNECTION: |
504 { |
290 { |
505 ret = hbTrId("txt_phone_info_error_in_connection"); |
291 ret = hbTrId("txt_phone_info_error_in_connection").arg(causeCode); |
506 } |
292 } |
507 break; |
293 break; |
508 case R_PHONEUI_ERROR_EMERGENCY_ATTEMPT_FAILED: |
294 case R_PHONEUI_ERROR_EMERGENCY_ATTEMPT_FAILED: |
509 { |
295 { |
510 ret = hbTrId("txt_phone_info_emergency_call_failed"); |
296 ret = hbTrId("txt_phone_info_emergency_call_failed").arg(causeCode); |
511 } |
297 } |
512 break; |
298 break; |
513 case R_PHONE_SS_NOTIFICATION_INCAL_TRANSFERRED_TEXT: |
299 case R_PHONE_SS_NOTIFICATION_INCAL_TRANSFERRED_TEXT: |
514 { |
300 { |
515 ret = hbTrId("txt_phone_info_transferred"); |
301 ret = hbTrId("txt_phone_info_transferred"); |
516 } |
302 } |
517 break; |
303 break; |
518 case R_PHONE_ERROR_NO_SERVICE: |
304 case R_PHONE_ERROR_NO_SERVICE: |
519 { |
305 { |
520 ret = hbTrId("txt_phone_dpopinfo_no_network_coverage"); |
306 ret = hbTrId("txt_phone_dpopinfo_no_network_coverage").arg(causeCode); |
|
307 } |
|
308 break; |
|
309 case R_NOTETEXT_NUMBER_BARRED: |
|
310 { |
|
311 ret = hbTrId("txt_phone_info_number_barred").arg(causeCode); |
|
312 } |
|
313 break; |
|
314 case R_PHONEUI_VIDEO_CALL_NOT_POSSIBLE: |
|
315 { |
|
316 ret = hbTrId("txt_phone_info_video_call_didnt_succeed_to_called").arg(causeCode); |
|
317 } |
|
318 break; |
|
319 case R_CALL_INFO_CAUSE_VALUE127: |
|
320 case R_CALL_INFO_NOT_SUPPORTED: |
|
321 case R_CALL_INFO_SERVICE_NOT_AVAILABLE: |
|
322 case R_CALL_INFO_CAUSE_VALUE38: |
|
323 case R_CALL_INFO_CAUSE_VALUE55: |
|
324 case R_CALL_INFO_CAUSE_VALUE58: |
|
325 case R_NOTE_UNABLE_TO_MAKE_VIDEO_CALL_NOT_SUPPORTED_BY_OTHER_PHONE: |
|
326 { |
|
327 ret = hbTrId("txt_phone_info_unable_to_make_video_call_not_supp").arg(causeCode); |
|
328 } |
|
329 break; |
|
330 case R_NOTE_PHONE_OUT_OF_3G_COVERAGE: |
|
331 { |
|
332 ret = hbTrId("txt_phone_info_phone_switched_off_or_out_of_3g").arg(causeCode); |
|
333 } |
|
334 break; |
|
335 case R_NOTE_VIDEO_CALL_ONLY_POSSIBLE_UNDER_3G_COVERAGE: |
|
336 { |
|
337 ret = hbTrId("txt_phone_info_videocall_only_possible_under_3g").arg(causeCode); |
|
338 } |
|
339 break; |
|
340 case R_NOTE_CALLED_NUMBER_HAS_BARRED_INCOMING_CALLS: |
|
341 { |
|
342 ret = hbTrId("txt_phone_info_called_number_has_barred_incoming").arg(causeCode); |
|
343 } |
|
344 break; |
|
345 case R_INCAL_REMOTE_CREATE_CONFERENCE_TEXT: |
|
346 { |
|
347 ret = hbTrId("txt_phone_info_conference_call_active"); |
|
348 } |
|
349 break; |
|
350 case R_NOTETEXT_CALL_BARRINGS: |
|
351 { |
|
352 ret = hbTrId("txt_phone_dpopinfo_note_you_have_active_barrings"); |
|
353 } |
|
354 break; |
|
355 case R_CALL_INFO_CAUSE_VALUE16: |
|
356 { |
|
357 ret = hbTrId("txt_phone_info_no_answer").arg(causeCode); |
|
358 } |
|
359 break; |
|
360 case R_CALL_INFO_CAUSE_VALUE18: |
|
361 { |
|
362 ret = hbTrId("txt_phone_info_no_answer").arg(causeCode); |
|
363 } |
|
364 break; |
|
365 case R_CALL_INFO_CAUSE_VALUE21: |
|
366 { |
|
367 ret = hbTrId("txt_phone_info_request_rejected"); |
|
368 } |
|
369 break; |
|
370 case R_CALL_INFO_CAUSE_VALUE22: |
|
371 { |
|
372 ret = hbTrId("txt_phone_info_number_not_in_use").arg(causeCode); |
|
373 } |
|
374 break; |
|
375 case R_CALL_INFO_CAUSE_VALUE34: |
|
376 { |
|
377 ret = hbTrId("txt_phone_info_network_busy").arg(causeCode); |
|
378 } |
|
379 break; |
|
380 case R_PHONE_ERROR_CALL_NOT_ALLOWED_FDN: |
|
381 { |
|
382 ret = hbTrId("txt_phone_info_call_not_allowed_fixed_dialling").arg(causeCode); |
|
383 } |
|
384 break; |
|
385 case R_NOTETEXT_DIVERTING_INCOMING_CALL: |
|
386 case R_NOTETEXT_DIVERTING: |
|
387 { |
|
388 ret = hbTrId("txt_phone_dpopinfo_diverting"); |
|
389 } |
|
390 break; |
|
391 case R_NOTETEXT_ALL_INCOMING_CALLS_DIVERTED: |
|
392 { |
|
393 ret = hbTrId("txt_phone_dpopinfo_note_all_incoming_calls_diver"); |
|
394 } |
|
395 break; |
|
396 case R_PHONE_ERROR_CHECK_CLIR: |
|
397 { |
|
398 ret = hbTrId("txt_phone_info_check_own_number_sending").arg(causeCode); |
|
399 } |
|
400 break; |
|
401 case R_PHONE_SS_NOTIFICATION_CLIR_SUPPR_REJECT_TEXT: |
|
402 { |
|
403 ret = hbTrId("txt_phone_info_could_not_send_own_number").arg(causeCode); |
|
404 } |
|
405 break; |
|
406 case R_NOTE_TEXT_CLIR_CHANGE: |
|
407 { |
|
408 ret = hbTrId("txt_phone_info_activate_own_number_sending").arg(causeCode); |
|
409 } |
|
410 break; |
|
411 case R_PHONE_ERROR_CHECK_NETWORK_SERVICES: |
|
412 { |
|
413 ret = hbTrId("txt_phone_info_check_network_services").arg(causeCode); |
|
414 } |
|
415 break; |
|
416 case R_PHONE_INCALL_INFO_VIDEO_CALL_NOT_ALLOWED_DURING_RESTORE: |
|
417 { |
|
418 ret = hbTrId("txt_phone_info_video_call_not_allowed_during_resto").arg(causeCode); |
521 } |
419 } |
522 break; |
420 break; |
523 default: |
421 default: |
524 break; |
422 break; |
525 } |
423 } |
526 |
424 |
527 return ret; |
425 return ret; |
528 } |
426 } |
529 |
427 |
530 QString PhoneResourceAdapter::convertToString( |
428 QString PhoneResourceAdapter::convertToStringWithParam( |
531 int symbianResourceId, const QString &text) const |
429 int symbianResourceId, const QString &text) const |
532 { |
430 { |
533 QString ret; |
431 QString ret; |
534 |
432 |
535 switch (symbianResourceId) { |
433 switch (symbianResourceId) { |
610 } |
505 } |
611 |
506 |
612 return ret; |
507 return ret; |
613 } |
508 } |
614 |
509 |
|
510 QList<PhoneAction::ToolBarItem> PhoneResourceAdapter::convertToToolBarCommandList( |
|
511 int symbianResourceId ) const |
|
512 { |
|
513 QList<PhoneAction::ToolBarItem> ret; |
|
514 |
|
515 switch(symbianResourceId) { |
|
516 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA: |
|
517 { |
|
518 ret.append(PhoneAction::ToolBarItem(PhoneCallComingCmdSoftReject,true)); |
|
519 ret.append(PhoneAction::ToolBarItem(PhoneCallComingCmdSilent,true)); |
|
520 } |
|
521 break; |
|
522 |
|
523 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA: |
|
524 { |
|
525 ret.append(PhoneAction::ToolBarItem(PhoneCallComingCmdSoftReject,true)); |
|
526 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdReject,true)); |
|
527 } |
|
528 break; |
|
529 |
|
530 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA: |
|
531 { |
|
532 ret.append(PhoneAction::ToolBarItem(PhoneCallComingCmdSoftReject,true)); |
|
533 ret.append(PhoneAction::ToolBarItem(PhoneCallComingCmdSilent,false)); |
|
534 } |
|
535 break; |
|
536 |
|
537 case R_PHONEUI_CALLHANDLING_CALLWAITING_CBA: |
|
538 { |
|
539 ret.append(PhoneAction::ToolBarItem(PhoneCallComingCmdSoftReject,true)); |
|
540 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdJoinToConference,false)); |
|
541 } |
|
542 break; |
|
543 |
|
544 case R_PHONEUI_DIALER_CBA: |
|
545 case R_PHONEUI_INCALL_DIALER_CBA: |
|
546 case R_PHONEUI_CALLHANDLING_INCALL_UNHOLD_CBA: |
|
547 case R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA: |
|
548 case R_PHONEUI_CALLHANDLING_INCALL_HANDSET_CBA: |
|
549 case R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA: |
|
550 case R_PHONEUI_CALLHANDLING_INCALL_BTAA_CBA: |
|
551 { |
|
552 if (m_buttonsCtrl->getButtonFlags( |
|
553 PhoneUIQtButtonsController::IhfAsPushButton)) { |
|
554 if (m_buttonsCtrl->getButtonFlags( |
|
555 PhoneUIQtButtonsController::Mute)) { |
|
556 ret.append(PhoneAction::ToolBarItem( |
|
557 PhoneInCallCmdUnmute,true)); |
|
558 } else { |
|
559 ret.append(PhoneAction::ToolBarItem( |
|
560 PhoneInCallCmdMute,true)); |
|
561 } |
|
562 } else { |
|
563 if (m_buttonsCtrl->getButtonFlags( |
|
564 PhoneUIQtButtonsController::BluetoothAvailable)) { |
|
565 if (m_buttonsCtrl->getButtonFlags( |
|
566 PhoneUIQtButtonsController::Btaa)) { |
|
567 ret.append(PhoneAction::ToolBarItem( |
|
568 PhoneInCallCmdHandset,true)); |
|
569 } else { |
|
570 ret.append(PhoneAction::ToolBarItem( |
|
571 PhoneInCallCmdBtHandsfree,true)); |
|
572 } |
|
573 } else { |
|
574 if (!m_buttonsCtrl->getButtonFlags( |
|
575 PhoneUIQtButtonsController::Ihf)) { |
|
576 ret.append(PhoneAction::ToolBarItem( |
|
577 PhoneInCallCmdActivateIhf,true)); |
|
578 } else { |
|
579 ret.append(PhoneAction::ToolBarItem( |
|
580 PhoneInCallCmdDeactivateIhf,true)); |
|
581 } |
|
582 } |
|
583 } |
|
584 |
|
585 if (!m_buttonsCtrl->getButtonFlags( |
|
586 PhoneUIQtButtonsController::MultiCall)) { |
|
587 bool outgoing(m_buttonsCtrl->getButtonFlags( |
|
588 PhoneUIQtButtonsController::Outgoing)); |
|
589 if (m_buttonsCtrl->getButtonFlags( |
|
590 PhoneUIQtButtonsController::Hold)) { |
|
591 ret.append(PhoneAction::ToolBarItem( |
|
592 PhoneInCallCmdUnhold,!outgoing)); |
|
593 } else { |
|
594 ret.append(PhoneAction::ToolBarItem( |
|
595 PhoneInCallCmdHold,!outgoing)); |
|
596 } |
|
597 |
|
598 ret.append(PhoneAction::ToolBarItem( |
|
599 PhoneInCallCmdOpenContacts,true)); |
|
600 } else { |
|
601 bool outgoing(m_buttonsCtrl->getButtonFlags( |
|
602 PhoneUIQtButtonsController::Outgoing)); |
|
603 bool disableJoin(outgoing ? true : |
|
604 m_buttonsCtrl->getButtonFlags( |
|
605 PhoneUIQtButtonsController::DisableJoin)); |
|
606 |
|
607 ret.append(PhoneAction::ToolBarItem( |
|
608 PhoneInCallCmdSwap,!outgoing)); |
|
609 |
|
610 if (m_buttonsCtrl->getButtonFlags( |
|
611 PhoneUIQtButtonsController::Conference)) { |
|
612 ret.append(PhoneAction::ToolBarItem( |
|
613 PhoneInCallCmdJoinToConference,!disableJoin)); |
|
614 } else { |
|
615 ret.append(PhoneAction::ToolBarItem( |
|
616 PhoneInCallCmdCreateConference,!disableJoin)); |
|
617 } |
|
618 } |
|
619 |
|
620 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdOpenDialer,true)); |
|
621 } |
|
622 break; |
|
623 |
|
624 case R_PHONEUI_CALLHANDLING_EMERGENCY_CBA: |
|
625 { |
|
626 |
|
627 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
|
628 { |
|
629 ret.append(PhoneAction::ToolBarItem( |
|
630 PhoneInCallCmdActivateIhf,true)); |
|
631 } |
|
632 else |
|
633 { |
|
634 ret.append(PhoneAction::ToolBarItem( |
|
635 PhoneInCallCmdDeactivateIhf,true)); |
|
636 } |
|
637 } |
|
638 |
|
639 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdOpenDialer,true)); |
|
640 break; |
|
641 |
|
642 /*case R_PHONEUI_CALLHANDLING_INCALL_HANDSET_CBA: |
|
643 { |
|
644 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdOpenDialer,true)); |
|
645 |
|
646 if (m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Hold)) |
|
647 { |
|
648 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdUnhold,true)); |
|
649 } |
|
650 else |
|
651 { |
|
652 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdHold,true)); |
|
653 } |
|
654 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Hold)) |
|
655 { |
|
656 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdMute,true)); |
|
657 } |
|
658 else |
|
659 { |
|
660 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdUnmute,true)); |
|
661 } |
|
662 |
|
663 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdDeactivateIhf,true)); |
|
664 ret.append(PhoneAction::ToolBarItem(PhoneInCallCmdOpenContacts,true)); |
|
665 } |
|
666 break;*/ |
|
667 default: |
|
668 break; |
|
669 } |
|
670 |
|
671 return ret; |
|
672 } |
|
673 |
|
674 |