diff options
author | Bill Muzika <bill.muzika@outlook.com> | 2021-09-03 00:40:22 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-11 14:04:27 -0500 |
commit | 14d30f134cd402a35f46911342eb4d519e2ad7aa (patch) | |
tree | 3f26917cc864603f313e57ae487dba217c74a8a7 /gr-qtgui/lib/plot_raster.cc | |
parent | f9a693d7af02b6ce88fb0e4f3fad78390980c968 (diff) |
qt-gui: enables use of Qwt 6.2
Adds the typedefs and includes needed to build with Qwt 6.2.
Signed-off-by: Bill Muzika <bill.muzika@outlook.com>
Diffstat (limited to 'gr-qtgui/lib/plot_raster.cc')
-rw-r--r-- | gr-qtgui/lib/plot_raster.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gr-qtgui/lib/plot_raster.cc b/gr-qtgui/lib/plot_raster.cc index 7bb439881a..d79def0f44 100644 --- a/gr-qtgui/lib/plot_raster.cc +++ b/gr-qtgui/lib/plot_raster.cc @@ -244,7 +244,11 @@ QImage PlotTimeRaster::renderImage(const QwtScaleMap& xMap, } d_data->data->incrementResidual(); } else if (d_data->colorMap->format() == QwtColorMap::Indexed) { +#if QWT_VERSION >= 0x060200 + image.setColorTable(d_data->colorMap->colorTable(256)); +#else image.setColorTable(d_data->colorMap->colorTable(intensityRange)); +#endif for (int y = rect.top(); y <= rect.bottom(); y++) { const double ty = yyMap.invTransform(y); @@ -253,8 +257,13 @@ QImage PlotTimeRaster::renderImage(const QwtScaleMap& xMap, for (int x = rect.left(); x <= rect.right(); x++) { const double tx = xxMap.invTransform(x); +#if QWT_VERSION >= 0x060200 + *line++ = d_data->colorMap->colorIndex( + 256, intensityRange, d_data->data->value(tx, ty)); +#else *line++ = d_data->colorMap->colorIndex(intensityRange, d_data->data->value(tx, ty)); +#endif } } } |