Well, the fitter creates temporary points in paint device coordinates, that are not known to the picker. What you could do is to apply the spline interpolation to your points in plot coordinates ( using QwtSplineCurveFitter::fitCurve() manually ) passing the interpolated points instead. The curvetracker code works out of the box - but of course this is a different type of interpolation.
If you don't want to do this you could overload QwtSplineFitter::fitCurve() and store the interpolated points:
class YourSplineFitter: public QwtSplineFitter
{
public:
{
mInterpolatedPoints = QwtSplineFitter::fitCurve( points );
return mInterpolatedPoints;
}
...
private:
};
class YourSplineFitter: public QwtSplineFitter
{
public:
virtual QPolygonF fitCurve( const QPolygonF &points ) const
{
mInterpolatedPoints = QwtSplineFitter::fitCurve( points );
return mInterpolatedPoints;
}
...
private:
QPolygonF mInterpolatedPoints;
};
To copy to clipboard, switch view to plain text mode
Then the CurveTracker can be implemented using mInterpolatePoints.
HTH,
Uwe
Bookmarks