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

void Main_window::updatePlayPauseSkipButton (  ) [slot]

update the play, pause,skip button

Note:
if copyIsRunning is at true show pause, else show play

Definition at line 1680 of file Mwindow.cpp.

References actionPause, CopyThread, copyThread::getCurrentStat(), copyThread::lenghtOfCopyList(), sizeCur, sizeTot, TimerForCopySpeedUpdate, and TimerForCopyUpdate.

Referenced by ListingIsFinish(), Main_window(), PauseButton(), Playlist_management_del(), and SkipButton().

{
      //if copy is running
      if(CopyThread->isRunning())
      {
            DEBUGCONSOLE(70,"Main_window::updatePlayPauseSkipButton","!CopyThread->isFinished()");
            pauseButton->setEnabled(true);
            skipButton->setEnabled(true);
            actionPause->setEnabled(true);
            cancelButton->setText(tr("Cancel"));
            if(CopyThread->getCurrentStat()!=copyThread::Paused)
            {
                  actionPause->setText(tr("Pause"));
                  pauseButton->setText(tr("Pause"));
                  pauseButton->setIcon(loadImage("player_pause.png"));
            }
            //if copy is paused
            else
            {
                  DEBUGCONSOLE(90,"Main_window::updatePlayPauseSkipButton","Copy list full and ready to copy");
                  actionPause->setText(tr("Play"));
                  pauseButton->setText(tr("Play"));
                  pauseButton->setIcon(loadImage("player_play.png"));
            }
      }
      else
      {
            actionPause->setText(tr("Play"));
            pauseButton->setText(tr("Play"));
            pauseButton->setIcon(loadImage("player_play.png"));
            //if copy is finish and stopped
            if(CopyThread->lenghtOfCopyList()==0)
            {
                  DEBUGCONSOLE(90,"Main_window::updatePlayPauseSkipButton","no item in copy list");
                  skipButton->setEnabled(false);
                  pauseButton->setEnabled(false);
                  actionPause->setEnabled(false);
                  if(TimerForCopyUpdate->isActive())
                        TimerForCopyUpdate->stop();
                  if(TimerForCopySpeedUpdate->isActive())
                        TimerForCopySpeedUpdate->stop();
                  sizeCur=sizeTot;
                  cancelButton->setText(tr("Quit"));
            }
            //if copy is paused
            else
            {
                  DEBUGCONSOLE(90,"Main_window::updatePlayPauseSkipButton","Copy list full and ready to copy");
                  pauseButton->setEnabled(true);
                  skipButton->setEnabled(true);
                  actionPause->setEnabled(true);
                  cancelButton->setText(tr("Cancel"));
            }
      }
}

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