diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-04-24 01:47:05 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-04-24 01:47:05 -0400 |
commit | 11de76b9214a59930ac8d8c031880b5bd293973d (patch) | |
tree | 53dac76c223788a8b225cd504f59811eef49ae64 /gr-qtgui/lib/TimeDomainDisplayPlot.cc | |
parent | 43a3a7296412dc52216e7f63856a86945f4ba438 (diff) |
gr-qtgui: adding function and slot to set a time display curve's color.
Diffstat (limited to 'gr-qtgui/lib/TimeDomainDisplayPlot.cc')
-rw-r--r-- | gr-qtgui/lib/TimeDomainDisplayPlot.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc index ee13a7dcee..f635a2b0ce 100644 --- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc +++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc @@ -213,6 +213,12 @@ TimeDomainDisplayPlot::setTitle(int which, QString title) _plot_curve[which]->setTitle(title); } +void +TimeDomainDisplayPlot::setColor(int which, QString color) +{ + _plot_curve[which]->setPen(QPen(color)); +} + void TimeDomainDisplayPlot::replot() { QwtPlot::replot(); @@ -221,7 +227,8 @@ void TimeDomainDisplayPlot::replot() void TimeDomainDisplayPlot::resizeSlot( QSize *s ) { - resize(s->width(), s->height()); + // -10 is to spare some room for the legend and x-axis label + resize(s->width()-10, s->height()-10); } void TimeDomainDisplayPlot::PlotNewData(const std::vector<double*> dataPoints, |