QwtPointSeriesData what for?
I would like to know what is the benefit of using QwtPointSeriesData class.
f.e.
Code:
QwtPointSeriesData mySeriesData;
QVector<QPointF> myVector;
/////1
mySeriesData.setSamples(myVector);
QPCruve.setData(mySeriesData);
//and
////2
QPCruve.setSamples(myVector);
what is the difference between 1 and 2.
Re: QwtPointSeriesData what for?
setSamples() is there just for convenience.
If you look at source code you'll see that it creates new QwtPointSeriesData, just like 1.
So there is no difference between two methods.
setData() is for more general case, where data is not necessary a set of points.
Re: QwtPointSeriesData what for?
The idea of QwtPointSeriesData is to avoid, that an application needs to create a copy of the points and implements a bridge to the data instead. This makes a lot of sense, when the way how points are stored depends on other requirements.
Uwe