Loading...
Searching...
No Matches
QwtSplineCurveFitter Class Reference

A curve fitter using a spline interpolation. More...

`#include <qwt_spline_curve_fitter.h>`

Inheritance diagram for QwtSplineCurveFitter:

## Public Member Functions

| QwtSplineCurveFitter ()
| Constructor.
virtual | ~QwtSplineCurveFitter ()
| Destructor.
void | setSpline (QwtSpline *)
const QwtSpline * | spline () const
QwtSpline * | spline ()
virtual QPolygonF | fitCurve (const QPolygonF &) const override
virtual QPainterPath | fitCurvePath (const QPolygonF &) const override
Public Member Functions inherited from QwtCurveFitter
virtual | ~QwtCurveFitter ()
| Destructor.
Mode | mode () const

## Additional Inherited Members

Public Types inherited from QwtCurveFitter
enum | Mode { Polygon , Path }
| Preferred mode of the fitting algorithm. More...
Protected Member Functions inherited from QwtCurveFitter
| QwtCurveFitter (Mode mode)

## Detailed Description

A curve fitter using a spline interpolation.

The default setting for the spline is a cardinal spline with uniform parametrization.

See also
  QwtSpline, QwtSplineLocal

Definition at line 25 of file qwt_spline_curve_fitter.h.

## Constructor & Destructor Documentation

## QwtSplineCurveFitter()

QwtSplineCurveFitter::QwtSplineCurveFitter | ( |  | ) |

Constructor.

Definition at line 18 of file qwt_spline_curve_fitter.cpp.

## ~QwtSplineCurveFitter()

QwtSplineCurveFitter::~QwtSplineCurveFitter | ( |  | ) |

virtual

Destructor.

Definition at line 26 of file qwt_spline_curve_fitter.cpp.

## Member Function Documentation

## fitCurve()

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

overridevirtual

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

Parameters

  points | Series of data points

Returns
  Fitted Curve

See also
  fitCurvePath()

Implements QwtCurveFitter.

Definition at line 75 of file qwt_spline_curve_fitter.cpp.

## fitCurvePath()

QPainterPath QwtSplineCurveFitter::fitCurvePath | ( | const QPolygonF & | points | ) | const

overridevirtual

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

Parameters

  points | Series of data points

Returns
  Fitted Curve

See also
  fitCurve()

Implements QwtCurveFitter.

Definition at line 94 of file qwt_spline_curve_fitter.cpp.

## setSpline()

void QwtSplineCurveFitter::setSpline | ( | QwtSpline * | spline | ) |

Assign a spline

The spline needs to be allocated by new and will be deleted in the destructor of the fitter.

Parameters

  spline | Spline

See also
  spline()

Definition at line 40 of file qwt_spline_curve_fitter.cpp.

## spline() [1/2]

QwtSpline * QwtSplineCurveFitter::spline | ( |  | ) |

Returns
  Spline

See also
  setSpline()

Definition at line 62 of file qwt_spline_curve_fitter.cpp.

## spline() [2/2]

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

Returns
  Spline

See also
  setSpline()

Definition at line 53 of file qwt_spline_curve_fitter.cpp.