phonesettings/cpphonesettingsplugins/cpnetworkplugin/src/cpnetworkpluginform.cpp
changeset 77 2be0b271d017
parent 72 c76a0b1755b9
child 76 cfea66083b62
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
   291     if(m_cpSettingsWrapper->isPhoneOffline()) {
   291     if(m_cpSettingsWrapper->isPhoneOffline()) {
   292         // offline mode.
   292         // offline mode.
   293         m_psetNetworkWrapper->getNetworkAccessMode();
   293         m_psetNetworkWrapper->getNetworkAccessMode();
   294         emit showGlobalNote(
   294         emit showGlobalNote(
   295             m_activeNoteId, 
   295             m_activeNoteId, 
   296             emit hbTrId("Off-line, not allowed"), 
   296             emit hbTrId("txt_phone_info_offline_not_allowed"), 
   297             HbMessageBox::MessageTypeWarning);
   297             HbMessageBox::MessageTypeWarning);
   298     } else if(m_cpSettingsWrapper->isOngoingCall()) {
   298     } else if(m_cpSettingsWrapper->isOngoingCall()) {
   299         // ongoing call.
   299         // ongoing call.
   300         m_psetNetworkWrapper->getNetworkAccessMode();
   300         m_psetNetworkWrapper->getNetworkAccessMode();
   301         emit showGlobalNote(
   301         emit showGlobalNote(
   542     DPRINT << ": IN";
   542     DPRINT << ": IN";
   543     
   543     
   544     QString text;
   544     QString text;
   545     switch(error) {
   545     switch(error) {
   546         case PSetNetworkWrapper::ErrCauseCallActive:
   546         case PSetNetworkWrapper::ErrCauseCallActive:
   547             text = hbTrId("txt_cp_info_active_calls_must_be_disconnected_befo");
   547             text = hbTrId("txt_phone_info_active_calls_must_be_disconnected_befo");
   548             break;
   548             break;
   549         case PSetNetworkWrapper::ErrNoNetworkService:
   549         case PSetNetworkWrapper::ErrNoNetworkService:
   550             text = hbTrId("txt_cp_info_no_operators_found");
   550             text = hbTrId("txt_phone_info_no_operators_found");
   551             break;
   551             break;
   552         case PSetNetworkWrapper::ErrOfflineOpNotAllowed:
   552         case PSetNetworkWrapper::ErrOfflineOpNotAllowed:
   553             text = hbTrId("Off-line, not allowed");
   553             text = hbTrId("txt_phone_info_offline_not_allowed");
   554             break;
   554             break;
   555         case PSetNetworkWrapper::ErrNoNetworkAccess:
   555         case PSetNetworkWrapper::ErrNoNetworkAccess:
   556             text = hbTrId("txt_cp_info_no_access_to_selected_operators_netwo");
   556             text = hbTrId("txt_phone_info_no_access_to_operators_network");
   557             break;
   557             break;
   558         default:
   558         default:
   559             break;
   559             break;
   560     }
   560     }
   561     emit showGlobalNote(
   561     emit showGlobalNote(
   603     
   603     
   604     if (type != PSetNetworkWrapper::RequestNone) {
   604     if (type != PSetNetworkWrapper::RequestNone) {
   605         QObject::connect(
   605         QObject::connect(
   606             PsUiNotes::instance(), SIGNAL(progressNoteCanceled()),
   606             PsUiNotes::instance(), SIGNAL(progressNoteCanceled()),
   607             this, SLOT(userCancel()));
   607             this, SLOT(userCancel()));
   608         emit showGlobalProgressNote(m_activeProgressNoteId, hbTrId("txt_cp_info_updating"));
   608         emit showGlobalProgressNote(m_activeProgressNoteId, hbTrId("txt_phone_info_updating_operator_list"));
   609     } else {
   609     } else {
   610         QObject::disconnect(
   610         QObject::disconnect(
   611             PsUiNotes::instance(), SIGNAL(progressNoteCanceled()),
   611             PsUiNotes::instance(), SIGNAL(progressNoteCanceled()),
   612             this, SLOT(userCancel()));
   612             this, SLOT(userCancel()));
   613         emit cancelNote(m_activeProgressNoteId);
   613         emit cancelNote(m_activeProgressNoteId);
   652     DPRINT << ": IN";
   652     DPRINT << ": IN";
   653     
   653     
   654     QString text;
   654     QString text;
   655     switch (status){
   655     switch (status){
   656         case PSetNetworkWrapper::RegisteredOnHomeNetwork:
   656         case PSetNetworkWrapper::RegisteredOnHomeNetwork:
   657             text = hbTrId("Home network selected");
   657             text = hbTrId("txt_phone_dpopinfo_home_network_selected");
   658             break;
   658             break;
   659         case PSetNetworkWrapper::RegisteredRoaming: {
   659         case PSetNetworkWrapper::RegisteredRoaming:
   660             text = hbTrId("Selected network: ");
   660             text = hbTrId("txt_phone_dpopinfo_selected_network_l").arg(networkName(currentInfo));
   661             text.append(networkName(currentInfo));
   661             break;
   662         }
   662         default:
   663             break; 
   663             text = hbTrId("txt_phone_info_result_unknown");
       
   664             break;
   664     }
   665     }
   665 
   666 
   666     emit showNotificationDialog(text);
   667     emit showNotificationDialog(text);
   667 
   668 
   668     DPRINT << ": OUT";
   669     DPRINT << ": OUT";
   675 void CpNetworkPluginForm::showManualSelectiondialog()
   676 void CpNetworkPluginForm::showManualSelectiondialog()
   676 {
   677 {
   677     DPRINT << ": IN";
   678     DPRINT << ": IN";
   678     
   679     
   679     QScopedPointer<HbDialog> dialog(
   680     QScopedPointer<HbDialog> dialog(
   680         createDialog(hbTrId("txt_cp_title_select_operator")));
   681         createDialog(hbTrId("txt_phone_title_select_operator")));
   681     HbListWidget *list = new HbListWidget(dialog.data());
   682     HbListWidget *list = new HbListWidget(dialog.data());
   682     //then insert found networks
   683     //then insert found networks
   683     int itemsCount = m_networkInfoList->count();
   684     int itemsCount = m_networkInfoList->count();
   684     for (int i = 0; i < itemsCount; i++) {
   685     for (int i = 0; i < itemsCount; i++) {
   685         PSetNetworkWrapper::NetworkInfo *info = m_networkInfoList->at(i);
   686         PSetNetworkWrapper::NetworkInfo *info = m_networkInfoList->at(i);