summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/plot_waterfall.cc
diff options
context:
space:
mode:
authorBill Muzika <bill.muzika@outlook.com>2021-09-03 00:40:22 -0400
committermormj <34754695+mormj@users.noreply.github.com>2021-10-11 07:35:52 -0400
commitcf04ca2132d6eff7f807a10141596389afcfbcd5 (patch)
tree331d4eb5852ce66398e4ce325d70dda2a8002353 /gr-qtgui/lib/plot_waterfall.cc
parent89e45e3f9422a8b6f069d770de23f5ca841426d6 (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_waterfall.cc')
-rw-r--r--gr-qtgui/lib/plot_waterfall.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gr-qtgui/lib/plot_waterfall.cc b/gr-qtgui/lib/plot_waterfall.cc
index ff47ea2003..94c44051d6 100644
--- a/gr-qtgui/lib/plot_waterfall.cc
+++ b/gr-qtgui/lib/plot_waterfall.cc
@@ -240,7 +240,11 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap& xMap,
}
}
} 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);
@@ -249,8 +253,13 @@ QImage PlotWaterfall::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
}
}
}