commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10921 - gnuradio/trunk/gr-qtgui/src/lib


From: trondeau
Subject: [Commit-gnuradio] r10921 - gnuradio/trunk/gr-qtgui/src/lib
Date: Sun, 26 Apr 2009 15:36:45 -0600 (MDT)

Author: trondeau
Date: 2009-04-26 15:36:45 -0600 (Sun, 26 Apr 2009)
New Revision: 10921

Modified:
   gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
   gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h
   gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc
   gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
Log:
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.

Modified: gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc 2009-04-26 
21:31:06 UTC (rev 10920)
+++ gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.cc 2009-04-26 
21:36:45 UTC (rev 10921)
@@ -55,11 +55,13 @@
   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,8 +114,26 @@
   // _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(){
 
   const timespec startTime = get_highres_clock();

Modified: gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h  2009-04-26 
21:31:06 UTC (rev 10920)
+++ gnuradio/trunk/gr-qtgui/src/lib/ConstellationDisplayPlot.h  2009-04-26 
21:36:45 UTC (rev 10921)
@@ -25,6 +25,11 @@
     
   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);
 

Modified: gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc    2009-04-26 
21:31:06 UTC (rev 10920)
+++ gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc    2009-04-26 
21:36:45 UTC (rev 10921)
@@ -60,7 +60,7 @@
   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,8 +125,12 @@
   // _zoomer and _panner deleted when parent deleted
 }
 
+void
+TimeDomainDisplayPlot::set_yaxis(double min, double max)
+{
+  setAxisScale(QwtPlot::yLeft, min, max);
+}
 
-
 void TimeDomainDisplayPlot::replot(){
 
   const timespec startTime = get_highres_clock();

Modified: gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.h     2009-04-26 
21:31:06 UTC (rev 10920)
+++ gnuradio/trunk/gr-qtgui/src/lib/TimeDomainDisplayPlot.h     2009-04-26 
21:36:45 UTC (rev 10921)
@@ -26,6 +26,8 @@
                                   
   virtual void replot();
 
+  void set_yaxis(double min, double max);
+
 protected slots:
   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]