phoneapp/phoneuiqtviewadapter/src/phoneresourceadapter.cpp
changeset 22 6bb1b21d2484
parent 21 92ab7f8d0eab
child 27 2f8f8080a020
equal deleted inserted replaced
21:92ab7f8d0eab 22:6bb1b21d2484
    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:
   338         {
   281         {
   339         PhoneAction *text = new PhoneAction;
   282         PhoneAction *text = new PhoneAction;
   340         VA_LIST list;
   283         VA_LIST list;
   341         VA_START (list, symbianResourceId);
   284         VA_START (list, symbianResourceId);
   342         int intValue = VA_ARG (list, int);
   285         int intValue = VA_ARG (list, int);
   343         text->setText (hbTrId("txt_phone_other_call_ln").arg (intValue));
   286         text->setText(hbTrId("txt_phone_other_call_ln", intValue));
   344         translatedActions [PhoneAction::Text] = text;
   287         translatedActions [PhoneAction::Text] = text;
   345         VA_END (list);
   288         VA_END (list);
   346         }
   289         }
   347         break;
   290         break;
   348         
   291         
   390         
   333         
   391     case R_PHONEUI_EMERGENCY_CALL_BUTTONS:
   334     case R_PHONEUI_EMERGENCY_CALL_BUTTONS:
   392         {
   335         {
   393         PhoneAction *button = new PhoneAction;
   336         PhoneAction *button = new PhoneAction;
   394         button->setText (hbTrId("txt_phone_button_end_call"));
   337         button->setText (hbTrId("txt_phone_button_end_call"));
   395         button->setIcon (HbIcon(":/pri_large_button_endcall.svg"));
   338         button->setIcon (HbIcon("qtg_mono_end_call"));
   396         button->setCommand (EPhoneCmdEnd);
   339         button->setCommand (EPhoneCmdEnd);
   397         translatedActions [PhoneAction::LeftButton] = button;
   340         translatedActions [PhoneAction::LeftButton] = button;
   398         }
   341         }
   399         break;
   342         break;
   400         
   343         
   417         {
   360         {
   418         PhoneAction *text = new PhoneAction;
   361         PhoneAction *text = new PhoneAction;
   419         VA_LIST list;
   362         VA_LIST list;
   420         VA_START (list, symbianResourceId);
   363         VA_START (list, symbianResourceId);
   421         const TDesC *string = (TDesC*)VA_ARG(list, TDesC*);
   364         const TDesC *string = (TDesC*)VA_ARG(list, TDesC*);
   422         text->setText (hbTrId("Sending:\n%1").arg(QString::fromUtf16(string->Ptr(), 
   365         text->setText (hbTrId("txt_phone_info_sending").arg(QString::fromUtf16(string->Ptr(), 
   423                 string->Length())));
   366                 string->Length())));
   424         translatedActions [PhoneAction::Text] = text;
   367         translatedActions [PhoneAction::Text] = text;
   425         VA_END (list);
   368         VA_END (list);
   426         }
   369         }
   427         break;
   370         break;
   429         {
   372         {
   430         PhoneAction *text = new PhoneAction;
   373         PhoneAction *text = new PhoneAction;
   431         VA_LIST list;
   374         VA_LIST list;
   432         VA_START (list, symbianResourceId);
   375         VA_START (list, symbianResourceId);
   433         const TDesC *string = (TDesC*)VA_ARG(list, TDesC*);
   376         const TDesC *string = (TDesC*)VA_ARG(list, TDesC*);
   434         text->setText (hbTrId("Send string:\n%1").arg(QString::fromUtf16(string->Ptr(), 
   377         text->setText (hbTrId("txt_phone_info_send_string").arg(QString::fromUtf16(string->Ptr(), 
   435                 string->Length())));
   378                 string->Length())));
   436         translatedActions [PhoneAction::Text] = text;
   379         translatedActions [PhoneAction::Text] = text;
   437         VA_END (list);
   380         VA_END (list);
   438         }
   381         }
   439         break;
   382         break;
   462             }
   405             }
   463             break;
   406             break;
   464             
   407             
   465         case R_NOTETEXT_INVALID_PHONENUMBER:
   408         case R_NOTETEXT_INVALID_PHONENUMBER:
   466             {
   409             {
   467             ret = hbTrId("Invalid phone number"); 
   410             ret = hbTrId("txt_phone_info_invalid_phone_number"); 
   468             }
   411             }
   469             break;
   412             break;
   470             
   413             
   471         case R_NOTETEXT_NO_ANSWER:
   414         case R_NOTETEXT_NO_ANSWER:
   472             {
   415             {
   473             ret = hbTrId("No answer"); 
   416             ret = hbTrId("txt_phone_info_no_answer"); 
   474             }
   417             }
   475             break;
   418             break;
   476         
   419         
   477         case R_PHONE_ERROR_NUMBER_BUSY:
   420         case R_PHONE_ERROR_NUMBER_BUSY:
   478             {
   421             {
   479             ret = hbTrId("Number busy"); 
   422             ret = hbTrId("txt_phone_info_number_busy"); 
   480             }
   423             }
   481             break;
   424             break;
   482             
   425             
   483         case R_PHONE_SS_NOTIFICATION_MOCAL_WAITING_TEXT:
   426         case R_PHONE_SS_NOTIFICATION_MOCAL_WAITING_TEXT:
   484             {
   427             {
   498             }
   441             }
   499             break;
   442             break;
   500             
   443             
   501         case R_INCAL_REMOTE_ACTIVE_TEXT:
   444         case R_INCAL_REMOTE_ACTIVE_TEXT:
   502             {
   445             {
   503             ret = hbTrId("Connected");
   446             ret = hbTrId("txt_phone_info_connected");
   504             }
   447             }
   505             break;
   448             break;
   506             
   449             
   507         case R_INCAL_INFO_CONF_HOLD_TEXT:
   450         case R_INCAL_INFO_CONF_HOLD_TEXT:
   508             {
   451             {
   509             ret = hbTrId("Conference on hold");
   452             ret = hbTrId("Conference on hold");
   510             }
   453             }
   511             break;
   454             break;
   512         case R_PHONE_INCALL_INFO_NO_NETWORK_SUPPORT:
   455         case R_PHONE_INCALL_INFO_NO_NETWORK_SUPPORT:
   513             {
   456             {
   514             ret = hbTrId("No network support for video call");
   457             ret = hbTrId("txt_phone_info_no_network_support_for_video_call");
   515             }
   458             }
   516             break;
   459             break;
   517         default:
   460         default:
   518             break;
   461             break;
   519     }
   462     }
   528     
   471     
   529     switch (symbianResourceId) {
   472     switch (symbianResourceId) {
   530 
   473 
   531         case R_PHONE_TEXT_COLP_CONNECTED:
   474         case R_PHONE_TEXT_COLP_CONNECTED:
   532             {
   475             {
   533             ret = hbTrId("Connected to %1").arg(text);
   476             ret = hbTrId("txt_phone_info_connected_to_1").arg(text);
   534             }
   477             }
   535             break;
   478             break;
   536         default:
   479         default:
   537             break;
   480             break;
   538     }
   481     }