class YourData: public QwtSeriesData<QPointF>
{
....
virtual size_t size() const
{
return 1000000;
}
virtual QPointF sample
( size_t i
) const {
return QPointF( i
* delta, m_values
[i
] );
}
// optional
virtual QRectF boundingRect
() const {
return QRect( 0.0, yMin, size
() * delta, ymax
- yMin
);
}
private:
double *m_values;
};
class YourData: public QwtSeriesData<QPointF>
{
....
virtual size_t size() const
{
return 1000000;
}
virtual QPointF sample( size_t i ) const
{
return QPointF( i * delta, m_values[i] );
}
// optional
virtual QRectF boundingRect() const
{
return QRect( 0.0, yMin, size() * delta, ymax - yMin );
}
private:
double *m_values;
};
To copy to clipboard, switch view to plain text mode
When workin with huge datasets you might want to have a look at the QwtPlotCurve::FilterPointsAggressive from svn trunk.
Uwe
Bookmarks