slot for stoping generator Definition at line 1049 of file aimainwindow.cpp. 01050 { 01051 try 01052 { 01053 //check if threads is running 01054 if( m_threads.size() > 0 ) 01055 { 01056 if( m_threads[ 0 ]->isRunning() ) 01057 { 01058 if( QMessageBox::Ok == QMessageBox::warning(this, tr("Threads"), tr("Current threads is running you want to stop them ?."), QMessageBox::Ok | QMessageBox::Cancel) ) 01059 { 01060 // stoping current threads 01061 for( int index = 0 ; index < m_threads.size() ; index++ ) 01062 { 01063 m_threads[ index ]->stop(); 01064 m_threads[ index ]->wait(); 01065 } 01066 } 01067 else 01068 { 01069 return; 01070 } 01071 } 01072 } 01073 m_statusbar->stopGenerating(); 01074 } 01075 catch(const std::exception & exception ) 01076 { 01077 QMessageBox::critical(this, tr("Critical Error!"), tr("Please report this problem to adrabi[at]gmail[dot]com =).")); 01078 } 01079 } |