diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-07-29 23:36:30 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-07-29 23:36:30 -0400 |
commit | 05f6087695681f71796f3a2c59fcd5788b9014cf (patch) | |
tree | 0bbaf6b562ce561b886df31069bc664ccb944312 /gr-qtgui | |
parent | 1b71820ae56a6e0ac1544985b26bd9a3344c4702 (diff) |
qtgui: fixing other menu behavior with qwt5.
Diffstat (limited to 'gr-qtgui')
-rw-r--r-- | gr-qtgui/lib/DisplayPlot.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gr-qtgui/lib/DisplayPlot.cc b/gr-qtgui/lib/DisplayPlot.cc index a1ea1763a4..577b4f1483 100644 --- a/gr-qtgui/lib/DisplayPlot.cc +++ b/gr-qtgui/lib/DisplayPlot.cc @@ -126,7 +126,11 @@ DisplayPlot::setColor(int which, QString color) // And set the color of the markers #if QWT_VERSION < 0x060000 - _plot_curve[which]->setBrush(QBrush(QColor(color))); + //_plot_curve[which]->setBrush(QBrush(QColor(color))); + _plot_curve[which]->setPen(pen); + + QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + setLineMarker(which, sym.style()); #else QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); sym->setColor(color); @@ -145,9 +149,9 @@ DisplayPlot::setLineWidth(int which, int width) // 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); + 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)); @@ -168,7 +172,11 @@ DisplayPlot::setLineMarker(int which, QwtSymbol::Style marker) { #if QWT_VERSION < 0x060000 QwtSymbol sym = (QwtSymbol)_plot_curve[which]->symbol(); + QPen pen(_plot_curve[which]->pen()); + QBrush brush(pen.color()); sym.setStyle(marker); + sym.setPen(pen); + sym.setBrush(brush); _plot_curve[which]->setSymbol(sym); #else QwtSymbol *sym = (QwtSymbol*)_plot_curve[which]->symbol(); |