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

Brief description of class still missing. More...

#include <SmoothingParameters.h>

Inheritance diagram for QGpCoreTools::SmoothingParameters:
QGpCoreTools::AbstractParameters

List of all members.

Public Types

enum  Type { KonnoOhmachi, Constant, Proportional, NoSmoothing }

Public Member Functions

virtual void collectKeywords (PARAMETERS_COLLECTKEYWORDS_ARGS)
double constant () const
virtual int keywordCount (PARAMETERS_KEYWORDCOUNT_ARGS)
void setConstant (double c)
void setType (Type t)
void setType (const QString &t)
virtual bool setValue (PARAMETERS_SETVALUE_ARGS)
 SmoothingParameters ()
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:
KonnoOhmachi 
Constant 
Proportional 
NoSmoothing 

Constructor & Destructor Documentation

Description of constructor still missing

References KonnoOhmachi, and TRACE.

  {
    TRACE;
    _type=KonnoOhmachi;
    _constant=40.0;
  }

Member Function Documentation

Reimplemented from QGpCoreTools::AbstractParameters.

References TRACE.

Referenced by MonoStation::AbstractToolParameters::collectKeywords().

  {
    TRACE;
    keywords.add(prefix+"SMOOTHING TYPE", this, 0);
    keywords.add(prefix+"SMOOTHING CONSTANT", this, 1);
  }

Referenced by QGpGuiTools::SmoothingParameterWidget::setParameters().

{return _constant;}

Reimplemented from QGpCoreTools::AbstractParameters.

  {
    return 2;
  }
void QGpCoreTools::SmoothingParameters::setType ( const QString &  t)

References Constant, QGpCoreTools::endl(), KonnoOhmachi, NoSmoothing, Proportional, QGpCoreTools::App::stream(), and QGpCoreTools::tr().

  {
    if(!t.isEmpty()) {
      QString tl=t.toLower();
      switch(tl[0].unicode()) {
      case 'c':
        if(tl=="constant") {
          _type=Constant;
          return;
        }
        break;
      case 'k':
        if(tl=="konnoohmachi") {
          _type=KonnoOhmachi;
          return;
        }
        break;
      case 'p':
        if(tl=="proportional") {
          _type=Proportional;
        }
      case 'n':
        if(tl=="nosmoothing") {
          _type=NoSmoothing;
        }
      default:
        break;
      }
    }
    App::stream() << tr("Bad smoothing type '%1'.").arg(t) << endl;
  }

Reimplemented from QGpCoreTools::AbstractParameters.

References setConstant(), setType(), and TRACE.

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

Reimplemented from QGpCoreTools::AbstractParameters.

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

Referenced by MonoStation::AbstractToolParameters::toString().

  {
    TRACE;
    QString log;
    log+=prefix+"SMOOTHING TYPE="+typeString()+"\n";
    log+=prefix+"SMOOTHING CONSTANT="+_constant+"\n";
    return log;
  }

References Constant, KonnoOhmachi, NoSmoothing, and Proportional.

Referenced by toString().

  {
    switch(_type) {
    case KonnoOhmachi:
      break;
    case Constant:
      return "Constant";
    case Proportional:
      return "Proportional";
    case NoSmoothing:
      return "NoSmooting";
    }
    return "KonnoOmachi";
  }

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