Brief description of class still missing. More...
#include <EllipticityPeakTargetWidget.h>
Signals | |
| void | peakModified () |
Public Member Functions | |
| EllipticityPeakTargetWidget (QWidget *parent=0) | |
| void | loadHVGeopsy (QString fileName) |
| void | loadReport (QString fileName) |
| void | setEditable (bool e) |
| void | setValue (const RealStatisticalValue &val) |
| RealStatisticalValue | value () const |
Brief description of class still missing.
Full description of class still missing
| EllipticityPeakTargetWidget::EllipticityPeakTargetWidget | ( | QWidget * | parent = 0 | ) |
Description of constructor still missing
References peakModified(), and TRACE.
: QWidget(parent)
{
TRACE;
setupUi(this);
connect(f0Edit, SIGNAL(valueChanged(double)), this, SIGNAL(peakModified()));
connect(devF0Edit, SIGNAL(valueChanged(double)), this, SIGNAL(peakModified()));
}
| void EllipticityPeakTargetWidget::loadHVGeopsy | ( | QString | fileName | ) |
References MSG_ID, QGpCoreTools::tr(), and TRACE.
{
TRACE;
// open values as 2 or 3 columns
QFile f(fileName);
if( !f.open(QIODevice::ReadOnly) ) {
Message::warning(MSG_ID, tr("Loading Geopsy HV output ..."),
tr("Impossible to access to file %1").arg(fileName), Message::cancel(), true);
return ;
}
QTextStream s(&f);
while( !s.atEnd()) {
QString str=s.readLine().trimmed().simplified();
if(str.left(17)=="# f0 from windows" ) {
double f0=str.section(QRegExp( "[ \t]" ), 4, 4).toDouble();
f0Edit->setValue(f0);
devF0Edit->setValue(f0-str.section(QRegExp( "[ \t]" ), 5, 5).toDouble());
}
}
}
| void EllipticityPeakTargetWidget::loadReport | ( | QString | fileName | ) |
References QGpCompatibility::CompatInversionReport::currentEllipticity(), QGpCompatibility::CompatEllipticityData::devf0(), QGpCompatibility::CompatEllipticityData::f0(), QGpCompatibility::CompatInversionReport::loadEllipticityGoal(), MSG_ID, QGpCompatibility::CompatMultiModalCurves::setValue(), QGpCoreTools::tr(), and TRACE.
{
TRACE;
CompatInversionReport report(false, fileName);
if(report.currentEllipticity()==0) {
Message::warning(MSG_ID, tr("Importing report"),
tr("Report %1 contains no ellipticity curve\n").arg(fileName), Message::ok(), true);
return ;
}
CompatEllipticityData * ell=report.loadEllipticityGoal();
f0Edit->setValue(ell->f0());
devF0Edit->setValue(ell->devf0());
delete ell;
}
| void EllipticityPeakTargetWidget::peakModified | ( | ) | [signal] |
Referenced by EllipticityPeakTargetWidget().
| void EllipticityPeakTargetWidget::setEditable | ( | bool | e | ) |
References TRACE.
Referenced by TargetListWidget::setEditable().
{
TRACE;
f0Edit->setEnabled(e);
devF0Edit->setEnabled(e);
loadBut->setEnabled(e);
}
| void EllipticityPeakTargetWidget::setValue | ( | const RealStatisticalValue & | val | ) |
References QGpCoreTools::StatisticalValue< numberType >::mean(), QGpCoreTools::StatisticalValue< numberType >::stddev(), and TRACE.
Referenced by TargetListWidget::setFrom().
References QGpCoreTools::StatisticalValue< numberType >::setStddev(), and TRACE.
Referenced by TargetListWidget::targetList(), and TargetListWidget::updateInfo().
{
TRACE;
RealStatisticalValue val(f0Edit->value());
val.setStddev(devF0Edit->value());
return val;
}