diff options
author | trondeau | 2009-04-26 21:36:45 +0000 |
---|---|---|
committer | trondeau | 2009-04-26 21:36:45 +0000 |
commit | 9c3692b179b273ab6c21c3546c02c8b9226db13b (patch) | |
tree | 280eca27d468a59011014001920de3d446d11c04 | |
parent | 0e7cf5c9b06d8ae234aed507ca9551a49da6bf67 (diff) | |
download | gnuradio-9c3692b179b273ab6c21c3546c02c8b9226db13b.tar.gz gnuradio-9c3692b179b273ab6c21c3546c02c8b9226db13b.tar.bz2 gnuradio-9c3692b179b273ab6c21c3546c02c8b9226db13b.zip |
Opening up the time domain and constellations plots a bit and adding accessor functions to set these values. These will be made accessible through the qtsink to be user-settable.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10921 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r-- | gr-qtgui/src/lib/ConstellationDisplayPlot.cc | 24 | ||||
-rw-r--r-- | gr-qtgui/src/lib/ConstellationDisplayPlot.h | 5 | ||||
-rw-r--r-- | gr-qtgui/src/lib/TimeDomainDisplayPlot.cc | 8 | ||||
-rw-r--r-- | gr-qtgui/src/lib/TimeDomainDisplayPlot.h | 2 |
4 files changed, 35 insertions, 4 deletions
diff --git a/gr-qtgui/src/lib/ConstellationDisplayPlot.cc b/gr-qtgui/src/lib/ConstellationDisplayPlot.cc index 6f423d9aa..10355f9f0 100644 --- a/gr-qtgui/src/lib/ConstellationDisplayPlot.cc +++ b/gr-qtgui/src/lib/ConstellationDisplayPlot.cc @@ -55,11 +55,13 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent):QwtPlot(pare canvas()->setPalette(palette); setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine); - setAxisScale(QwtPlot::xBottom, -1.0, 1.0); + //setAxisScale(QwtPlot::xBottom, -1.0, 1.0); + set_xaxis(-2.0, 2.0); setAxisTitle(QwtPlot::xBottom, "In-phase"); setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine); - setAxisScale(QwtPlot::yLeft, -1.0, 1.0); + //setAxisScale(QwtPlot::yLeft, -1.0, 1.0); + set_yaxis(-2.0, 2.0); setAxisTitle(QwtPlot::yLeft, "Quadrature"); // Automatically deleted when parent is deleted @@ -112,7 +114,25 @@ ConstellationDisplayPlot::~ConstellationDisplayPlot(){ // _zoomer and _panner deleted when parent deleted } +void +ConstellationDisplayPlot::set_xaxis(double min, double max) +{ + setAxisScale(QwtPlot::xBottom, min, max); +} +void +ConstellationDisplayPlot::set_yaxis(double min, double max) +{ + setAxisScale(QwtPlot::yLeft, min, max); +} + +void +ConstellationDisplayPlot::set_axis(double xmin, double xmax, + double ymin, double ymax) +{ + set_xaxis(xmin, xmax); + set_yaxis(ymin, ymax); +} void ConstellationDisplayPlot::replot(){ diff --git a/gr-qtgui/src/lib/ConstellationDisplayPlot.h b/gr-qtgui/src/lib/ConstellationDisplayPlot.h index d7604ea84..20de2164a 100644 --- a/gr-qtgui/src/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/src/lib/ConstellationDisplayPlot.h @@ -25,6 +25,11 @@ public: virtual void replot(); + void set_xaxis(double min, double max); + void set_yaxis(double min, double max); + void set_axis(double xmin, double xmax, + double ymin, double ymax); + protected slots: void LegendEntryChecked(QwtPlotItem *plotItem, bool on); diff --git a/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc index d8abffafa..42f827d9a 100644 --- a/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc +++ b/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc @@ -60,7 +60,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent){ setAxisTitle(QwtPlot::xBottom, "Sample Number"); setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine); - setAxisScale(QwtPlot::yLeft, -1.0, 1.0); + set_yaxis(-2.0, 2.0); setAxisTitle(QwtPlot::yLeft, "Normalized Voltage"); // Automatically deleted when parent is deleted @@ -125,7 +125,11 @@ TimeDomainDisplayPlot::~TimeDomainDisplayPlot(){ // _zoomer and _panner deleted when parent deleted } - +void +TimeDomainDisplayPlot::set_yaxis(double min, double max) +{ + setAxisScale(QwtPlot::yLeft, min, max); +} void TimeDomainDisplayPlot::replot(){ diff --git a/gr-qtgui/src/lib/TimeDomainDisplayPlot.h b/gr-qtgui/src/lib/TimeDomainDisplayPlot.h index 0a10be174..9f0ecfa26 100644 --- a/gr-qtgui/src/lib/TimeDomainDisplayPlot.h +++ b/gr-qtgui/src/lib/TimeDomainDisplayPlot.h @@ -26,6 +26,8 @@ public: virtual void replot(); + void set_yaxis(double min, double max); + protected slots: void LegendEntryChecked(QwtPlotItem *plotItem, bool on); |