Opening up the time domain and constellations plots a bit and adding accessor functio...
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 26 Apr 2009 21:36:45 +0000 (21:36 +0000)
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 26 Apr 2009 21:36:45 +0000 (21:36 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10921 221aa14e-8319-0410-a670-987f0aec2ac5

gr-qtgui/src/lib/ConstellationDisplayPlot.cc
gr-qtgui/src/lib/ConstellationDisplayPlot.h
gr-qtgui/src/lib/TimeDomainDisplayPlot.cc
gr-qtgui/src/lib/TimeDomainDisplayPlot.h

index 6f423d9aa18a012e3cd3db68132c02efd75ecb37..10355f9f0bf4eccd12510ddb2e2f87d01e5d14b3 100644 (file)
@@ -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(){
 
index d7604ea84535ddaf74c6b63f8f335a9e7495dabc..20de2164ab9e028f79b2bc778e827f801eaffe71 100644 (file)
@@ -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);
 
index d8abffafa7874939dfd734442b06ece116455aa9..42f827d9ab920a414d5f3adb288713678bf37861 100644 (file)
@@ -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(){
 
index 0a10be1741f256ec6dbc266d49cdaae0939703fe..9f0ecfa26de08e489dbbe1daa113978c72e24444 100644 (file)
@@ -26,6 +26,8 @@ public:
                                   
   virtual void replot();
 
+  void set_yaxis(double min, double max);
+
 protected slots:
   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);