fotaapplication/fotaserver/src/fotafullscreendialog.cpp
changeset 73 ae69c2e8bc34
parent 55 1c556dee8eb1
child 77 9f85c58c0592
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
     9  * Initial Contributors:
     9  * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11  *
    11  *
    12  * Contributors:
    12  * Contributors:
    13  *
    13  *
    14  * Description: 
    14  * Description: FotaFullscreenDialog, which is responsible for showing the fullscreen dialog of FOTA from the docml.
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #include "fotafullscreendialog.h"
    18 #include "fotafullscreendialog.h"
    19 
    19 
    20 #include <hbaction.h>
    20 #include <HbAction.h>
    21 #include <hbprogressbar.h>
    21 #include <hbprogressbar.h>
    22 #include <hbicon.h>
    22 #include <hbicon.h>
    23 #include <hbextendedlocale.h>
    23 #include <hbextendedlocale.h>
    24 #include <hbtranslator.h>
    24 #include <hbtranslator.h>
    25 #include <e32std.h>
    25 #include <e32std.h>
    26 #include <e32math.h>
    26 #include <e32math.h>
    27 
    27 
    28 
    28 
    29 // ---------------------------------------------------------------------------
    29 // ---------------------------------------------------------------------------
    30 // CFotaDownloadNotifHandler::FotaFullscreenDialog
    30 // HbFotaFullscreenDialog::HbFotaFullscreenDialog
    31 // Constructor of the full screen dialogs, it takes all the widgets from the docml
    31 // Constructor of the full screen dialogs, it takes all the widgets from the docml
    32 // initializes it and sets the progress bar to zero.
    32 // initializes it and sets the progress bar to zero.
    33 // ---------------------------------------------------------------------------
    33 // ---------------------------------------------------------------------------
    34 //
    34 //
    35 
    35 
    36 
    36 
    37 FotaFullscreenDialog::FotaFullscreenDialog(CFotaServer* aObserver)
    37 HbFotaFullscreenDialog::HbFotaFullscreenDialog(CFotaServer* aObserver)
    38     {
    38     {
    39     FLOG(_L("FotaFullscreenDialog::FotaFullscreenDialog >>"));
    39     FLOG(_L("HbFotaFullscreenDialog::HbFotaFullscreenDialog >>"));
    40     bool ok = false;
    40     bool ok = false;
    41     iServer = aObserver;
    41     m_Server = aObserver;
    42     iloader.load(":/xml/data/fullscreendialog.docml", &ok);
    42     m_loader.load(":/xml/data/fullscreendialog.docml", &ok);
    43     if (!ok)
    43     if (!ok)
    44         {
    44         {
    45         return;
    45         return;
    46         }
    46         }
    47     iClicked = EFalse;
    47     m_Clicked = EFalse;
    48     idialog = qobject_cast<HbDialog *> (iloader.findWidget("dialog"));
    48     m_dialog = qobject_cast<HbDialog *> (m_loader.findWidget("dialog"));
    49 
    49 
    50 	idialog->setTimeout(HbPopup::NoTimeout);
    50 		m_dialog->setTimeout(HbPopup::NoTimeout);
    51    
    51    
    52     iPrimaryAction = qobject_cast<HbPushButton *> (iloader.findWidget(
    52     m_PrimaryAction = qobject_cast<HbPushButton *> (m_loader.findWidget(
    53             "btnHide"));
    53             "btnHide"));
    54 			
    54 			
    55      iSecondaryAction = qobject_cast<HbPushButton *> (iloader.findWidget(
    55      m_SecondaryAction = qobject_cast<HbPushButton *> (m_loader.findWidget(
    56             "btnResumeLater"));
    56             "btnResumeLater"));
    57 			
    57 			
    58 			
    58 			
    59     
    59     
    60     iprogressBar = qobject_cast<HbProgressBar *> (iloader.findWidget(
    60     m_progressBar = qobject_cast<HbProgressBar *> (m_loader.findWidget(
    61             "horizontalProgressBar"));
    61             "horizontalProgressBar"));
    62     iprogressBar->setProgressValue(0);
    62     m_progressBar->setProgressValue(0);
    63 	
    63 	
    64 	    /*iInstallNote = qobject_cast<HbLabel *> (iloader.findWidget(
    64 	  m_InstallNote = qobject_cast<HbLabel *> (m_loader.findWidget(
    65             "lblinstallnote"));*/
    65             "lblinstallnote"));
    66     iDownloadState = qobject_cast<HbLabel *> (iloader.findWidget(
    66     m_InstallNote->setPlainText(hbTrId(
       
    67             "txt_device_update_info_installation_will_proceed_n"));
       
    68             
       
    69     m_DownloadState = qobject_cast<HbLabel *> (m_loader.findWidget(
    67             "lblDownloadState"));
    70             "lblDownloadState"));
    68     //iEmergencyIcon = qobject_cast<HbLabel *> (iloader.findWidget(
    71     m_DownloadState->setPlainText(hbTrId("txt_device_update_info_downloading"));
    69     //        "icnEmergency"));
    72             
    70     iChargerIcon = qobject_cast<HbLabel *> (iloader.findWidget("icnCharger"));
    73     m_EmergencyIcon = qobject_cast<HbLabel *> (m_loader.findWidget(
       
    74             "icnEmergency"));
       
    75     HbIcon iconEmergency;
       
    76     iconEmergency.setIconName(":/icons/qgn_prop_sml_http.svg");
       
    77     m_EmergencyIcon->setIcon(iconEmergency);
       
    78     
       
    79     m_ChargerIcon = qobject_cast<HbLabel *> (m_loader.findWidget("icnCharger"));
    71     HbIcon iconCharger;
    80     HbIcon iconCharger;
    72     //iconCharger.setIconName(:/icons/qgn_prop_sml_http.svg);
    81     iconCharger.setIconName(":/icons/qgn_prop_sml_http.svg");
    73     //iChargerIcon->setIcon(iconCharger);
    82     m_ChargerIcon->setIcon(iconCharger);
    74     HbIcon iconEmergency;
    83     
    75     //iconEmergency.setIconName(:/icons/qgn_prop_sml_http.svg);
    84     m_RestartIcon = qobject_cast<HbLabel *> (m_loader.findWidget("icnInstall"));
    76     //iEmergencyIcon->setIcon(iconEmergency);
    85     HbIcon iconRestart;
    77     //iEmergencyNote = qobject_cast<HbLabel *> (iloader.findWidget(
    86     iconRestart.setIconName(":/icons/qgn_prop_sml_http.svg");
    78     //        "lblEmergency"));
    87     m_RestartIcon->setIcon(iconRestart);
    79     //iRestartIcon = qobject_cast<HbLabel *> (iloader.findWidget("icnInstall"));
    88     
    80     //HbIcon iconRestart;
    89     m_PrimaryAction->setText(hbTrId("txt_common_button_hide"));
    81     //iconRestart.setIconName(:/icons/qgn_prop_sml_http.svg);
    90     m_SecondaryAction->setText(hbTrId("txt_device_update_button_resume_later"));
    82     //iRestartIcon->setIcon(iconRestart);
    91     m_Title = qobject_cast<HbLabel *> (m_loader.findWidget("lblTitle"));
    83     //iRestartNote = qobject_cast<HbLabel *> (iloader.findWidget(
    92     m_Title->setPlainText(hbTrId("txt_device_update_title_updating_phone"));
    84     //        "lblRestartNote"));
    93     
    85     //installEventFilter(this);
    94     
    86     iPrimaryAction->setText(hbTrId("txt_common_button_hide"));
    95     m_ChargerNote = qobject_cast<HbLabel *> (m_loader.findWidget("lblcharger"));
    87     iSecondaryAction->setText(hbTrId("txt_device_update_button_resume_later"));
    96     m_ChargerNote->setPlainText(hbTrId(
    88     iTitle = qobject_cast<HbLabel *> (iloader.findWidget("lblTitle"));
       
    89     iTitle->setPlainText(hbTrId("txt_device_update_title_updating_phone"));
       
    90     iDownloadState->setPlainText(hbTrId("txt_device_update_info_downloading"));
       
    91     //iInstallNote->setPlainText(hbTrId(
       
    92     //        "txt_device_update_info_installation_will_proceed_n"));
       
    93     iChargerNote = qobject_cast<HbLabel *> (iloader.findWidget("lblcharger"));
       
    94     iChargerNote->setPlainText(hbTrId(
       
    95             "txt_device_update_info_FS_its_recommended_to_connec"));
    97             "txt_device_update_info_FS_its_recommended_to_connec"));
    96     //iRestartNote->setPlainText(hbTrId(
    98             
    97     //        "txt_device_update_info_FS_after_the_installation_the"));
    99     m_RestartNote = qobject_cast<HbLabel *> (m_loader.findWidget(
    98     //iEmergencyNote->setPlainText(hbTrId(
   100             "lblRestartNote"));
    99     //        "txt_device_update_info_FS_during_the_installation_the"));
   101     m_RestartNote->setPlainText(hbTrId(
   100 
   102             "txt_device_update_info_FS_after_the_installation_the"));
   101     QObject::connect(iPrimaryAction, SIGNAL(clicked()), this,
   103             
   102             SLOT(LSKSelected()));
   104     m_EmergencyNote = qobject_cast<HbLabel *> (m_loader.findWidget(
   103     QObject::connect(iSecondaryAction, SIGNAL(clicked()), this,
   105             "lblEmergency"));
   104             SLOT(RSKSelected()));
   106     m_EmergencyNote->setPlainText(hbTrId(
   105     QObject::connect(idialog, SIGNAL(aboutToClose()), this,
   107             "txt_device_update_info_FS_during_the_installation_the"));
       
   108 
       
   109     QObject::connect(m_PrimaryAction, SIGNAL(clicked()), this,
       
   110             SLOT(lSKSelected()));
       
   111     QObject::connect(m_SecondaryAction, SIGNAL(clicked()), this,
       
   112             SLOT(rSKSelected()));
       
   113     QObject::connect(m_dialog, SIGNAL(aboutToClose()), this,
   106             SLOT(aboutToClose()));
   114             SLOT(aboutToClose()));
   107 
   115 
   108     RefreshDialog();
   116     refreshDialog();
   109     FLOG(_L("FotaFullscreenDialog::FotaFullscreenDialog <<"));
   117     FLOG(_L("HbFotaFullscreenDialog::HbFotaFullscreenDialog <<"));
   110     }
   118     }
   111 
   119 
   112 
   120 
   113 
   121 
   114 // ---------------------------------------------------------------------------
   122 // ---------------------------------------------------------------------------
   115 // CFotaDownloadNotifHandler::refreshDialog
   123 // HbFotaFullscreenDialog::refreshDialog
   116 // This function is used to refresh the contents of the full screen dialog
   124 // This function is used to refresh the contents of the full screen dialog
   117 // once it is changed.
   125 // once it is changed.
   118 // ---------------------------------------------------------------------------
   126 // ---------------------------------------------------------------------------
   119 //
   127 //
   120 
   128 
   121 
   129 
   122 void FotaFullscreenDialog::RefreshDialog()
   130 void HbFotaFullscreenDialog::refreshDialog()
   123     {
   131     {
   124     FLOG(_L("FotaFullscreenDialog::RefreshDialog >>"));
   132     FLOG(_L("HbFotaFullscreenDialog::RefreshDialog >>"));
   125     if (idialog)
   133     if (m_dialog)
   126         {
   134         {
   127         FLOG(_L("FotaFullscreenDialog::idialog >>"));
   135         FLOG(_L("HbFotaFullscreenDialog::idialog >>"));
   128         iClicked = EFalse;
   136         m_Clicked = EFalse;
   129         idialog->show();
   137         m_dialog->show();
   130         }
   138         }
   131     FLOG(_L("FotaFullscreenDialog::RefreshDialog <<"));
   139     FLOG(_L("HbFotaFullscreenDialog::RefreshDialog <<"));
   132     }
   140     }
   133 
   141 
   134 // ---------------------------------------------------------------------------
   142 // ---------------------------------------------------------------------------
   135 // CFotaDownloadNotifHandler::setsoftwaredetails
   143 // HbFotaFullscreenDialog::setSoftwareDetails
   136 // This function is called to set the details of the software,which is downloaded.
   144 // This function is called to set the details of the software,which is downloaded.
   137 // ---------------------------------------------------------------------------
   145 // ---------------------------------------------------------------------------
   138 //
   146 //
   139 
   147 
   140 void FotaFullscreenDialog::SetSoftwareDetails(int size,
   148 void HbFotaFullscreenDialog::setSoftwareDetails(int size,
   141         const QString version, const QString aName)
   149         const QString version, const QString aName)
   142     {
   150     {
   143     //set Sw Details
   151     //set Sw Details
   144     FLOG(_L("FotaFullscreenDialog::RefreshDialog >>"));
   152     FLOG(_L("HbFotaFullscreenDialog::RefreshDialog >>"));
   145     iSwDetails = qobject_cast<HbLabel *> (iloader.findWidget("lblSwVersion"));
   153     m_SwDetails = qobject_cast<HbLabel *> (m_loader.findWidget("lblSwVersion"));
   146     QString content;
   154     QString content;
   147     
   155     
   148     TReal sizeKB = size / 1024;
   156     TReal sizeKB = size / 1024;
   149     TReal sizeRounded = 0;
   157     TReal sizeRounded = 0;
   150     QString pkgsize;
   158     QString pkgsize;
   159         {
   167         {
   160         Math::Round(sizeRounded,sizeKB,2);
   168         Math::Round(sizeRounded,sizeKB,2);
   161         content = hbTrId("txt_device_update_info_new_device_software_availab_Kb") .arg(aName) .arg(version).arg(sizeRounded);
   169         content = hbTrId("txt_device_update_info_new_device_software_availab_Kb") .arg(aName) .arg(version).arg(sizeRounded);
   162         }
   170         }
   163 
   171 
   164     iSwDetails->setPlainText(content);
   172     m_SwDetails->setPlainText(content);
   165     FLOG(_L("FotaFullscreenDialog::RefreshDialog <<"));
   173     FLOG(_L("HbFotaFullscreenDialog::RefreshDialog <<"));
   166     }
   174     }
   167 
   175 
   168 // ---------------------------------------------------------------------------
   176 // ---------------------------------------------------------------------------
   169 // CFotaDownloadNotifHandler::close
   177 // HbFotaFullscreenDialog::close
   170 // This slot is called to manually close the dialog.
   178 // This slot is called to manually close the dialog.
   171 // ---------------------------------------------------------------------------
   179 // ---------------------------------------------------------------------------
   172 //
   180 //
   173 
   181 
   174 void FotaFullscreenDialog::Close()
   182 void HbFotaFullscreenDialog::close()
   175     {
   183     {
   176     FLOG(_L("FotaFullscreenDialog::Close <<"));
   184     FLOG(_L("HbFotaFullscreenDialog::Close <<"));
   177     iClicked = ETrue;
   185     m_Clicked = ETrue;
   178     if (idialog)
   186     if (m_dialog)
   179         idialog->close();
   187         m_dialog->close();
   180     FLOG(_L("FotaFullscreenDialog::Close >>"));
   188     FLOG(_L("HbFotaFullscreenDialog::Close >>"));
   181     }
   189     }
   182 
   190 
   183 // ---------------------------------------------------------------------------
   191 // ---------------------------------------------------------------------------
   184 // CFotaDownloadNotifHandler::setwarningdetails
   192 // HbFotaFullscreenDialog::setWarningDetails
   185 // This function is to set the warnings details of the full screen dialog
   193 // This function is to set the warnings details of the full screen dialog
   186 // according to the state of the firmware update.
   194 // according to the state of the firmware update.
   187 // ---------------------------------------------------------------------------
   195 // ---------------------------------------------------------------------------
   188 //
   196 //
   189 
   197 
   190 void FotaFullscreenDialog::SetWarningDetails(TFotaWarningType aType)
   198 void HbFotaFullscreenDialog::setWarningDetails(TFotaWarningType aType)
   191     {
   199     {
   192     FLOG(_L("FotaFullscreenDialog::SetWarningDetails <<"));
   200     FLOG(_L("HbFotaFullscreenDialog::SetWarningDetails <<"));
   193     //set heading content
   201     //set heading content
   194     if (aType == EHbFotaDownload)
   202     if (aType == EHbFotaDownload)
   195         {
   203         {
   196         FLOG(_L("FotaFullscreenDialog::EHbFotaDownload"));
   204         FLOG(_L("HbFotaFullscreenDialog::EHbFotaDownload"));
   197         idialog->setTimeout(HbPopup::NoTimeout);
   205         m_dialog->setTimeout(HbPopup::NoTimeout);
   198         iInstallNote = qobject_cast<HbLabel *> (iloader.findWidget(
   206         m_InstallNote->setVisible(false);
   199                     "lblinstallnote"));
   207         m_RestartNote->setVisible(false);
   200         iInstallNote->setPlainText(hbTrId(
   208         m_RestartIcon->setVisible(false);
   201                     "txt_device_update_info_installation_will_proceed_n"));
   209         m_EmergencyNote->setVisible(false);
   202         //User::After(1000);
   210         m_EmergencyIcon->setVisible(false);
   203         iInstallNote->setVisible(false);
   211         }
   204         
   212     else if (aType == EHbFotaUpdate)
   205         iRestartNote = qobject_cast<HbLabel *> (iloader.findWidget(
   213         {
   206                     "lblRestartNote"));
   214         FLOG(_L("HbFotaFullscreenDialog::EHbFotaUpdate"));
   207         iRestartNote->setPlainText(hbTrId(
   215         m_dialog->setTimeout(HbPopup::ContextMenuTimeout);
   208                     "txt_device_update_info_FS_after_the_installation_the"));
   216         HbIcon iconCharger;
   209         //User::After(1000);
   217         iconCharger.setIconName(":/icons/qtg_small_charger.svg");
   210         iRestartNote->setVisible(false);
   218         m_ChargerIcon->setIcon(iconCharger);
   211         
       
   212         iRestartIcon = qobject_cast<HbLabel *> (iloader.findWidget("icnInstall"));
       
   213         HbIcon iconRestart;
   219         HbIcon iconRestart;
   214         //iconRestart.setIconName(:/icons/qgn_prop_sml_http.svg);
   220         iconRestart.setIconName(":/icons/qtg_small_reboot.svg");
   215         //iRestartIcon->setIcon(iconRestart);
   221         m_RestartIcon->setIcon(iconRestart);
   216         //User::After(1000);
   222         m_InstallNote->setPlainText(hbTrId(
   217         iRestartIcon->setVisible(false);
   223                 "txt_device_update_info_installation_will_proceed_n"));
   218         
   224         m_ChargerNote->setPlainText(hbTrId(
   219         iEmergencyNote = qobject_cast<HbLabel *> (iloader.findWidget(
   225                 "txt_device_update_info_FS_its_recommended_to_connec"));
   220                     "lblEmergency"));
   226         m_RestartNote->setPlainText(hbTrId(
   221         iEmergencyNote->setPlainText(hbTrId(
   227                 "txt_device_update_info_FS_after_the_installation_the"));
   222                    "txt_device_update_info_FS_during_the_installation_the"));
   228         m_InstallNote->setVisible(true);
   223         //User::After(1000);
   229         m_RestartNote->setVisible(true);
   224         iEmergencyNote->setVisible(false);
   230         m_RestartIcon->setVisible(true);
   225         
   231         m_EmergencyNote->setVisible(true);
   226         iEmergencyIcon = qobject_cast<HbLabel *> (iloader.findWidget(
   232         m_EmergencyIcon->setVisible(true);
   227                     "icnEmergency"));
   233         m_DownloadState->setPlainText(hbTrId(
   228         HbIcon iconEmergency;
   234                 "txt_device_update_info_download_complete"));
   229         //iconEmergency.setIconName(:/icons/qgn_prop_sml_http.svg);
   235         m_DownloadState->setVisible(true);
   230         //iEmergencyIcon->setIcon(iconEmergency);
   236         m_PrimaryAction->setEnabled(ETrue);
   231         //User::After(1000);
   237         }
   232         iEmergencyIcon->setVisible(false);
   238     else if (aType == EHbFotaLowBattery)
   233 
   239         {
   234         }
   240         FLOG(_L("HbFotaFullscreenDialog::EHbFotaLowBattery"));
   235     else if (aType == EHbFotaUpdate)
   241         m_dialog->setTimeout(HbPopup::NoTimeout);
   236         {
       
   237         FLOG(_L("FotaFullscreenDialog::EHbFotaUpdate"));
       
   238         idialog->setTimeout(HbPopup::ContextMenuTimeout);
       
   239         HbIcon iconCharger;
   242         HbIcon iconCharger;
   240         //iconCharger.setIconName(:/icons/qgn_prop_sml_http.svg);
   243         iconCharger.setIconName(":/icons/qtg_small_reboot.svg");
   241         //iChargerIcon->setIcon(iconCharger);
   244         m_ChargerIcon->setIcon(iconCharger);
   242         HbIcon iconRestart;
   245         HbIcon iconRestart;
   243         //iconRestart.setIconName(:/icons/qgn_prop_sml_http.svg);
   246         iconRestart.setIconName(":/icons/qtg_small_phone_disabled.svg");
   244         //iRestartIcon->setIcon(iconRestart);
   247         m_RestartIcon->setIcon(iconRestart);
   245         iInstallNote->setPlainText(hbTrId(
   248         m_InstallNote->setPlainText(hbTrId(
   246                 "txt_device_update_info_installation_will_proceed_n"));
   249                 "txt_device_update_info_to_proceed_with_installatio"));
   247         iChargerNote->setPlainText(hbTrId(
   250         m_ChargerNote->setPlainText(hbTrId(
   248                 "txt_device_update_info_FS_its_recommended_to_connec"));
       
   249         iRestartNote->setPlainText(hbTrId(
       
   250                 "txt_device_update_info_FS_after_the_installation_the"));
   251                 "txt_device_update_info_FS_after_the_installation_the"));
   251         iInstallNote->setVisible(true);
   252         m_RestartNote->setPlainText(hbTrId(
   252         iRestartNote->setVisible(true);
   253                 "txt_device_update_info_FS_during_the_installation_the"));
   253         iRestartIcon->setVisible(true);
   254         m_InstallNote->setVisible(true);
   254         iEmergencyNote->setVisible(true);
   255         m_RestartNote->setVisible(true);
   255         iEmergencyIcon->setVisible(true);
   256         m_RestartIcon->setVisible(true);
   256         iDownloadState->setPlainText(hbTrId(
   257         m_EmergencyNote->setVisible(false);
       
   258         m_EmergencyIcon->setVisible(false);
       
   259         m_DownloadState->setPlainText(hbTrId(
   257                 "txt_device_update_info_download_complete"));
   260                 "txt_device_update_info_download_complete"));
   258         iDownloadState->setVisible(true);
   261         m_DownloadState->setVisible(true);
   259         iPrimaryAction->setEnabled(ETrue);
   262         m_PrimaryAction->setText(hbTrId("txt_device_update_button_continue"));
   260         }
   263         m_SecondaryAction->setText(hbTrId(
   261     else if (aType == EHbFotaLowBattery)
       
   262         {
       
   263         FLOG(_L("FotaFullscreenDialog::EHbFotaLowBattery"));
       
   264         idialog->setTimeout(HbPopup::NoTimeout);
       
   265         HbIcon iconCharger;
       
   266         //iconCharger.setIconName(:/icons/qgn_prop_sml_http.svg);
       
   267         //iChargerIcon->setIcon(iconCharger);
       
   268         HbIcon iconRestart;
       
   269         //iconRestart.setIconName(:/icons/qgn_prop_sml_http.svg);
       
   270         //iRestartIcon->setIcon(iconRestart);
       
   271         iInstallNote->setPlainText(hbTrId(
       
   272                 "txt_device_update_info_to_proceed_with_installatio"));
       
   273         iChargerNote->setPlainText(hbTrId(
       
   274                 "txt_device_update_info_FS_after_the_installation_the"));
       
   275         iRestartNote->setPlainText(hbTrId(
       
   276                 "txt_device_update_info_FS_during_the_installation_the"));
       
   277         //iEmergencyNote->setPlainText(hbTrId("txt_device_update_info_FS_during_the_installation_the"));
       
   278         iInstallNote->setVisible(true);
       
   279         iRestartNote->setVisible(true);
       
   280         iRestartIcon->setVisible(true);
       
   281         iEmergencyNote->setVisible(false);
       
   282         iEmergencyIcon->setVisible(false);
       
   283         iDownloadState->setPlainText(hbTrId(
       
   284                 "txt_device_update_info_download_complete"));
       
   285         iDownloadState->setVisible(true);
       
   286         iPrimaryAction->setText(hbTrId("txt_device_update_button_continue"));
       
   287         iSecondaryAction->setText(hbTrId(
       
   288                 "txt_device_update_button_install_later"));
   264                 "txt_device_update_button_install_later"));
   289         iPrimaryAction->setEnabled(EFalse);
   265         m_PrimaryAction->setEnabled(EFalse);
   290         }
   266         }
   291     RefreshDialog();
   267     refreshDialog();
   292     FLOG(_L("FotaFullscreenDialog::SetWarningDetails >>"));
   268     FLOG(_L("HbFotaFullscreenDialog::SetWarningDetails >>"));
   293     }
   269     }
   294 
   270 
   295 // ---------------------------------------------------------------------------
   271 // ---------------------------------------------------------------------------
   296 // CFotaDownloadNotifHandler::updateprogressbar
   272 // HbFotaFullscreenDialog::updateprogressbar
   297 // This function is called to update the progress bar with the download progress details/.
   273 // This function is called to update the progress bar with the download progress details/.
   298 // ---------------------------------------------------------------------------
   274 // ---------------------------------------------------------------------------
   299 //
   275 //
   300 
   276 
   301 void FotaFullscreenDialog::UpdateProgressBar(TInt aProgress)
   277 void HbFotaFullscreenDialog::updateProgressBar(TInt aProgress)
   302     {
   278     {
   303     FLOG(_L("FotaFullscreenDialog::UpdateProgressBar <<"));
   279     FLOG(_L("HbFotaFullscreenDialog::UpdateProgressBar <<"));
   304     iprogressBar->setProgressValue(aProgress);
   280     m_progressBar->setProgressValue(aProgress);
   305     FLOG(_L("FotaFullscreenDialog::UpdateProgressBar >>"));
   281     FLOG(_L("HbFotaFullscreenDialog::UpdateProgressBar >>"));
   306     }
   282     }
   307 
   283 
   308 // ---------------------------------------------------------------------------
   284 // ---------------------------------------------------------------------------
   309 // CFotaDownloadNotifHandler::DisableRSK
   285 // HbFotaFullscreenDialog::disableRSK
   310 // This function is called disable the RSK of the dialog when the postpone limeit expires
   286 // This function is called disable the RSK of the dialog when the postpone limeit expires
   311 // ---------------------------------------------------------------------------
   287 // ---------------------------------------------------------------------------
   312 //
   288 //
   313 
   289 
   314 void FotaFullscreenDialog::DisableRSK(TBool aVal)
   290 void HbFotaFullscreenDialog::disableRSK(TBool aVal)
   315     {
   291     {
   316     FLOG(_L("FotaFullscreenDialog::DisableRSK <<"));
   292     FLOG(_L("HbFotaFullscreenDialog::DisableRSK <<"));
   317     iSecondaryAction->setEnabled(!aVal);
   293     m_SecondaryAction->setEnabled(!aVal);
   318     FLOG(_L("FotaFullscreenDialog::DisableRSK >>"));
   294     FLOG(_L("HbFotaFullscreenDialog::DisableRSK >>"));
   319     }
   295     }
   320 
   296 
   321 bool FotaFullscreenDialog::IsLSKEnabled()
   297 // ---------------------------------------------------------------------------
   322     {
   298 // HbFotaFullscreenDialog::isLSKEnabled
   323     FLOG(_L("FotaFullscreenDialog::IsLSKEnabled <<"));
   299 // This function is called to check if left softkey of the fullscreen dialog is disabled or not.
   324     return (iPrimaryAction->isEnabled());
   300 // ---------------------------------------------------------------------------
   325     }
   301 //
   326 
   302 
   327 // ---------------------------------------------------------------------------
   303 bool HbFotaFullscreenDialog::isLSKEnabled()
   328 // CFotaDownloadNotifHandler::cancelSelected
   304     {
       
   305     FLOG(_L("HbFotaFullscreenDialog::IsLSKEnabled <<"));
       
   306     return (m_PrimaryAction->isEnabled());
       
   307     }
       
   308 
       
   309 // ---------------------------------------------------------------------------
       
   310 // HbFotaFullscreenDialog::cancelSelected
   329 // This slot is called when user presses the left softkey of fullscreen dialog.
   311 // This slot is called when user presses the left softkey of fullscreen dialog.
   330 // ---------------------------------------------------------------------------
   312 // ---------------------------------------------------------------------------
   331 //
   313 //
   332 
   314 
   333 void FotaFullscreenDialog::LSKSelected()
   315 void HbFotaFullscreenDialog::lSKSelected()
   334     {
   316     {
   335     FLOG(_L("FotaFullscreenDialog::LSKSelected <<"));
   317     FLOG(_L("FotaFullscreenDialog::LSKSelected <<"));
   336     iClicked = ETrue;
   318     m_Clicked = ETrue;
   337     idialog->hide();
   319     m_dialog->hide();
   338     iServer->HandleFullScreenDialogResponse(EHbLSK);
   320     m_Server->HandleFullScreenDialogResponse(EHbLSK);
   339     FLOG(_L("FotaFullscreenDialog::LSKSelected >>"));
   321     FLOG(_L("HbFotaFullscreenDialog::LSKSelected >>"));
   340     }
   322     }
   341 	
   323 	
   342 	
   324 	
   343 	// ---------------------------------------------------------------------------
   325 	// ---------------------------------------------------------------------------
   344 // CFotaDownloadNotifHandler::cancelSelected
   326 // HbFotaFullscreenDialog::cancelSelected
   345 // This slot is called when user presses the right softkey of fullscreen dialog.
   327 // This slot is called when user presses the right softkey of fullscreen dialog.
   346 // ---------------------------------------------------------------------------
   328 // ---------------------------------------------------------------------------
   347 //
   329 //
   348 
   330 
   349 void FotaFullscreenDialog::RSKSelected()
   331 void HbFotaFullscreenDialog::rSKSelected()
   350     {
   332     {
   351     FLOG(_L("FotaFullscreenDialog::RSKSelected >>"));
   333     FLOG(_L("HbFotaFullscreenDialog::RSKSelected >>"));
   352     iClicked = ETrue;
   334     m_Clicked = ETrue;
   353     idialog->hide();
   335     m_dialog->hide();
   354     iServer->HandleFullScreenDialogResponse(EHbRSK);
   336     m_Server->HandleFullScreenDialogResponse(EHbRSK);
   355     FLOG(_L("FotaFullscreenDialog::RSKSelected <<"));
   337     FLOG(_L("HbFotaFullscreenDialog::RSKSelected <<"));
   356     }
   338     }
   357 
   339 
   358 // ---------------------------------------------------------------------------
   340 // ---------------------------------------------------------------------------
   359 // CFotaDownloadNotifHandler::~FotaFullscreenDialog
   341 // HbFotaFullscreenDialog::~HbFotaFullscreenDialog
   360 // Destructor which destroys all the widgets
   342 // Destructor which destroys all the widgets
   361 // ---------------------------------------------------------------------------
   343 // ---------------------------------------------------------------------------
   362 //
   344 //
   363 
   345 
   364 FotaFullscreenDialog::~FotaFullscreenDialog()
   346 HbFotaFullscreenDialog::~HbFotaFullscreenDialog()
   365     {
   347     {
   366     FLOG(_L("~ FotaFullscreenDialog <<"));
   348     FLOG(_L("~ HbFotaFullscreenDialog <<"));
   367 
   349 
   368     QObject::disconnect(iPrimaryAction, SIGNAL(clicked()), this,
   350     QObject::disconnect(m_PrimaryAction, SIGNAL(clicked()), this,
   369             SLOT(LSKSelected()));
   351             SLOT(LSKSelected()));
   370     QObject::disconnect(iSecondaryAction, SIGNAL(clicked()), this,
   352     QObject::disconnect(m_SecondaryAction, SIGNAL(clicked()), this,
   371             SLOT(RSKSelected()));
   353             SLOT(RSKSelected()));
   372     QObject::disconnect(idialog, SIGNAL(aboutToClose()), this,
   354     QObject::disconnect(m_dialog, SIGNAL(aboutToClose()), this,
   373             SLOT(aboutToClose()));
   355             SLOT(aboutToClose()));
   374 
   356 
   375     if (iprogressBar)
   357     if (m_progressBar)
   376         iprogressBar->deleteLater();
   358         m_progressBar->deleteLater();
   377 
   359 
   378     if (iPrimaryAction)
   360     if (m_PrimaryAction)
   379         delete iPrimaryAction;
   361         delete m_PrimaryAction;
   380 
   362 
   381     if (iSecondaryAction)
   363     if (m_SecondaryAction)
   382         delete iSecondaryAction;
   364         delete m_SecondaryAction;
   383 
   365 
   384     if (iTitle)
   366     if (m_Title)
   385         delete iTitle;
   367         delete m_Title;
   386 
   368 
   387     if (iSwDetails)
   369     if (m_SwDetails)
   388         delete iSwDetails;
   370         delete m_SwDetails;
   389 
   371 
   390     if (iInstallNote)
   372     if (m_InstallNote)
   391         delete iInstallNote;
   373         delete m_InstallNote;
   392 
   374 
   393     if (iRestartNote)
   375     if (m_RestartNote)
   394         delete iRestartNote;
   376         delete m_RestartNote;
   395 
   377 
   396     if (iRestartIcon)
   378     if (m_RestartIcon)
   397         delete iRestartIcon;
   379         delete m_RestartIcon;
   398 
   380 
   399     if (iEmergencyNote)
   381     if (m_EmergencyNote)
   400         delete iEmergencyNote;
   382         delete m_EmergencyNote;
   401 
   383 
   402     if (iEmergencyIcon)
   384     if (m_EmergencyIcon)
   403         delete iEmergencyIcon;
   385         delete m_EmergencyIcon;
   404 
   386 
   405     if (iDownloadState)
   387     if (m_DownloadState)
   406         delete iDownloadState;
   388         delete m_DownloadState;
   407 
   389 
   408     if (idialog)
   390     if (m_dialog)
   409         delete idialog;
   391         delete m_dialog;
   410 
   392 
   411     FLOG(_L("~ FotaFullscreenDialog >>"));
   393     FLOG(_L("~ HbFotaFullscreenDialog >>"));
   412     }
   394     }
   413 
   395 
   414 // ---------------------------------------------------------------------------
   396 // ---------------------------------------------------------------------------
   415 // CFotaDownloadNotifHandler::showUpdateDialog
   397 // HbFotaFullscreenDialog::showUpdateDialog
   416 // This function is called when download is complete and update dialog has to be shown.
   398 // This function is called when download is complete and update dialog has to be shown.
   417 // ---------------------------------------------------------------------------
   399 // ---------------------------------------------------------------------------
   418 //
   400 //
   419 
   401 
   420 void FotaFullscreenDialog::ShowUpdateDialog()
   402 void HbFotaFullscreenDialog::showUpdateDialog()
   421     {
   403     {
   422     FLOG(_L("FotaFullscreenDialog::ShowUpdateDialog <<"));
   404     FLOG(_L("HbFotaFullscreenDialog::ShowUpdateDialog <<"));
   423     iPrimaryAction->setText(hbTrId("txt_common_button_continue_dialog"));
   405     m_PrimaryAction->setText(hbTrId("txt_common_button_continue_dialog"));
   424     iSecondaryAction->setText(
   406     m_SecondaryAction->setText(
   425             hbTrId("txt_device_update_button_install_later"));
   407             hbTrId("txt_device_update_button_install_later"));
   426     SetWarningDetails(EHbFotaUpdate);
   408     setWarningDetails(EHbFotaUpdate);
   427     FLOG(_L("FotaFullscreenDialog::ShowUpdateDialog >>"));
   409     FLOG(_L("HbFotaFullscreenDialog::ShowUpdateDialog >>"));
   428     }
   410     }
   429 
   411 
   430 
   412 
   431 void FotaFullscreenDialog::SetVisible(TBool aVisible)
   413 // ---------------------------------------------------------------------------
       
   414 // HbFotaFullscreenDialog::setVisible
       
   415 // This function is called to make the fullscreen dialog visible.
       
   416 // ---------------------------------------------------------------------------
       
   417 //
       
   418 
       
   419 void HbFotaFullscreenDialog::setVisible(TBool aVisible)
   432 {
   420 {
   433     FLOG(_L("RefreshDialog::SetVisible >>"));
   421     FLOG(_L("RefreshDialog::SetVisible >>"));
   434     RefreshDialog();
   422     refreshDialog();
   435     FLOG(_L("RefreshDialog::SetVisible <<"));
   423     FLOG(_L("RefreshDialog::SetVisible <<"));
   436 }
   424 }
   437 // ---------------------------------------------------------------------------
   425 // ---------------------------------------------------------------------------
   438 // CFotaDownloadNotifHandler::aboutToClose
   426 // HbFotaFullscreenDialog::aboutToClose
   439 // This slot is called when full screen dialogs is cloased during a timeout.
   427 // This slot is called when full screen dialogs is cloased during a timeout.
   440 // ---------------------------------------------------------------------------
   428 // ---------------------------------------------------------------------------
   441 //
   429 //
   442 
   430 
   443 void FotaFullscreenDialog::aboutToClose()
   431 void HbFotaFullscreenDialog::aboutToClose()
   444     {
   432     {
   445     FLOG(_L("FotaFullscreenDialog::aboutToClose <<"));
   433     FLOG(_L("HbFotaFullscreenDialog::aboutToClose <<"));
   446     if (!iClicked)
   434     if (!m_Clicked)
   447         {
   435         {
   448         FLOG(_L("Calling fotaserver as timedout..."));
   436         FLOG(_L("Calling fotaserver as timedout..."));
   449         iServer->HandleFullScreenDialogResponse(EHbLSK);
   437         m_Server->HandleFullScreenDialogResponse(EHbLSK);
   450         }
   438         }
   451     iClicked = EFalse;
   439     m_Clicked = EFalse;
   452     FLOG(_L("FotaFullscreenDialog::aboutToClose >>"));
   440     FLOG(_L("HbFotaFullscreenDialog::aboutToClose >>"));
   453     }
   441     }
   454 
   442 
   455 
   443