Logo Search packages:      
Sourcecode: karchiver version File versions  Download package

void KarchiveurApp::recueSdtOut ( KProcess *  ,
char *  buffer,
int  length 
) [slot]

we recive some informations through the standard output of the process

Definition at line 983 of file karchiveur.cpp.

References CArchiveChoice::getKindOfCompressor(), and slotStatusMsg().

Referenced by KarchiveurApp().

                                                                   {
  kdDebug()<<QString("KarchiveurApp::recueSdtOut")<<endl;
      if(operation==SCRIPT)
      {
            int i=0;
            if(archivechoice->getKindOfCompressor()==ZIP)
            {
                  counter++;
                  if(counter%2==0)
                        progress->setProgress(progress->progress()+ 1 );
            }
            //A little animation for waiting gzip and bzip2 files to uncompress
            else if((archivechoice->getKindOfCompressor()==GZIP)||(archivechoice->getKindOfCompressor()==BZIP2))
            {
                  counter++;
                  fwrite(buffer,sizeof(char),length,fichierIO);
                  QString s=i18n("Running compressor...");
            switch(counter/4%8)
            {
                  case 0:
                        s+="-";
                        break;
                  case 1:
                        s+="/";
                        break;
                  case 2:
                        s+="|";
                        break;
                  case 3:
                        s+="\\";
                        break;
                  case 4:
                        s+="-";
                        break;
                  case 5:
                        s+="/";
                        break;
                  case 6:
                        s+="|";
                        break;
                  case 7:
                        s+="\\";
                        break;
            }
            slotStatusMsg(s);
            }
            //For all other formats, use the progress bar
            else
            {
                  QString inter;
                  inter=buffer;
                  inter=inter.left(length);

                  while((i=inter.find('\n',i+1))!=-1){
                        progress->setProgress(progress->progress()+1);
                  }
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index