Hi,

I have a minor patch suggestion for QwtScaleWidget. It's a simple function to update the colorbar interval. The reason I've done this is to avoid creating a new colormap every time I want to update the colorbar interval for an incremental spectrogram. This new function simplifies the code I need to write to have user-selectable colormaps for the spectrogram in real time.

I've tested this with my incremental plot code and it seems to work fine.

qwt_scale_wdiget.cpp:
Qt Code:
  1. /*!
  2.   Set the color bar interval.
  3.  
  4.   \param interval Value interval
  5.  
  6.   \sa colorBarInterval(), setColorMap()
  7. */
  8. void QwtScaleWidget::setColorBarInterval(const QwtInterval &interval)
  9. {
  10. d_data->colorBar.interval = interval;
  11.  
  12. if ( isColorBarEnabled() )
  13. layoutScale();
  14. }
To copy to clipboard, switch view to plain text mode 

qwt_scale_widget.h:
Qt Code:
  1. void setColorBarInterval(const QwtInterval &);
To copy to clipboard, switch view to plain text mode 

Hope this is helpful.