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:
/*!
Set the color bar interval.
\param interval Value interval
\sa colorBarInterval(), setColorMap()
*/
{
d_data->colorBar.interval = interval;
if ( isColorBarEnabled() )
layoutScale();
}
/*!
Set the color bar interval.
\param interval Value interval
\sa colorBarInterval(), setColorMap()
*/
void QwtScaleWidget::setColorBarInterval(const QwtInterval &interval)
{
d_data->colorBar.interval = interval;
if ( isColorBarEnabled() )
layoutScale();
}
To copy to clipboard, switch view to plain text mode
qwt_scale_widget.h:
void setColorBarInterval(const QwtInterval &);
void setColorBarInterval(const QwtInterval &);
To copy to clipboard, switch view to plain text mode
Hope this is helpful.
Bookmarks