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

void Main_window::addToList ( const QFileInfo &  source,
const QFileInfo &  destination 
) [slot]

Add item to list.

Parameters:
sourceThe source
destinationThe folder or file destination

Definition at line 2076 of file Mwindow.cpp.

References copyThread::addToList(), autoIncrementId, CopyThread, fileTot, copyThread::intToQtringSize(), and sizeTot.

Referenced by Main_window().

{
      DEBUGCONSOLE(90,"Main_window::addToList","start, add: "+source.filePath()+" and: "+destination.filePath());
      qint64 size=source.size();
      
      QStringList newItem;
      QString sourceFile,destFile;
      if(getMountType(source.filePath())!="protocol")
            sourceFile=source.absoluteFilePath();
      else
            sourceFile=source.filePath();
      if(getMountType(destination.filePath())!="protocol")
            destFile=destination.absoluteFilePath();
      else
            destFile=destination.filePath();
      newItem << sourceFile << copyThread::intToQtringSize(size) << destFile;
      QTreeWidgetItem *item = new QTreeWidgetItem(newItem);
      CopyList->addTopLevelItem(item);

      copyItemExternal tempItem;
      tempItem.id=++autoIncrementId;
      tempItem.theGraphicIndex=item;
      CopyThread->addToList(tempItem.id,source,size,destination);
      theCopyItemExternal.append(tempItem);

      sizeTot+=size;
      fileTot++;
      DEBUGCONSOLE(90,"Main_window::addToList","stop");
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index