Bringing out set axis function to the qtgui sinks for user-settable axis ranges.
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 26 Apr 2009 22:00:50 +0000 (22:00 +0000)
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 26 Apr 2009 22:00:50 +0000 (22:00 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10922 221aa14e-8319-0410-a670-987f0aec2ac5

gr-qtgui/src/lib/SpectrumGUIClass.cc
gr-qtgui/src/lib/SpectrumGUIClass.h
gr-qtgui/src/lib/qtgui.i
gr-qtgui/src/lib/qtgui_sink_c.cc
gr-qtgui/src/lib/qtgui_sink_c.h
gr-qtgui/src/lib/qtgui_sink_f.cc
gr-qtgui/src/lib/qtgui_sink_f.h
gr-qtgui/src/lib/spectrumdisplayform.cc
gr-qtgui/src/lib/spectrumdisplayform.h

index 06450845a151f771aeb7c287b66e04d6d0d32523..58a4e78bc6cc08361f58fb9cb0b25e3142035ca3 100644 (file)
@@ -430,5 +430,19 @@ SpectrumGUIClass::qwidget()
   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 */
index fafae0c6cdc79c1ab8d6294162deb6620cfa0a5f..8c48475c978cea30cf1ae4c4c60858dfd4ed0bce 100644 (file)
@@ -70,6 +70,10 @@ public:
 
   QWidget* qwidget();
 
+  void SetTimeDomainAxis(double min, double max);
+  void SetConstellationAxis(double xmin, double xmax,
+                           double ymin, double ymax);
+
 protected:
 
 private:
index 1113d647c4e89b6338dd2838bd0edb61a80dec22..b2b283fd50f6ddaa51d49d684d12a41f325886e1 100644 (file)
@@ -62,6 +62,9 @@ public:
   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 @@ private:
 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);
 };
 
index a2b1366e5931cde6f8ec9f15c5db1e49d17fbb94..c723f10823e0e46d71be236d1f182641ea19df9c 100644 (file)
@@ -162,6 +162,19 @@ qtgui_sink_c::set_frequency_range(const double centerfreq,
   d_main_gui->SetFrequencyRange(centerfreq, startfreq, stopfreq);
 }
 
+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)
 {
index 305b1cf260e618ff32fcb935aa3a151a92934edd..0b918465519c49d7ebf96c1b077fc82b8811769d 100644 (file)
@@ -100,6 +100,10 @@ public:
                           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;
 
index 94d4cf27999484877c46525d4bd59d14f3cbbe1e..9491b76a7dc42c31269956f69916bcc7100afe63 100644 (file)
@@ -160,6 +160,19 @@ qtgui_sink_f::set_frequency_range(const double centerfreq,
   d_main_gui->SetFrequencyRange(centerfreq, startfreq, stopfreq);
 }
 
+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)
 {
index f220bc6c162a8c0ea483e4a6bceadab6be90d66e..676a3f80b8d80d12ca1c6fd768a01a28d8d9ff6c 100644 (file)
@@ -100,6 +100,10 @@ public:
                           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;
 
index 3249463d7e41a153e28c6faa2cd05f3ac7a32313..523fe51bf9ae74f03ec0a385ec7f1df5c87984e3 100644 (file)
@@ -856,3 +856,17 @@ SpectrumDisplayForm::ToggleTabConstellation(const bool state)
     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);
+}
index eba087bf5f36d994dfad798e0b45550542323eb2..a623776c6d1b8e35db06ebb3ff3ef16d9686ae61 100644 (file)
@@ -64,6 +64,9 @@ public slots:
   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* );