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

bool Main_window::addFolder (  ) [private, slot]

Ask which folder add.

Returns:
Return true if succes

Definition at line 1854 of file Mwindow.cpp.

References AddingFolderThread, getDirectoryPath(), priorityLevel, and AddFolderThread::setDir().

Referenced by Main_window().

{
      if(AddingFolderThread->isRunning())
      {
            QMessageBox::warning(NULL, tr("Error"),
            tr("Wait the end of the previous folder adding. Thanks"),
            QMessageBox::Cancel,
            QMessageBox::Cancel);
      }
      else
      {
            DEBUGCONSOLE(30,"Main_window::addFolder","start");
            //prompt the source directory
            QString dir=getDirectoryPath(tr("Open the source directory"));
            //quit if click on cancel
            if(dir=="")
                  return false;
            QString dir2=dir;
            DEBUGCONSOLE(50,"Main_window::addFolder","source dir: "+dir);
            //set the source to listing
            AddingFolderThread->setDir(dir,false);
            //prompt the destination directory
            dir=getDirectoryPath(tr("Open the destination directory"));
            //quit if click on cancel
            if(dir=="")
                  return false;
            setInternalSource(dir2);
            setInternalDestination(dir);
            DEBUGCONSOLE(50,"Main_window::addFolder","destination dir: "+dir);
            //set the destination dir
            AddingFolderThread->setDir(dir,true);
            //start the scan the list
            AddingFolderThread->start(priorityLevel);
      }
      return true;
}

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