QtiPlot 0.9.8.2
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
FunctionCurve Class Reference

#include <FunctionCurve.h>

Inheritance diagram for FunctionCurve:
PlotCurve

List of all members.

Public Types

enum  FunctionType { Normal = 0, Parametric = 1, Polar = 2 }

Public Member Functions

QMap< QString, double > constants ()
void copy (FunctionCurve *f)
double endRange ()
QStringList formulas ()
 FunctionCurve (const QString &name=QString())
 FunctionCurve (const FunctionType &t, const QString &name=QString())
FunctionType functionType ()
QString legend ()
 Returns a string that can be displayed in a plot legend.
bool loadData (int points=0, bool xLog10Scale=false)
QString parameterName (int index)
 Returns the name of the parameter of rang index.
int parametersCount ()
 Returns the number of parameters in your function formula.
double parameterValue (int index)
 Returns the value of the parameter of rang index.
double parameterValue (const QString &name)
 Returns the value of the name parameter.
void removeConstant (const QString &parName)
void removeConstants ()
QString saveToString ()
 Returns a string used when saving to a project file.
void setConstant (const QString &parName, double val)
void setConstants (const QMap< QString, double > &map)
void setFormula (const QString &s)
 Provided for convenience when dealing with normal functions.
void setFormulas (const QStringList &lst)
void setFunctionType (const FunctionType &t)
void setRange (double from, double to)
void setVariable (const QString &s)
double startRange ()
QString variable ()

Static Public Member Functions

static void restore (Graph *g, const QStringList &lst)
 Used when reading from a project file.

Private Attributes

QMap< QString, double > d_constants
QStringList d_formulas
double d_from
FunctionType d_function_type
double d_to
QString d_variable

Member Enumeration Documentation

Enumerator:
Normal 
Parametric 
Polar 

Constructor & Destructor Documentation

FunctionCurve::FunctionCurve ( const FunctionType t,
const QString &  name = QString() 
)
FunctionCurve::FunctionCurve ( const QString &  name = QString())

Member Function Documentation

QMap<QString, double> FunctionCurve::constants ( ) [inline]
void FunctionCurve::copy ( FunctionCurve f)
double FunctionCurve::endRange ( ) [inline]
QStringList FunctionCurve::formulas ( ) [inline]
FunctionType FunctionCurve::functionType ( ) [inline]
QString FunctionCurve::legend ( )

Returns a string that can be displayed in a plot legend.

References d_formulas, d_function_type, d_variable, Normal, Parametric, and Polar.

Referenced by Graph::modifyFunctionCurve().

bool FunctionCurve::loadData ( int  points = 0,
bool  xLog10Scale = false 
)
QString FunctionCurve::parameterName ( int  index)

Returns the name of the parameter of rang index.

References d_constants.

int FunctionCurve::parametersCount ( ) [inline]

Returns the number of parameters in your function formula.

References d_constants.

double FunctionCurve::parameterValue ( int  index)

Returns the value of the parameter of rang index.

References d_constants.

double FunctionCurve::parameterValue ( const QString &  name)

Returns the value of the name parameter.

References d_constants.

void FunctionCurve::removeConstant ( const QString &  parName) [inline]

References d_constants.

void FunctionCurve::removeConstants ( ) [inline]

References d_constants.

Referenced by FitDialog::updatePreview().

void FunctionCurve::restore ( Graph g,
const QStringList &  lst 
) [static]
QString FunctionCurve::saveToString ( )
void FunctionCurve::setConstant ( const QString &  parName,
double  val 
) [inline]
void FunctionCurve::setConstants ( const QMap< QString, double > &  map) [inline]
void FunctionCurve::setFormula ( const QString &  s) [inline]

Provided for convenience when dealing with normal functions.

References d_formulas.

Referenced by Fit::insertFitFunctionCurve(), MultiPeakFit::insertPeakFunctionCurve(), TranslateCurveTool::selectDestination(), and FitDialog::updatePreview().

void FunctionCurve::setFormulas ( const QStringList &  lst) [inline]
void FunctionCurve::setFunctionType ( const FunctionType t) [inline]

References d_function_type.

Referenced by Graph::modifyFunctionCurve().

void FunctionCurve::setRange ( double  from,
double  to 
)
void FunctionCurve::setVariable ( const QString &  s) [inline]
double FunctionCurve::startRange ( ) [inline]
QString FunctionCurve::variable ( ) [inline]

Member Data Documentation

QMap<QString, double> FunctionCurve::d_constants [private]
QStringList FunctionCurve::d_formulas [private]
double FunctionCurve::d_from [private]
double FunctionCurve::d_to [private]
QString FunctionCurve::d_variable [private]

The documentation for this class was generated from the following files: