Brief description of class still missing. More...
#include <SmoothingParameters.h>
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 |
Brief description of class still missing.
Full description of class still missing
Description of constructor still missing
References KonnoOhmachi, and TRACE.
{
TRACE;
_type=KonnoOhmachi;
_constant=40.0;
}
| void QGpCoreTools::SmoothingParameters::collectKeywords | ( | PARAMETERS_COLLECTKEYWORDS_ARGS | ) | [virtual] |
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);
}
| double QGpCoreTools::SmoothingParameters::constant | ( | ) | const [inline] |
Referenced by QGpGuiTools::SmoothingParameterWidget::setParameters().
{return _constant;}
| int QGpCoreTools::SmoothingParameters::keywordCount | ( | PARAMETERS_KEYWORDCOUNT_ARGS | ) | [virtual] |
Reimplemented from QGpCoreTools::AbstractParameters.
{
return 2;
}
| void QGpCoreTools::SmoothingParameters::setConstant | ( | double | c | ) | [inline] |
Referenced by QGpGuiTools::SmoothingParameterWidget::getParameters(), and setValue().
{_constant=c;}
| void QGpCoreTools::SmoothingParameters::setType | ( | Type | t | ) | [inline] |
Referenced by QGpGuiTools::SmoothingParameterWidget::getParameters(), and setValue().
{_type=t;}
| 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;
}
| bool QGpCoreTools::SmoothingParameters::setValue | ( | PARAMETERS_SETVALUE_ARGS | ) | [virtual] |
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;
}
}
| QString QGpCoreTools::SmoothingParameters::toString | ( | PARAMETERS_TOSTRING_ARGS_DECL | ) | const [virtual] |
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;
}
| Type QGpCoreTools::SmoothingParameters::type | ( | ) | const [inline] |
Referenced by QGpGuiTools::SmoothingParameterWidget::setParameters().
{return _type;}
| QString QGpCoreTools::SmoothingParameters::typeString | ( | ) | const |
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";
}