Brief description of class still missing. More...
#include <ConsoleProgress.h>
Public Member Functions | |
| void | begin () |
| void | end (int val=0) |
| virtual void | setCaption (QString c) |
Protected Member Functions | |
| virtual void | paint (QString caption, int value, int maximum) |
Brief description of class still missing.
Full description of class still missing
| void QGpCoreTools::ConsoleProgress::begin | ( | ) |
References QGpCoreTools::AbstractProgress::_mutex, and TRACE.
Referenced by addManyCurvePlot(), createManyCurves(), DinverCore::ImportanceSampling::generate(), MaxEntryList::keepComponent(), MaxEntryList::keepRing(), MaxEntryList::load(), HistogramReader::parse(), MaxEntryList::rejectAmplitudeHorizontalAbsolute(), MaxEntryList::rejectAmplitudeVerticalAbsolute(), MaxEntryList::rejectAmplitudeVerticalFactor(), MaxEntryList::rejectDelay(), MaxEntryList::rejectNPeaksPerFrequency(), MaxEntryList::rejectNPeaksPerMinute(), MaxEntryList::rejectPower(), MaxEntryList::rejectTime(), MaxEntryList::rejectValue(), GeopsyCore::GeopsyCoreEngine::setConsoleProgress(), and MaxEntryList::toStream().
| void QGpCoreTools::ConsoleProgress::end | ( | int | val = 0 | ) |
References QGpCoreTools::AbstractProgress::_caption, QGpCoreTools::AbstractProgress::_maximum, QGpCoreTools::AbstractProgress::_mutex, QGpCoreTools::CoreApplication::instance(), and TRACE.
Referenced by addManyCurvePlot(), createManyCurves(), DinverCore::ImportanceSampling::generate(), MaxEntryList::keepComponent(), MaxEntryList::keepRing(), MaxEntryList::load(), HistogramReader::parse(), MaxEntryList::rejectAmplitudeHorizontalAbsolute(), MaxEntryList::rejectAmplitudeVerticalAbsolute(), MaxEntryList::rejectAmplitudeVerticalFactor(), MaxEntryList::rejectDelay(), MaxEntryList::rejectNPeaksPerFrequency(), MaxEntryList::rejectNPeaksPerMinute(), MaxEntryList::rejectPower(), MaxEntryList::rejectTime(), MaxEntryList::rejectValue(), and MaxEntryList::toStream().
| void QGpCoreTools::ConsoleProgress::paint | ( | QString | caption, |
| int | value, | ||
| int | maximum | ||
| ) | [protected, virtual] |
Implements QGpCoreTools::AbstractProgress.
References QGpCoreTools::CoreApplication::instance(), and QGpCoreTools::AbstractProgress::valueString().
{
static const QString fmt("%1: %2");
QString msg=fmt.arg(caption).arg(valueString(value, maximum));
msg=msg.leftJustified(CoreApplication::instance()->terminalCols()-1);
fprintf(stderr,"%c[1A%s\n", 0x1B, msg.toAscii().data());
#ifdef Q_WS_WIN
fflush(stderr);
#endif
}
| void QGpCoreTools::ConsoleProgress::setCaption | ( | QString | c | ) | [virtual] |
Reimplemented from QGpCoreTools::AbstractProgress.
References QGpCoreTools::AbstractProgress::_caption, QGpCoreTools::AbstractProgress::_mutex, QGpCoreTools::ApplicationHelp::getLine(), QGpCoreTools::CoreApplication::instance(), str, and TRACE.
Referenced by addManyCurvePlot(), createManyCurves(), DinverCore::ImportanceSampling::generate(), MaxEntryList::keepComponent(), MaxEntryList::keepRing(), MaxEntryList::load(), HistogramReader::parse(), MaxEntryList::rejectAmplitudeHorizontalAbsolute(), MaxEntryList::rejectAmplitudeVerticalAbsolute(), MaxEntryList::rejectAmplitudeVerticalFactor(), MaxEntryList::rejectDelay(), MaxEntryList::rejectNPeaksPerFrequency(), MaxEntryList::rejectNPeaksPerMinute(), MaxEntryList::rejectPower(), MaxEntryList::rejectTime(), MaxEntryList::rejectValue(), GeopsyCore::GeopsyCoreEngine::showMessage(), and MaxEntryList::toStream().
{
TRACE;
QString line;
QString str;
while(c.length()>0) {
line=ApplicationHelp::getLine(c, CoreApplication::instance()->terminalCols());
str+=line+"\n";
}
str.chop(1);
QMutexLocker ml(&_mutex);
_caption=str;
}