commit-gnuradio
[Top][All Lists]
Advanced

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

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


From: trondeau
Subject: [Commit-gnuradio] r10922 - gnuradio/trunk/gr-qtgui/src/lib
Date: Sun, 26 Apr 2009 16:00:50 -0600 (MDT)

Author: trondeau
Date: 2009-04-26 16:00:50 -0600 (Sun, 26 Apr 2009)
New Revision: 10922

Modified:
   gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
   gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h
   gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
   gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
   gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
   gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc
   gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h
   gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
   gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h
Log:
Bringing out set axis function to the qtgui sinks for user-settable axis ranges.

Modified: gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-04-26 21:36:45 UTC 
(rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-04-26 22:00:50 UTC 
(rev 10922)
@@ -430,5 +430,19 @@
   return (QWidget*)_spectrumDisplayForm;
 }
 
+void
+SpectrumGUIClass::SetTimeDomainAxis(double min, double max)
+{
+  _spectrumDisplayForm->SetTimeDomainAxis(min, max);
+}
 
+void
+SpectrumGUIClass::SetConstellationAxis(double xmin, double xmax,
+                                      double ymin, double ymax)
+{
+  _spectrumDisplayForm->SetConstellationAxis(xmin, xmax, ymin, ymax);
+
+}
+
+
 #endif /* SPECTRUM_GUI_CLASS_CPP */

Modified: gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h  2009-04-26 21:36:45 UTC 
(rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h  2009-04-26 22:00:50 UTC 
(rev 10922)
@@ -70,6 +70,10 @@
 
   QWidget* qwidget();
 
+  void SetTimeDomainAxis(double min, double max);
+  void SetConstellationAxis(double xmin, double xmax,
+                           double ymin, double ymax);
+
 protected:
 
 private:

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui.i     2009-04-26 21:36:45 UTC (rev 
10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui.i     2009-04-26 22:00:50 UTC (rev 
10922)
@@ -62,6 +62,9 @@
   void set_frequency_range(const double centerfreq,
                           const double startfreq,
                           const double stopfreq);
+  void set_time_domain_axis(double min, double max);
+  void set_constellation_axis(double xmin, double xmax,
+                             double ymin, double ymax);
 };
 
 
@@ -100,5 +103,12 @@
 public:
   void exec_();
   PyObject* pyqwidget();
+
+  void set_frequency_range(const double centerfreq,
+                          const double startfreq,
+                          const double stopfreq);
+  void set_time_domain_axis(double min, double max);
+  void set_constellation_axis(double xmin, double xmax,
+                             double ymin, double ymax);
 };
 

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc     2009-04-26 21:36:45 UTC 
(rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc     2009-04-26 22:00:50 UTC 
(rev 10922)
@@ -163,6 +163,19 @@
 }
 
 void
+qtgui_sink_c::set_time_domain_axis(double min, double max)
+{
+  d_main_gui->SetTimeDomainAxis(min, max);
+}
+
+void
+qtgui_sink_c::set_constellation_axis(double xmin, double xmax,
+                                    double ymin, double ymax)
+{
+  d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax);
+}
+
+void
 qtgui_sink_c::fft(const gr_complex *data_in, int size, gr_complex *data_out)
 {
   if (d_window.size()) {

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h      2009-04-26 21:36:45 UTC 
(rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h      2009-04-26 22:00:50 UTC 
(rev 10922)
@@ -100,6 +100,10 @@
                           const double startfreq,
                           const double stopfreq);
 
+  void set_time_domain_axis(double min, double max);
+  void set_constellation_axis(double xmin, double xmax,
+                             double ymin, double ymax);
+
   QApplication *d_qApplication;
   qtgui_obj *d_object;
 

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc     2009-04-26 21:36:45 UTC 
(rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc     2009-04-26 22:00:50 UTC 
(rev 10922)
@@ -161,6 +161,19 @@
 }
 
 void
+qtgui_sink_f::set_time_domain_axis(double min, double max)
+{
+  d_main_gui->SetTimeDomainAxis(min, max);
+}
+
+void
+qtgui_sink_f::set_constellation_axis(double xmin, double xmax,
+                                    double ymin, double ymax)
+{
+  d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax);
+}
+
+void
 qtgui_sink_f::fft(const float *data_in, int size, gr_complex *data_out)
 {
   if (d_window.size()) {

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h      2009-04-26 21:36:45 UTC 
(rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h      2009-04-26 22:00:50 UTC 
(rev 10922)
@@ -100,6 +100,10 @@
                           const double startfreq,
                           const double stopfreq);
 
+  void set_time_domain_axis(double min, double max);
+  void set_constellation_axis(double xmin, double xmax,
+                             double ymin, double ymax);
+
   QApplication *d_qApplication;
   qtgui_obj *d_object;
 

Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc      2009-04-26 
21:36:45 UTC (rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc      2009-04-26 
22:00:50 UTC (rev 10922)
@@ -856,3 +856,17 @@
     d_plot_constellation = -1;
   }
 }
+
+
+void
+SpectrumDisplayForm::SetTimeDomainAxis(double min, double max)
+{
+  _timeDomainDisplayPlot->set_yaxis(min, max);
+}
+
+void
+SpectrumDisplayForm::SetConstellationAxis(double xmin, double xmax,
+                                               double ymin, double ymax)
+{
+  _constellationDisplayPlot->set_axis(xmin, xmax, ymin, ymax);
+}

Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h       2009-04-26 
21:36:45 UTC (rev 10921)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h       2009-04-26 
22:00:50 UTC (rev 10922)
@@ -64,6 +64,9 @@
   void ToggleTabTime(const bool state);
   void ToggleTabConstellation(const bool state);
 
+  void SetTimeDomainAxis(double min, double max);
+  void SetConstellationAxis(double xmin, double xmax,
+                           double ymin, double ymax);
 
 private slots:
   void newFrequencyData( const SpectrumUpdateEvent* );





reply via email to

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