Signals | Public Member Functions
EllipticityPeakTargetWidget Class Reference

Brief description of class still missing. More...

#include <EllipticityPeakTargetWidget.h>

List of all members.

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

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

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()));
}

Member Function Documentation

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;
}

References TRACE.

Referenced by TargetListWidget::setEditable().

{
  TRACE;
  f0Edit->setEnabled(e);
  devF0Edit->setEnabled(e);
  loadBut->setEnabled(e);
}

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;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines