diff options
Diffstat (limited to 'gr-qtgui')
-rw-r--r-- | gr-qtgui/src/lib/FrequencyDisplayPlot.cc | 8 | ||||
-rw-r--r-- | gr-qtgui/src/lib/FrequencyDisplayPlot.h | 2 | ||||
-rw-r--r-- | gr-qtgui/src/lib/SpectrumGUIClass.cc | 5 | ||||
-rw-r--r-- | gr-qtgui/src/lib/SpectrumGUIClass.h | 1 | ||||
-rw-r--r-- | gr-qtgui/src/lib/qtgui.i | 2 | ||||
-rw-r--r-- | gr-qtgui/src/lib/qtgui_sink_c.cc | 6 | ||||
-rw-r--r-- | gr-qtgui/src/lib/qtgui_sink_c.h | 1 | ||||
-rw-r--r-- | gr-qtgui/src/lib/qtgui_sink_f.cc | 6 | ||||
-rw-r--r-- | gr-qtgui/src/lib/qtgui_sink_f.h | 1 | ||||
-rw-r--r-- | gr-qtgui/src/lib/spectrumdisplayform.cc | 6 | ||||
-rw-r--r-- | gr-qtgui/src/lib/spectrumdisplayform.h | 1 |
11 files changed, 38 insertions, 1 deletions
diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot.cc b/gr-qtgui/src/lib/FrequencyDisplayPlot.cc index 4f9bfdd95..63d68b9b3 100644 --- a/gr-qtgui/src/lib/FrequencyDisplayPlot.cc +++ b/gr-qtgui/src/lib/FrequencyDisplayPlot.cc @@ -118,7 +118,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent) setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)"); setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine); - setAxisScale(QwtPlot::yLeft, -210, 5); + set_yaxis(-210, 5); setAxisTitle(QwtPlot::yLeft, "Power (dB)"); // Automatically deleted when parent is deleted @@ -223,6 +223,12 @@ FrequencyDisplayPlot::~FrequencyDisplayPlot() } void +FrequencyDisplayPlot::set_yaxis(double min, double max) +{ + setAxisScale(QwtPlot::yLeft, min, max); +} + +void FrequencyDisplayPlot::SetFrequencyRange(const double constStartFreq, const double constStopFreq, const double constCenterFreq, diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot.h b/gr-qtgui/src/lib/FrequencyDisplayPlot.h index 061ef6ef8..31f2055b4 100644 --- a/gr-qtgui/src/lib/FrequencyDisplayPlot.h +++ b/gr-qtgui/src/lib/FrequencyDisplayPlot.h @@ -39,6 +39,8 @@ public: virtual void replot(); + void set_yaxis(double min, double max); + public slots: void SetLowerIntensityLevel(const double); void SetUpperIntensityLevel(const double); diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.cc b/gr-qtgui/src/lib/SpectrumGUIClass.cc index 58a4e78bc..e3af3b76d 100644 --- a/gr-qtgui/src/lib/SpectrumGUIClass.cc +++ b/gr-qtgui/src/lib/SpectrumGUIClass.cc @@ -444,5 +444,10 @@ SpectrumGUIClass::SetConstellationAxis(double xmin, double xmax, } +void +SpectrumGUIClass::SetFrequencyAxis(double min, double max) +{ + _spectrumDisplayForm->SetFrequencyAxis(min, max); +} #endif /* SPECTRUM_GUI_CLASS_CPP */ diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.h b/gr-qtgui/src/lib/SpectrumGUIClass.h index 8c48475c9..2bc5fb34c 100644 --- a/gr-qtgui/src/lib/SpectrumGUIClass.h +++ b/gr-qtgui/src/lib/SpectrumGUIClass.h @@ -73,6 +73,7 @@ public: void SetTimeDomainAxis(double min, double max); void SetConstellationAxis(double xmin, double xmax, double ymin, double ymax); + void SetFrequencyAxis(double min, double max); protected: diff --git a/gr-qtgui/src/lib/qtgui.i b/gr-qtgui/src/lib/qtgui.i index b2b283fd5..ae7d8a6a4 100644 --- a/gr-qtgui/src/lib/qtgui.i +++ b/gr-qtgui/src/lib/qtgui.i @@ -65,6 +65,7 @@ public: void set_time_domain_axis(double min, double max); void set_constellation_axis(double xmin, double xmax, double ymin, double ymax); + void set_frequency_axis(double min, double max); }; @@ -110,5 +111,6 @@ public: void set_time_domain_axis(double min, double max); void set_constellation_axis(double xmin, double xmax, double ymin, double ymax); + void set_frequency_axis(double min, double max); }; diff --git a/gr-qtgui/src/lib/qtgui_sink_c.cc b/gr-qtgui/src/lib/qtgui_sink_c.cc index c723f1082..bfdb25e32 100644 --- a/gr-qtgui/src/lib/qtgui_sink_c.cc +++ b/gr-qtgui/src/lib/qtgui_sink_c.cc @@ -176,6 +176,12 @@ qtgui_sink_c::set_constellation_axis(double xmin, double xmax, } void +qtgui_sink_c::set_frequency_axis(double min, double max) +{ + d_main_gui->SetFrequencyAxis(min, max); +} + +void qtgui_sink_c::fft(const gr_complex *data_in, int size, gr_complex *data_out) { if (d_window.size()) { diff --git a/gr-qtgui/src/lib/qtgui_sink_c.h b/gr-qtgui/src/lib/qtgui_sink_c.h index 0b9184655..7618bae95 100644 --- a/gr-qtgui/src/lib/qtgui_sink_c.h +++ b/gr-qtgui/src/lib/qtgui_sink_c.h @@ -103,6 +103,7 @@ public: void set_time_domain_axis(double min, double max); void set_constellation_axis(double xmin, double xmax, double ymin, double ymax); + void set_frequency_axis(double min, double max); QApplication *d_qApplication; qtgui_obj *d_object; diff --git a/gr-qtgui/src/lib/qtgui_sink_f.cc b/gr-qtgui/src/lib/qtgui_sink_f.cc index 9491b76a7..1f76bb359 100644 --- a/gr-qtgui/src/lib/qtgui_sink_f.cc +++ b/gr-qtgui/src/lib/qtgui_sink_f.cc @@ -174,6 +174,12 @@ qtgui_sink_f::set_constellation_axis(double xmin, double xmax, } void +qtgui_sink_f::set_frequency_axis(double min, double max) +{ + d_main_gui->SetFrequencyAxis(min, max); +} + +void qtgui_sink_f::fft(const float *data_in, int size, gr_complex *data_out) { if (d_window.size()) { diff --git a/gr-qtgui/src/lib/qtgui_sink_f.h b/gr-qtgui/src/lib/qtgui_sink_f.h index 676a3f80b..31baa1def 100644 --- a/gr-qtgui/src/lib/qtgui_sink_f.h +++ b/gr-qtgui/src/lib/qtgui_sink_f.h @@ -103,6 +103,7 @@ public: void set_time_domain_axis(double min, double max); void set_constellation_axis(double xmin, double xmax, double ymin, double ymax); + void set_frequency_axis(double min, double max); QApplication *d_qApplication; qtgui_obj *d_object; diff --git a/gr-qtgui/src/lib/spectrumdisplayform.cc b/gr-qtgui/src/lib/spectrumdisplayform.cc index 523fe51bf..b8e3982df 100644 --- a/gr-qtgui/src/lib/spectrumdisplayform.cc +++ b/gr-qtgui/src/lib/spectrumdisplayform.cc @@ -870,3 +870,9 @@ SpectrumDisplayForm::SetConstellationAxis(double xmin, double xmax, { _constellationDisplayPlot->set_axis(xmin, xmax, ymin, ymax); } + +void +SpectrumDisplayForm::SetFrequencyAxis(double min, double max) +{ + _frequencyDisplayPlot->set_yaxis(min, max); +} diff --git a/gr-qtgui/src/lib/spectrumdisplayform.h b/gr-qtgui/src/lib/spectrumdisplayform.h index a623776c6..aed5d728e 100644 --- a/gr-qtgui/src/lib/spectrumdisplayform.h +++ b/gr-qtgui/src/lib/spectrumdisplayform.h @@ -67,6 +67,7 @@ public slots: void SetTimeDomainAxis(double min, double max); void SetConstellationAxis(double xmin, double xmax, double ymin, double ymax); + void SetFrequencyAxis(double min, double max); private slots: void newFrequencyData( const SpectrumUpdateEvent* ); |