All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Types | Public Member Functions
GeopsyCore::NormalizationParameters Class Reference

Brief description of class still missing. More...

#include <NormalizationParameters.h>

Inheritance diagram for GeopsyCore::NormalizationParameters:
QGpCoreTools::AbstractParameters

List of all members.

Public Types

enum  Type {
  None, SurfaceAttenuation, VolumeAttenuation, MaximumAmplitude,
  SpectrumEnergy
}

Public Member Functions

virtual void collectKeywords (PARAMETERS_COLLECTKEYWORDS_ARGS)
virtual int keywordCount (PARAMETERS_KEYWORDCOUNT_ARGS)
double maximumFrequency () const
double minimumFrequency () const
 NormalizationParameters ()
void setRange (double min, double max)
void setType (Type t)
void setType (const QString &t)
virtual bool setValue (PARAMETERS_SETVALUE_ARGS)
virtual QString toString (PARAMETERS_TOSTRING_ARGS_DECL) const
Type type () const
QString typeString () const

Detailed Description

Brief description of class still missing.

Full description of class still missing


Member Enumeration Documentation

Enumerator:
None 
SurfaceAttenuation 
VolumeAttenuation 
MaximumAmplitude 
SpectrumEnergy 

Constructor & Destructor Documentation

Description of constructor still missing

References None, and TRACE.

{
  TRACE;
  _type=None;
  _minF=0.5;
  _maxF=50.0;
}

Member Function Documentation

Reimplemented from QGpCoreTools::AbstractParameters.

References TRACE.

Referenced by ArrayCore::LinearFKParameters::collectKeywords().

{
  TRACE;
  keywords.add(prefix+"NORMALIZATION TYPE", this, 0);
  keywords.add(prefix+"NORMALIZATION MINIMUM", this, 1);
  keywords.add(prefix+"NORMALIZATION MAXIMUM", this, 2);
}

Reimplemented from QGpCoreTools::AbstractParameters.

{
  return 3;
}
void GeopsyCore::NormalizationParameters::setRange ( double  min,
double  max 
)

References TRACE.

Referenced by ToolLinearFKActived::getParameters(), GeopsyGui::NormalizationParameterWidget::getParameters(), and setType().

{
  TRACE;
  if(min<max) {
    _minF=min;
    _maxF=max;
  } else {
    _minF=max;
    _maxF=min;
  }
}

References setRange(), SpectrumEnergy, and TRACE.

Referenced by ToolLinearFKActived::getParameters(), GeopsyGui::NormalizationParameterWidget::getParameters(), and setValue().

{
  TRACE;
  _type=t;
  if(_type==SpectrumEnergy && _minF>_maxF) {
    setRange(_maxF, _minF);
  }
}
void GeopsyCore::NormalizationParameters::setType ( const QString &  t)

References QGpCoreTools::endl(), MaximumAmplitude, None, setRange(), SpectrumEnergy, SurfaceAttenuation, QGpCoreTools::tr(), and VolumeAttenuation.

{
  if(t.count()>3) {
    QString lt=t.toLower();
    switch(lt[2].unicode()) {
    case 'x':
      if(lt=="maximumamplitude") {
        _type=MaximumAmplitude;
        return;
      }
      break;
    case 'n':
      if(lt=="none") {
        _type=None;
        return;
      }
      break;
    case 'r':
      if(lt=="surfaceattenuation") {
        _type=SurfaceAttenuation;
        return;
      }
      break;
    case 'e':
      if(lt=="spectrumenergy") {
        _type=SpectrumEnergy;
        if(_minF>_maxF) {
          setRange(_maxF, _minF);
        }
      }
      break;
    case 'l':
      if(lt=="volumeattenuation") {
        _type=VolumeAttenuation;
        return;
      }
    default:
      break;
    }
    App::stream() << tr("Unrecognized normalization type: %1").arg(t) << endl;
  }
}

Reimplemented from QGpCoreTools::AbstractParameters.

References setType(), and TRACE.

{
  TRACE;
  switch(index) {
  case 0:
    setType(value);
    return true;
  case 1:
    _minF=value.toDouble();
    return true;
  case 2:
    _maxF=value.toDouble();
    return true;
  default:
    return false;
  }
}

Reimplemented from QGpCoreTools::AbstractParameters.

References QGpCoreTools::log(), TRACE, and typeString().

Referenced by ArrayCore::LinearFKParameters::toString().

{
  TRACE;
  QString log;
  log+=prefix+"NORMALIZATION TYPE="+typeString()+"\n";
  log+=prefix+"NORMALIZATION MINIMUM="+QString::number(_minF)+"\n";
  log+=prefix+"NORMALIZATION MAXIMUM="+QString::number(_maxF)+"\n";
  return log;
}

References MaximumAmplitude, None, SpectrumEnergy, SurfaceAttenuation, and VolumeAttenuation.

Referenced by toString().

{
  switch(_type) {
  case None:
    break;
  case SurfaceAttenuation:
    return "SurfaceAttenuation";
  case VolumeAttenuation:
    return "VolumeAttenuation";
  case MaximumAmplitude:
    return "MaximumAmplitude";
  case SpectrumEnergy:
    return "SpectrumEnergy";
  }
  return "None";
}

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