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

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

Delete the selected file.

Returns:
Return true if succes

Definition at line 1913 of file Mwindow.cpp.

References CopyThread, copyThread::getCurrentStat(), updatePlayPauseSkipButton(), and updateTheCopyStat().

Referenced by Main_window().

{
      DEBUGCONSOLE(30,"Main_window::Playlist_management_del","start");
      int dest,i=0;
      bool isRunning;
      if(CopyThread->getCurrentStat()!=copyThread::Stopped)
      {
            #if (DEBUG_ULTRACOPIER>=90)
            if(CopyThread->getCurrentStat()!=copyThread::Stopped)
                  DEBUGCONSOLE(90,"Main_window::Playlist_management_del","CopyThread->isRunning()==true");
            if(CopyThread->getCurrentStat()!=copyThread::Paused)
                  DEBUGCONSOLE(90,"Main_window::Playlist_management_del","copyMode==COPYMODE_RESUME");
            #endif
            isRunning=true;
            dest=1;
      }
      else
      {
            DEBUGCONSOLE(90,"Main_window::Playlist_management_del","no copy running");
            isRunning=false;
            dest=0;
      }
      QList<int> ids;
      QTreeWidgetItem * item;
      do
      {
            item=NULL;
            item=CopyList->topLevelItem(i);
            if(item!=NULL)
            {
                  if(item->isSelected() && (i!=0 || CopyThread->getCurrentStat()==copyThread::Stopped))
                  {
                        DEBUGCONSOLE(90,"Main_window::Playlist_management_del","delete the item at index in copy list: "+QString::number(i));
                        for (int j = 0; j < theCopyItemExternal.size(); ++j) {
                              if(theCopyItemExternal.at(j).theGraphicIndex==item)
                                    ids<<theCopyItemExternal.at(j).id;
                        }
                        delete item;
                        i--;
                  }
            }
            i++;
      } while(i<CopyList->topLevelItemCount());
      CopyThread->removeItems(ids);
      updateTheCopyStat();
      updatePlayPauseSkipButton();
      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