Originally Posted by
AndiTheCoder
All right. this is possible with a "normal" QwtPlotCurve. There I can draw() data from and to. But how to do this with a spectrogram?
Derive from QwtPlotSpectrogram and introduce a QImage, where you collect your increasing values. Whenever you want to add new values call QwtPlotSpectrogram::renderImage with a painter initialized with your image and for the new area only.
Then overload YourPlotSpectrogram::renderImage returning parts of your image instead of rendering it ( don't call this one for the image composition above ).
When you want to paint new parts of your spectrogram on screen do something like this:
spectrogram
->canvasMap
( QwtPlot::xBottom),
spectrogram
->canvasMap
( QwtPlot::yLeft ),
newArea );
plot->canvas()->repaint( rect );
QRectF newArea = ...; //
QRectF rect = QwtScaleMap::transform(
spectrogram->canvasMap( QwtPlot::xBottom),
spectrogram->canvasMap( QwtPlot::yLeft ),
newArea );
plot->canvas()->repaint( rect );
To copy to clipboard, switch view to plain text mode
Originally Posted by
AndiTheCoder
When will the qwt6 be finished? Or is the rc5 stable enough?
Use SVN trunk - this is planned to be the final version of Qwt 6.
Uwe
Bookmarks