bluetoothengine/btnotif/btdevicedialogplugin/src/btrecvprgrsdialogwidget.cpp
changeset 71 083fd884d7dd
parent 70 f5508c13dfe0
equal deleted inserted replaced
70:f5508c13dfe0 71:083fd884d7dd
   123         //Format the file size into a more readable format
   123         //Format the file size into a more readable format
   124         if ( mFileSz >> 20 )    // size in MB
   124         if ( mFileSz >> 20 )    // size in MB
   125             {       
   125             {       
   126             float sizeInMB = 0;
   126             float sizeInMB = 0;
   127             sizeInMB = ((float)mFileSz ) / (1024*1024);
   127             sizeInMB = ((float)mFileSz ) / (1024*1024);
   128             QString fileSzMb;
   128             QString fileSzMb = QString(hbTrId("txt_common_info_l1_mb")).arg(sizeInMB);
   129             fileSzMb.setNum(sizeInMB);
       
   130             //TODO - check for localization
       
   131             fileSzMb.append(QString(" Mb"));
       
   132             mFileSize->setPlainText(fileSzMb);
   129             mFileSize->setPlainText(fileSzMb);
   133             }
   130             }
   134         
   131         
   135         else if( mFileSz >> 10 )        // size in KB
   132         else if( mFileSz >> 10 )        // size in KB
   136             {
   133             {
   137             TInt64 sizeInKB = 0;
   134             TInt64 sizeInKB = 0;
   138             sizeInKB = mFileSz >> 10;
   135             sizeInKB = mFileSz >> 10;
   139             QString fileSzKb;
   136             QString fileSzKb = QString(hbTrId("txt_common_info_l1_kb")).arg(sizeInKB);
   140             fileSzKb.setNum(sizeInKB);
       
   141             //TODO - check for localization
       
   142             fileSzKb.append(QString(" Kb"));
       
   143             mFileSize->setPlainText(fileSzKb);
   137             mFileSize->setPlainText(fileSzKb);
   144             }
   138             }
   145 
   139 
   146         else                              // size is unknown or less than 1K
   140         else                              // size is unknown or less than 1K
   147             {
   141             {
   148             QString fileSzB;
   142             QString fileSzB = QString(hbTrId("txt_common_info_l1_byte")).arg(mFileSz);
   149             fileSzB.setNum(mFileSz);
       
   150             //TODO - check for localization
       
   151             fileSzB.append(QString(" Bytes"));
       
   152             mFileSize->setPlainText(fileSzB);
   143             mFileSize->setPlainText(fileSzB);
   153             }
   144             }
   154 
   145 
   155         //Set the received file count
   146         //Set the received file count
   156         int fCnt = parameters.value(QString::number(TBluetoothDeviceDialog::EReceivedFileCount)).toInt();
   147         int fCnt = parameters.value(QString::number(TBluetoothDeviceDialog::EReceivedFileCount)).toInt();