63 QMap<PhoneAction::ActionType, PhoneAction *> PhoneResourceAdapter::convert (int symbianResourceId, ...) |
63 QMap<PhoneAction::ActionType, PhoneAction *> PhoneResourceAdapter::convert (int symbianResourceId, ...) |
64 { |
64 { |
65 QMap<PhoneAction::ActionType, PhoneAction *> translatedActions; |
65 QMap<PhoneAction::ActionType, PhoneAction *> translatedActions; |
66 |
66 |
67 switch (symbianResourceId) { |
67 switch (symbianResourceId) { |
68 case R_PHONEUI_INCOMING_CALL_BUTTONS: |
|
69 case R_PHONEUI_WAITING_CALL_BUTTONS: |
|
70 { |
|
71 PhoneAction *leftButton = new PhoneAction; |
|
72 leftButton->setText (hbTrId("txt_common_button_answer")); |
|
73 leftButton->setIcon (HbIcon(":/pri_large_button_answer.svg")); |
|
74 leftButton->setCommand (EPhoneCallComingCmdAnswer); |
|
75 translatedActions [PhoneAction::LeftButton] = leftButton; |
|
76 |
|
77 PhoneAction *rightButton = new PhoneAction; |
|
78 rightButton->setText (hbTrId("txt_common_button_reject")); |
|
79 rightButton->setIcon (HbIcon(":/qtg_large_button_reject.svg")); |
|
80 rightButton->setCommand (EPhoneCallComingCmdReject); |
|
81 translatedActions [PhoneAction::RightButton] = rightButton; |
|
82 } |
|
83 break; |
|
84 |
|
85 case R_PHONEUI_CALL_SETUP_BUTTONS: |
|
86 { |
|
87 PhoneAction *leftButton = new PhoneAction; |
|
88 leftButton->setText (hbTrId("txt_phone_button_end_call")); |
|
89 leftButton->setIcon (HbIcon(":/pri_large_button_endcall.svg")); |
|
90 leftButton->setCommand (EPhoneInCallCmdEndThisOutgoingCall); |
|
91 translatedActions [PhoneAction::LeftButton] = leftButton; |
|
92 } |
|
93 break; |
|
94 |
|
95 case R_PHONEUI_INCALL_BUTTONS: |
|
96 { |
|
97 PhoneAction *leftButton = new PhoneAction; |
|
98 leftButton->setText (hbTrId("txt_phone_button_hold")); |
|
99 leftButton->setIcon (HbIcon(":/qtg_large_button_hold.svg")); |
|
100 leftButton->setCommand (EPhoneInCallCmdHold); |
|
101 translatedActions [PhoneAction::LeftButton] = leftButton; |
|
102 |
|
103 PhoneAction *rightButton = new PhoneAction; |
|
104 rightButton->setText (hbTrId("txt_phone_button_end_call")); |
|
105 rightButton->setIcon (HbIcon(":/pri_large_button_endcall.svg")); |
|
106 rightButton->setCommand (EPhoneInCallCmdEndThisActiveCall); |
|
107 translatedActions [PhoneAction::RightButton] = rightButton; |
|
108 } |
|
109 break; |
|
110 |
|
111 case R_PHONEUI_INCALL_HELD_BUTTONS: |
|
112 { |
|
113 PhoneAction *leftButton = new PhoneAction; |
|
114 leftButton->setText (hbTrId("txt_phone_button_unhold")); |
|
115 leftButton->setIcon (HbIcon(":/qtg_large_button_onhold.svg")); |
|
116 leftButton->setCommand (EPhoneInCallCmdUnhold); |
|
117 translatedActions [PhoneAction::LeftButton] = leftButton; |
|
118 |
|
119 PhoneAction *rightButton = new PhoneAction; |
|
120 rightButton->setText (hbTrId("txt_phone_button_end_call")); |
|
121 rightButton->setIcon (HbIcon(":/pri_large_button_endcall.svg")); |
|
122 rightButton->setCommand (EPhoneInCallCmdEndThisActiveCall); |
|
123 translatedActions [PhoneAction::RightButton] = rightButton; |
|
124 } |
|
125 break; |
|
126 |
|
127 case R_PHONEUI_TWO_SINGLES_BUTTONS: |
|
128 { |
|
129 PhoneAction *leftButton = new PhoneAction; |
|
130 leftButton->setText (hbTrId("txt_phone_button_swap")); |
|
131 leftButton->setIcon (HbIcon(":/qgn_indi_button_swap.svg")); |
|
132 leftButton->setCommand (EPhoneInCallCmdSwap); |
|
133 translatedActions [PhoneAction::LeftButton] = leftButton; |
|
134 |
|
135 PhoneAction *rightButton = new PhoneAction; |
|
136 rightButton->setText (hbTrId("txt_phone_button_end_call")); |
|
137 rightButton->setIcon (HbIcon(":/pri_large_button_endcall.svg")); |
|
138 rightButton->setCommand (EPhoneInCallCmdEndThisActiveCall); |
|
139 translatedActions [PhoneAction::RightButton] = rightButton; |
|
140 } |
|
141 break; |
|
142 |
68 |
143 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA: |
69 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA: |
144 { |
70 { |
145 PhoneAction *leftButton = new PhoneAction; |
71 PhoneAction *leftButton = new PhoneAction; |
146 leftButton->setIcon (HbIcon(":/qtg_large_comp_message.svg")); |
72 leftButton->setIcon (HbIcon("qtg_mono_send")); |
|
73 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
147 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
74 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
148 |
75 |
149 PhoneAction *rightButton = new PhoneAction; |
76 PhoneAction *rightButton = new PhoneAction; |
150 rightButton->setIcon (HbIcon(":/qtg_large_tb_silence.svg")); |
77 rightButton->setIcon (HbIcon("qtg_mono_mute")); |
151 rightButton->setCommand (EPhoneCallComingCmdSilent); |
78 rightButton->setCommand (EPhoneCallComingCmdSilent); |
152 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
79 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
153 } |
80 } |
154 break; |
81 break; |
155 |
82 |
156 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA: |
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 |
157 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA: |
97 case R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA: |
158 { |
98 { |
159 PhoneAction *leftButton = new PhoneAction; |
99 PhoneAction *leftButton = new PhoneAction; |
160 leftButton->setIcon (HbIcon(":/qtg_large_comp_message.svg")); |
100 leftButton->setIcon (HbIcon("qtg_mono_send")); |
161 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
101 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
162 |
102 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
163 PhoneAction *rightButton = new PhoneAction; |
103 |
164 rightButton->setIcon (HbIcon(":/qtg_large_tb_silence.svg")); |
104 PhoneAction *rightButton = new PhoneAction; |
|
105 rightButton->setIcon (HbIcon("qtg_mono_mute")); |
165 rightButton->setDisabled(true); |
106 rightButton->setDisabled(true); |
166 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
107 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
167 } |
108 } |
168 break; |
109 break; |
169 |
110 |
170 case R_PHONEUI_CALLHANDLING_CALLWAITING_CBA: |
111 case R_PHONEUI_CALLHANDLING_CALLWAITING_CBA: |
171 { |
112 { |
172 PhoneAction *leftButton = new PhoneAction; |
113 PhoneAction *leftButton = new PhoneAction; |
173 leftButton->setIcon (HbIcon(":/qtg_large_comp_message.svg")); |
114 leftButton->setIcon (HbIcon("qtg_mono_send")); |
|
115 leftButton->setCommand(EPhoneCallComingCmdSoftReject); |
174 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
116 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
175 |
117 |
176 PhoneAction *rightButton = new PhoneAction; |
118 PhoneAction *rightButton = new PhoneAction; |
177 rightButton->setIcon (HbIcon(":/qtg_large_tb_join.svg")); |
119 rightButton->setIcon (HbIcon("qtg_mono_join_call")); |
178 rightButton->setCommand (EPhoneInCallCmdJoin); |
120 rightButton->setCommand (EPhoneInCallCmdJoin); |
|
121 rightButton->setDisabled(true); |
179 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
122 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
180 } |
123 } |
181 break; |
124 break; |
182 |
125 |
183 case R_PHONEUI_DIALER_CBA: |
126 case R_PHONEUI_DIALER_CBA: |
184 case R_PHONEUI_INCALL_DIALER_CBA: |
127 case R_PHONEUI_INCALL_DIALER_CBA: |
185 case R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA: |
128 case R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA: |
186 case R_PHONEUI_CALLHANDLING_INCALL_UNHOLD_CBA: |
129 case R_PHONEUI_CALLHANDLING_INCALL_UNHOLD_CBA: |
187 { |
130 { |
188 PhoneAction *leftButton = new PhoneAction; |
131 PhoneAction *leftButton = new PhoneAction; |
189 leftButton->setIcon (HbIcon(":/qtg_large_tb_dialler.svg")); |
132 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
190 leftButton->setCommand(EPhoneInCallCmdDialer); |
133 leftButton->setCommand(EPhoneInCallCmdDialer); |
191 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
134 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
192 |
135 |
193 PhoneAction *centerButton = new PhoneAction; |
136 PhoneAction *centerButton = new PhoneAction; |
194 centerButton->setIcon (HbIcon(":/qtg_large_tb_mute.svg")); |
137 centerButton->setIcon (HbIcon("qtg_mono_mic_mute")); |
195 centerButton->setCommand (EPhoneInCallCmdMute); |
138 centerButton->setCommand (EPhoneInCallCmdMute); |
196 translatedActions [PhoneAction::ToolbarButton2] = centerButton; |
139 translatedActions [PhoneAction::ToolbarButton2] = centerButton; |
197 |
140 |
198 PhoneAction *centerButton2 = new PhoneAction; |
141 PhoneAction *centerButton2 = new PhoneAction; |
199 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
142 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
200 { |
143 { |
201 centerButton2->setIcon (HbIcon(":/qtg_large_tb_loudsp_unmute.svg")); |
144 centerButton2->setIcon (HbIcon("qtg_mono_loudspeaker")); |
202 centerButton2->setCommand (EPhoneInCallCmdActivateIhf); |
145 centerButton2->setCommand (EPhoneInCallCmdActivateIhf); |
203 } |
146 } |
204 else |
147 else |
205 { |
148 { |
206 centerButton2->setIcon (HbIcon(":/qtg_large_tb_loudsp_mute.svg")); |
149 centerButton2->setIcon (HbIcon("qtg_mono_mobile")); |
207 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
150 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
208 } |
151 } |
209 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
152 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
210 |
153 |
211 PhoneAction *rightButton = new PhoneAction; |
154 PhoneAction *rightButton = new PhoneAction; |
212 rightButton->setIcon(HbIcon(":/qtg_large_tb_contacts.svg")); |
155 rightButton->setIcon(HbIcon("qtg_mono_contacts")); |
213 rightButton->setDisabled( |
156 rightButton->setDisabled( |
214 (symbianResourceId== |
157 (symbianResourceId== |
215 R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA)); |
158 R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA)); |
216 |
159 |
217 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
160 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
219 break; |
162 break; |
220 |
163 |
221 case R_PHONEUI_CALLHANDLING_EMERGENCY_CBA: |
164 case R_PHONEUI_CALLHANDLING_EMERGENCY_CBA: |
222 { |
165 { |
223 PhoneAction *leftButton = new PhoneAction; |
166 PhoneAction *leftButton = new PhoneAction; |
224 leftButton->setIcon (HbIcon(":/qtg_large_tb_dialler.svg")); |
167 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
225 leftButton->setCommand(EPhoneInCallCmdDialer); |
168 leftButton->setCommand(EPhoneInCallCmdDialer); |
226 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
169 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
227 |
170 |
228 PhoneAction *rightButton = new PhoneAction; |
171 PhoneAction *rightButton = new PhoneAction; |
229 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
172 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
230 { |
173 { |
231 rightButton->setIcon (HbIcon(":/qtg_large_tb_loudsp_unmute.svg")); |
174 rightButton->setIcon (HbIcon("qtg_mono_loudspeaker")); |
232 rightButton->setCommand (EPhoneInCallCmdActivateIhf); |
175 rightButton->setCommand (EPhoneInCallCmdActivateIhf); |
233 } |
176 } |
234 else |
177 else |
235 { |
178 { |
236 rightButton->setIcon (HbIcon(":/qtg_large_tb_loudsp_mute.svg")); |
179 rightButton->setIcon (HbIcon("qtg_mono_mobile")); |
237 rightButton->setCommand (EPhoneInCallCmdDeactivateIhf); |
180 rightButton->setCommand (EPhoneInCallCmdDeactivateIhf); |
238 } |
181 } |
239 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
182 translatedActions [PhoneAction::ToolbarButton2] = rightButton; |
240 } |
183 } |
241 break; |
184 break; |
242 |
185 |
243 case R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA: |
186 case R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA: |
244 { |
187 { |
245 PhoneAction *leftButton = new PhoneAction; |
188 PhoneAction *leftButton = new PhoneAction; |
246 leftButton->setIcon (HbIcon(":/qtg_large_tb_dialler.svg")); |
189 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
247 leftButton->setCommand(EPhoneInCallCmdDialer); |
190 leftButton->setCommand(EPhoneInCallCmdDialer); |
248 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
191 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
249 |
192 |
250 PhoneAction *centerButton = new PhoneAction; |
193 PhoneAction *centerButton = new PhoneAction; |
251 centerButton->setIcon (HbIcon(":/qtg_large_tb_unmute.svg")); |
194 centerButton->setIcon (HbIcon("qtg_mono_mic_unmute")); |
252 centerButton->setCommand (EPhoneInCallCmdUnmute); |
195 centerButton->setCommand (EPhoneInCallCmdUnmute); |
253 translatedActions [PhoneAction::ToolbarButton2] = centerButton; |
196 translatedActions [PhoneAction::ToolbarButton2] = centerButton; |
254 |
197 |
255 PhoneAction *centerButton2 = new PhoneAction; |
198 PhoneAction *centerButton2 = new PhoneAction; |
256 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
199 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Ihf)) |
257 { |
200 { |
258 centerButton2->setIcon (HbIcon(":/qtg_large_tb_loudsp_unmute.svg")); |
201 centerButton2->setIcon (HbIcon("qtg_mono_loudspeaker")); |
259 centerButton2->setCommand (EPhoneInCallCmdActivateIhf); |
202 centerButton2->setCommand (EPhoneInCallCmdActivateIhf); |
260 } |
203 } |
261 else |
204 else |
262 { |
205 { |
263 centerButton2->setIcon (HbIcon(":/qtg_large_tb_loudsp_mute.svg")); |
206 centerButton2->setIcon (HbIcon("qtg_mono_mobile")); |
264 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
207 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
265 } |
208 } |
266 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
209 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
267 |
210 |
268 PhoneAction *rightButton = new PhoneAction; |
211 PhoneAction *rightButton = new PhoneAction; |
269 rightButton->setIcon(HbIcon(":/qtg_large_tb_contacts.svg")); |
212 rightButton->setIcon(HbIcon("qtg_mono_contacts")); |
270 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
213 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
271 } |
214 } |
272 break; |
215 break; |
273 |
216 |
274 case R_PHONEUI_CALLHANDLING_INCALL_HANDSET_CBA: |
217 case R_PHONEUI_CALLHANDLING_INCALL_HANDSET_CBA: |
275 { |
218 { |
276 PhoneAction *leftButton = new PhoneAction; |
219 PhoneAction *leftButton = new PhoneAction; |
277 leftButton->setIcon (HbIcon(":/qtg_large_tb_dialler.svg")); |
220 leftButton->setIcon (HbIcon("qtg_mono_dialer")); |
278 leftButton->setCommand(EPhoneInCallCmdDialer); |
221 leftButton->setCommand(EPhoneInCallCmdDialer); |
279 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
222 translatedActions [PhoneAction::ToolbarButton1] = leftButton; |
280 |
223 |
281 PhoneAction *centerButton1 = new PhoneAction; |
224 PhoneAction *centerButton1 = new PhoneAction; |
282 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Hold)) |
225 if (!m_buttonsCtrl->getButtonFlags(PhoneUIQtButtonsController::Hold)) |
283 { |
226 { |
284 centerButton1->setIcon (HbIcon(":/qtg_large_tb_mute.svg")); |
227 centerButton1->setIcon (HbIcon("qtg_mono_mic_mute")); |
285 centerButton1->setCommand (EPhoneInCallCmdMute); |
228 centerButton1->setCommand (EPhoneInCallCmdMute); |
286 } |
229 } |
287 else |
230 else |
288 { |
231 { |
289 centerButton1->setIcon (HbIcon(":/qtg_large_tb_unmute.svg")); |
232 centerButton1->setIcon (HbIcon("qtg_mono_mic_unmute")); |
290 centerButton1->setCommand (EPhoneInCallCmdUnmute); |
233 centerButton1->setCommand (EPhoneInCallCmdUnmute); |
291 } |
234 } |
292 translatedActions [PhoneAction::ToolbarButton2] = centerButton1; |
235 translatedActions [PhoneAction::ToolbarButton2] = centerButton1; |
293 |
236 |
294 PhoneAction *centerButton2 = new PhoneAction; |
237 PhoneAction *centerButton2 = new PhoneAction; |
295 centerButton2->setIcon (HbIcon(":/qtg_large_tb_loudsp_mute.svg")); |
238 centerButton2->setIcon (HbIcon("qtg_mono_mobile")); |
296 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
239 centerButton2->setCommand (EPhoneInCallCmdDeactivateIhf); |
297 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
240 translatedActions [PhoneAction::ToolbarButton3] = centerButton2; |
298 |
241 |
299 PhoneAction *rightButton = new PhoneAction; |
242 PhoneAction *rightButton = new PhoneAction; |
300 rightButton->setIcon(HbIcon(":/qtg_large_tb_contacts.svg")); |
243 rightButton->setIcon(HbIcon("qtg_mono_contacts")); |
301 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
244 translatedActions[PhoneAction::ToolbarButton4] = rightButton; |
302 } |
245 } |
303 break; |
246 break; |
304 |
247 |
305 case R_PHONEUI_MTCAL_INCOMING_CALL: |
248 case R_PHONEUI_MTCAL_INCOMING_CALL: |
306 { |
249 { |
307 PhoneAction *text = new PhoneAction; |
250 PhoneAction *text = new PhoneAction; |
308 text->setText (hbTrId("calling")); |
251 text->setText (hbTrId("txt_phone_other_incoming_call")); |
309 translatedActions [PhoneAction::Text] = text; |
252 translatedActions [PhoneAction::Text] = text; |
310 } |
253 } |
311 break; |
254 break; |
312 |
255 |
313 case R_PHONEUI_INCALL_CALL_DISCONNECTED: |
256 case R_PHONEUI_INCALL_CALL_DISCONNECTED: |
314 { |
257 { |
315 PhoneAction *text = new PhoneAction; |
258 PhoneAction *text = new PhoneAction; |
316 text->setText (hbTrId("disconnected")); |
259 text->setText (hbTrId("txt_phone_other_disconnected")); |
317 translatedActions [PhoneAction::Text] = text; |
260 translatedActions [PhoneAction::Text] = text; |
318 } |
261 } |
319 break; |
262 break; |
320 |
263 |
321 case R_PHONEUI_INCALL_CALL_HELD: |
264 case R_PHONEUI_INCALL_CALL_HELD: |