Implemented progressbar for Xyce

This commit is contained in:
Vadim Kuznetzov 2015-05-04 14:07:38 +03:00
parent b591279e68
commit 959eb76394
3 changed files with 17 additions and 1 deletions

View File

@ -625,7 +625,7 @@ void AbstractSpiceKernel::slotFinished()
//output.clear();
output += SimProcess->readAllStandardOutput();
emit finished();
//emit progress(100);
emit progress(100);
}
/*!

View File

@ -228,6 +228,21 @@ void Xyce::slotFinished()
}
}
/*!
* \brief Xyce::slotProcessOutput Process Xyce output and report progress.
*/
void Xyce::slotProcessOutput()
{
//***** Percent complete: 85.4987 %
QString s = SimProcess->readAllStandardOutput();
if (s.contains("Percent complete:")) {
int percent = round(s.section(' ',3,3,QString::SectionSkipEmpty).toFloat());
emit progress(percent);
}
output += s;
}
/*!
* \brief Xyce::nextSimulation Execute the next simulation from queue.
*/

View File

@ -50,6 +50,7 @@ protected:
QStringList &vars, QStringList &outputs);
protected slots:
void slotFinished();
void slotProcessOutput();
public slots:
void slotSimulate();