Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QwtCurveFitter Class Referenceabstract

Abstract base class for a curve fitter. More...

#include <qwt_curve_fitter.h>

Inheritance diagram for QwtCurveFitter:
Inheritance graph
[legend]

Public Types

enum  Mode { Polygon, Path }
 Preferred mode of the fitting algorithm. More...
 

Public Member Functions

virtual QPolygonF fitCurve (const QPolygonF &polygon) const =0
 
virtual QPainterPath fitCurvePath (const QPolygonF &polygon) const =0
 
Mode mode () const
 
virtual ~QwtCurveFitter ()
 Destructor. More...
 

Protected Member Functions

 QwtCurveFitter (Mode mode)
 

Private Attributes

const Mode m_mode
 

Detailed Description

Abstract base class for a curve fitter.

Definition at line 21 of file qwt_curve_fitter.h.

Member Enumeration Documentation

◆ Mode

Preferred mode of the fitting algorithm.

Even if a QPainterPath can always be created from a QPolygonF the overhead of the conversion can be avoided by indicating the preference of the implementation to the application code.

Enumerator
Polygon 

The fitting algorithm creates a polygon - the implementation of fitCurvePath() simply wraps the polygon into a path.

See also
QwtWeedingCurveFitter
Path 

The fitting algorithm creates a painter path - the implementation of fitCurve() extracts a polygon from the path.

See also
QwtSplineCurveFitter

Definition at line 32 of file qwt_curve_fitter.h.

Constructor & Destructor Documentation

◆ ~QwtCurveFitter()

QwtCurveFitter::~QwtCurveFitter ( )
virtual

Destructor.

Definition at line 22 of file qwt_curve_fitter.cpp.

◆ QwtCurveFitter()

QwtCurveFitter::QwtCurveFitter ( Mode  mode)
explicitprotected

Constructor

Parameters
modePreferred fitting mode

Definition at line 16 of file qwt_curve_fitter.cpp.

Member Function Documentation

◆ fitCurve()

virtual QPolygonF QwtCurveFitter::fitCurve ( const QPolygonF &  polygon) const
pure virtual

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

Parameters
polygonSeries of data points
Returns
Curve points
See also
fitCurvePath()

Implemented in QwtWeedingCurveFitter, QwtPolarFitter, and QwtSplineCurveFitter.

◆ fitCurvePath()

virtual QPainterPath QwtCurveFitter::fitCurvePath ( const QPolygonF &  polygon) const
pure virtual

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

Parameters
polygonSeries of data points
Returns
Curve path
See also
fitCurve()

Implemented in QwtWeedingCurveFitter, QwtPolarFitter, and QwtSplineCurveFitter.

◆ mode()

QwtCurveFitter::Mode QwtCurveFitter::mode ( ) const
Returns
Preferred fitting mode

Definition at line 27 of file qwt_curve_fitter.cpp.

Member Data Documentation

◆ m_mode

const Mode QwtCurveFitter::m_mode
private

Definition at line 81 of file qwt_curve_fitter.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:50