Qwt User's Guide 6.1.4

Public Types | Public Member Functions | List of all members
QwtSplineCurveFitter Class Reference

A curve fitter using cubic splines. More...

`#include <qwt_curve_fitter.h>`

Inheritance diagram for QwtSplineCurveFitter:
[legend]

## Public Types
enum | FitMode { Auto, Spline, ParametricSpline }

## Public Member Functions
| QwtSplineCurveFitter ()
| Constructor.
virtual | ~QwtSplineCurveFitter ()
| Destructor.
void | setFitMode (FitMode)
FitMode | fitMode () const
void | setSpline (const QwtSpline &)
const QwtSpline & | spline () const
QwtSpline & | spline ()
void | setSplineSize (int)
int | splineSize () const
virtual QPolygonF | fitCurve (const QPolygonF &) const
Public Member Functions inherited from QwtCurveFitter
virtual | ~QwtCurveFitter ()
| Destructor.

## Additional Inherited Members
Protected Member Functions inherited from QwtCurveFitter
| QwtCurveFitter ()
| Constructor.

## Detailed Description

A curve fitter using cubic splines.

## Member Enumeration Documentation

## ◆ FitMode

enum QwtSplineCurveFitter::FitMode

Spline type The default setting is Auto

See also
  setFitMode(), FitMode()

Enumerator
Auto | Use the default spline algorithm for polygons with increasing x values ( p[i-1] < p[i] ), otherwise use a parametric spline algorithm.
Spline | Use a default spline algorithm.
ParametricSpline | Use a parametric spline algorithm.

## Member Function Documentation

## ◆ fitCurve()

QPolygonF QwtSplineCurveFitter::fitCurve | ( | const QPolygonF & | points | ) | const
| virtual

Find a curve which has the best fit to a series of data points

Parameters

  points | Series of data points

Returns
  Curve points

Implements QwtCurveFitter.

## ◆ fitMode()

QwtSplineCurveFitter::FitMode QwtSplineCurveFitter::fitMode | ( |  | ) | const

Returns
  Mode representing a spline algorithm

See also
  setFitMode()

## ◆ setFitMode()

void QwtSplineCurveFitter::setFitMode | ( | FitMode | mode | ) |

Select the algorithm used for building the spline

Parameters

  mode | Mode representing a spline algorithm

See also
  fitMode()

## ◆ setSpline()

void QwtSplineCurveFitter::setSpline | ( | const QwtSpline & | spline | ) |

Assign a spline

Parameters

  spline | Spline

See also
  spline()

## ◆ setSplineSize()

void QwtSplineCurveFitter::setSplineSize | ( | int | splineSize | ) |

Assign a spline size ( has to be at least 10 points )

Parameters

  splineSize | Spline size

See also
  splineSize()

## ◆ spline() [1/2]

const QwtSpline & QwtSplineCurveFitter::spline | ( |  | ) | const

Returns
  Spline

See also
  setSpline()

## ◆ spline() [2/2]

QwtSpline & QwtSplineCurveFitter::spline | ( |  | ) |

Returns
  Spline

See also
  setSpline()

## ◆ splineSize()

int QwtSplineCurveFitter::splineSize | ( |  | ) | const

Returns
  Spline size

See also
  setSplineSize()