[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10923 - gnuradio/trunk/gr-qtgui/src/lib
From: |
trondeau |
Subject: |
[Commit-gnuradio] r10923 - gnuradio/trunk/gr-qtgui/src/lib |
Date: |
Sun, 26 Apr 2009 16:14:25 -0600 (MDT) |
Author: trondeau
Date: 2009-04-26 16:14:25 -0600 (Sun, 26 Apr 2009)
New Revision: 10923
Modified:
gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.h
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:
Now adding y-axis controls for frequency domain plot.
Modified: gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.cc 2009-04-26
22:00:50 UTC (rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.cc 2009-04-26
22:14:25 UTC (rev 10923)
@@ -118,7 +118,7 @@
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 @@
}
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,
Modified: gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.h 2009-04-26
22:00:50 UTC (rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/FrequencyDisplayPlot.h 2009-04-26
22:14:25 UTC (rev 10923)
@@ -39,6 +39,8 @@
virtual void replot();
+ void set_yaxis(double min, double max);
+
public slots:
void SetLowerIntensityLevel(const double);
void SetUpperIntensityLevel(const double);
Modified: gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-04-26 22:00:50 UTC
(rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-04-26 22:14:25 UTC
(rev 10923)
@@ -444,5 +444,10 @@
}
+void
+SpectrumGUIClass::SetFrequencyAxis(double min, double max)
+{
+ _spectrumDisplayForm->SetFrequencyAxis(min, max);
+}
#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 22:00:50 UTC
(rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.h 2009-04-26 22:14:25 UTC
(rev 10923)
@@ -73,6 +73,7 @@
void SetTimeDomainAxis(double min, double max);
void SetConstellationAxis(double xmin, double xmax,
double ymin, double ymax);
+ void SetFrequencyAxis(double min, double max);
protected:
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui.i 2009-04-26 22:00:50 UTC (rev
10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui.i 2009-04-26 22:14:25 UTC (rev
10923)
@@ -65,6 +65,7 @@
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 @@
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);
};
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc 2009-04-26 22:00:50 UTC
(rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc 2009-04-26 22:14:25 UTC
(rev 10923)
@@ -176,6 +176,12 @@
}
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()) {
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h 2009-04-26 22:00:50 UTC
(rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h 2009-04-26 22:14:25 UTC
(rev 10923)
@@ -103,6 +103,7 @@
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;
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc 2009-04-26 22:00:50 UTC
(rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.cc 2009-04-26 22:14:25 UTC
(rev 10923)
@@ -174,6 +174,12 @@
}
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()) {
Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h 2009-04-26 22:00:50 UTC
(rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_f.h 2009-04-26 22:14:25 UTC
(rev 10923)
@@ -103,6 +103,7 @@
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;
Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc 2009-04-26
22:00:50 UTC (rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc 2009-04-26
22:14:25 UTC (rev 10923)
@@ -870,3 +870,9 @@
{
_constellationDisplayPlot->set_axis(xmin, xmax, ymin, ymax);
}
+
+void
+SpectrumDisplayForm::SetFrequencyAxis(double min, double max)
+{
+ _frequencyDisplayPlot->set_yaxis(min, max);
+}
Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h 2009-04-26
22:00:50 UTC (rev 10922)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.h 2009-04-26
22:14:25 UTC (rev 10923)
@@ -67,6 +67,7 @@
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* );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10923 - gnuradio/trunk/gr-qtgui/src/lib,
trondeau <=