Hm, what needs to be done:
- Call YourRasterData::setInterval
The intervals for the x/y axes are the values you have passed with setBoundingRect before. The interval for z axis is what you have returned as range before.- Implement the YourRasterData::value method
Absulutely nothing has changed here.- Optionally implement YourRasterData::pixelHint(). pixelHint() returns not only the size of a pixel ( rasterHint() returned the number of pixels ! ) but also a position, so that the image can be aligned properly. You can return the geometry of any pixel.
Note that the pixelHint is not working in Qwt 6.0.1 - you need to use the code from SVN 6.0, or wait for 6.0.2 what will happen the next days.
Then do: spectrogram->setData( new YourRasterData() );
The previous data object gets deleted, when you pass a new data object, but in your case I guess YourRasterData is somehow connected to your vector of doubles and you directly modify this vector behind the back of the spectrogram item. Beside this vector I guess you need to adjust the interval of the y interval and to invalidate the cache ( if QwtPlotRasterItem::PaintCache is enabled ) before you call replot. But this is not different to what you had to do with Qt 5.2.
Uwe
Bookmarks