diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-07-15 16:02:44 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-07-15 16:02:44 -0400 |
commit | 11ce14eecc0ce37826060b9de9e9da439ac32967 (patch) | |
tree | 837b00441b09a4997284131a1aa393510113a902 /gr-qtgui/lib/DisplayPlot.cc | |
parent | 6926bfd62e0067b6c797d3a1dc4e9f8d3ba7f9ae (diff) |
qtgui: wip: some fixes to make updating markers/symbols Qwt5/6 compatible.
Diffstat (limited to 'gr-qtgui/lib/DisplayPlot.cc')
-rw-r--r-- | gr-qtgui/lib/DisplayPlot.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gr-qtgui/lib/DisplayPlot.cc b/gr-qtgui/lib/DisplayPlot.cc index 031285c8b2..06fd85d523 100644 --- a/gr-qtgui/lib/DisplayPlot.cc +++ b/gr-qtgui/lib/DisplayPlot.cc @@ -125,9 +125,14 @@ DisplayPlot::setColor(int which, QString color) _plot_curve[which]->setPen(pen); // And set the color of the markers +#if QWT_VERSION < 0x060000 + _plot_curve[which]->setBrush(QBrush(QColor(color))); +#else QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); sym->setColor(color); + sym->setPen(pen); _plot_curve[which]->setSymbol(sym); +#endif } void @@ -139,9 +144,15 @@ DisplayPlot::setLineWidth(int which, int width) _plot_curve[which]->setPen(pen); // Scale the marker size proportionally +#if QWT_VERSION < 0x060000 + QwtSymbol *sym = (QwtSymbol*)&_plot_curve[which]->symbol() + sym->setSize(7+10*log10(width), 7+10*log10(width)); + _plot_curve[which]->setSymbol(*sym); +#else QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); sym->setSize(7+10*log10(width), 7+10*log10(width)); _plot_curve[which]->setSymbol(sym); +#endif } void |