diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-06-24 16:06:38 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-06-24 16:06:38 -0400 |
commit | d97764ce6040aff8023b43323b4bc048a907a1fd (patch) | |
tree | dda4ba74128454fd271ffe7dcbe673f2ae0b4c08 /gr-qtgui/lib/TimeDomainDisplayPlot.cc | |
parent | b142f64573b8b7b15a94fc9c64e2f26264a5b144 (diff) | |
parent | bf8700a226091c5ce0130a3819a4c12b9d9981a6 (diff) |
Merge branch 'master' into my_qtsink
Conflicts:
gr-qtgui/include/qtgui_sink_c.h
gr-qtgui/include/qtgui_sink_f.h
gr-qtgui/include/qtgui_util.h
gr-qtgui/lib/ConstellationDisplayPlot.cc
gr-qtgui/lib/FrequencyDisplayPlot.cc
gr-qtgui/lib/SpectrumGUIClass.cc
gr-qtgui/lib/TimeDomainDisplayPlot.cc
gr-qtgui/lib/WaterfallDisplayPlot.cc
gr-qtgui/lib/qtgui_sink_c.cc
gr-qtgui/lib/qtgui_sink_f.cc
gr-qtgui/lib/spectrumdisplayform.cc
Diffstat (limited to 'gr-qtgui/lib/TimeDomainDisplayPlot.cc')
-rw-r--r-- | gr-qtgui/lib/TimeDomainDisplayPlot.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc index 7cd803a509..e71c9b7075 100644 --- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc +++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -68,7 +68,7 @@ public: virtual ~TimeDomainDisplayZoomer(){ } - + virtual void updateTrackerText(){ updateDisplay(); } @@ -115,7 +115,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) #else QwtPainter::setPolylineSplitting(false); #endif - + #if QWT_VERSION < 0x060000 // We don't need the cache here canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false); @@ -124,7 +124,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) QPalette palette; palette.setColor(canvas()->backgroundRole(), QColor("white")); - canvas()->setPalette(palette); + canvas()->setPalette(palette); setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine); setXaxis(0, _numPoints); @@ -155,7 +155,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) #else _plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints); #endif -} + } _sampleRate = 1; _resetXAxisPoints(); @@ -200,7 +200,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) legendDisplay->setItemMode(QwtLegend::CheckableItem); insertLegend(legendDisplay); - connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ), + connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ), this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) )); } @@ -272,7 +272,7 @@ void TimeDomainDisplayPlot::PlotNewData(const std::vector<double*> dataPoints, _plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints); #endif } - + setXaxis(0, numDataPoints); _resetXAxisPoints(); } @@ -306,6 +306,7 @@ void TimeDomainDisplayPlot::_resetXAxisPoints() void TimeDomainDisplayPlot::LegendEntryChecked(QwtPlotItem* plotItem, bool on) { plotItem->setVisible(!on); + replot(); } void @@ -316,7 +317,7 @@ TimeDomainDisplayPlot::SetSampleRate(double sr, double units, if(newsr != _sampleRate) { _sampleRate = sr/units; _resetXAxisPoints(); - + // While we could change the displayed sigfigs based on the unit being // displayed, I think it looks better by just setting it to 4 regardless. //double display_units = ceil(log10(units)/2.0); |