summaryrefslogtreecommitdiff
path: root/gr-qtgui/include
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/include')
-rw-r--r--gr-qtgui/include/qtgui/CMakeLists.txt (renamed from gr-qtgui/include/CMakeLists.txt)23
-rw-r--r--gr-qtgui/include/qtgui/api.h (renamed from gr-qtgui/include/gr_qtgui_api.h)10
-rw-r--r--gr-qtgui/include/qtgui/const_sink_c.h97
-rw-r--r--gr-qtgui/include/qtgui/freq_sink_c.h112
-rw-r--r--gr-qtgui/include/qtgui/freq_sink_f.h111
-rw-r--r--gr-qtgui/include/qtgui/sink_c.h97
-rw-r--r--gr-qtgui/include/qtgui/sink_f.h97
-rw-r--r--gr-qtgui/include/qtgui/time_raster_sink_b.h120
-rw-r--r--gr-qtgui/include/qtgui/time_raster_sink_f.h117
-rw-r--r--gr-qtgui/include/qtgui/time_sink_c.h105
-rw-r--r--gr-qtgui/include/qtgui/time_sink_f.h103
-rw-r--r--gr-qtgui/include/qtgui/utils.h (renamed from gr-qtgui/include/qtgui_util.h)22
-rw-r--r--gr-qtgui/include/qtgui/waterfall_sink_c.h118
-rw-r--r--gr-qtgui/include/qtgui/waterfall_sink_f.h117
-rw-r--r--gr-qtgui/include/qtgui_sink_c.h128
-rw-r--r--gr-qtgui/include/qtgui_sink_f.h125
-rw-r--r--gr-qtgui/include/qtgui_time_sink_c.h101
-rw-r--r--gr-qtgui/include/qtgui_time_sink_f.h99
18 files changed, 1224 insertions, 478 deletions
diff --git a/gr-qtgui/include/CMakeLists.txt b/gr-qtgui/include/qtgui/CMakeLists.txt
index ef4cb11752..f3ef6808e8 100644
--- a/gr-qtgui/include/CMakeLists.txt
+++ b/gr-qtgui/include/qtgui/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Free Software Foundation, Inc.
+# Copyright 2010-2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,12 +21,19 @@
# Install the header files
########################################################################
install(FILES
- gr_qtgui_api.h
- qtgui_time_sink_c.h
- qtgui_time_sink_f.h
- qtgui_sink_c.h
- qtgui_sink_f.h
- qtgui_util.h
- DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ api.h
+ time_sink_c.h
+ time_sink_f.h
+ time_raster_sink_b.h
+ time_raster_sink_f.h
+ freq_sink_c.h
+ freq_sink_f.h
+ const_sink_c.h
+ waterfall_sink_c.h
+ waterfall_sink_f.h
+ sink_c.h
+ sink_f.h
+ utils.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/qtgui
COMPONENT "qtgui_devel"
)
diff --git a/gr-qtgui/include/gr_qtgui_api.h b/gr-qtgui/include/qtgui/api.h
index c39add1e82..e88948e07b 100644
--- a/gr-qtgui/include/gr_qtgui_api.h
+++ b/gr-qtgui/include/qtgui/api.h
@@ -19,15 +19,15 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_GR_QTGUI_API_H
-#define INCLUDED_GR_QTGUI_API_H
+#ifndef INCLUDED_QTGUI_API_H
+#define INCLUDED_QTGUI_API_H
#include <gruel/attributes.h>
#ifdef gnuradio_qtgui_EXPORTS
-# define GR_QTGUI_API __GR_ATTR_EXPORT
+# define QTGUI_API __GR_ATTR_EXPORT
#else
-# define GR_QTGUI_API __GR_ATTR_IMPORT
+# define QTGUI_API __GR_ATTR_IMPORT
#endif
-#endif /* INCLUDED_GR_QTGUI_API_H */
+#endif /* INCLUDED_QTGUI_API_H */
diff --git a/gr-qtgui/include/qtgui/const_sink_c.h b/gr-qtgui/include/qtgui/const_sink_c.h
new file mode 100644
index 0000000000..e0c358bcad
--- /dev/null
+++ b/gr-qtgui/include/qtgui/const_sink_c.h
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_CONST_SINK_C_H
+#define INCLUDED_QTGUI_CONST_SINK_C_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <filter/firdes.h>
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display the IQ constellation of multiple signals.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a complex
+ * streams and plots them on an IQ constellation plot.
+ */
+ class QTGUI_API const_sink_c : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::const_sink_c::sptr
+ typedef boost::shared_ptr<const_sink_c> sptr;
+
+ /*!
+ * \brief Build a complex PSD sink.
+ *
+ * \param size number of points to plot at once
+ * \param name title for the plot
+ * \param nconnections number of signals connected to sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int size,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_y_axis(double min, double max) = 0;
+ virtual void set_x_axis(double min, double max) = 0;
+
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &label) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, int style) = 0;
+ virtual void set_line_marker(int which, int marker) = 0;
+ virtual void set_nsamps(const int newsize) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_autoscale(bool en) = 0;
+ virtual int nsamps() const = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_CONST_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui/freq_sink_c.h b/gr-qtgui/include/qtgui/freq_sink_c.h
new file mode 100644
index 0000000000..79d3f2e8f0
--- /dev/null
+++ b/gr-qtgui/include/qtgui/freq_sink_c.h
@@ -0,0 +1,112 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_FREQ_SINK_C_H
+#define INCLUDED_QTGUI_FREQ_SINK_C_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <filter/firdes.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals in frequency.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a complex
+ * streams and plots the PSD. Each signal is plotted with a
+ * different color, and the \a set_title and \a set_color
+ * functions can be used to change the lable and color for a given
+ * input number.
+ */
+ class QTGUI_API freq_sink_c : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::freq_sink_c::sptr
+ typedef boost::shared_ptr<freq_sink_c> sptr;
+
+ /*!
+ * \brief Build a complex PSD sink.
+ *
+ * \param fftsize size of the FFT to compute and display
+ * \param wintype type of window to apply (see filter/firdes.h)
+ * \param fc center frequency of signal (use for x-axis labels)
+ * \param bw bandwidth of signal (used to set x-axis labels)
+ * \param name title for the plot
+ * \param nconnections number of signals connected to sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int fftsize, int wintype,
+ double fc, double bw,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_fft_size(const int fftsize) = 0;
+ virtual int fft_size() const = 0;
+ virtual void set_fft_average(const float fftavg) = 0;
+ virtual float fft_average() const = 0;
+ virtual void set_fft_window(const gr::filter::firdes::win_type win) = 0;
+ virtual gr::filter::firdes::win_type fft_window() = 0;
+
+ virtual void set_frequency_range(const double centerfreq, const double bandwidth) = 0;
+ virtual void set_y_axis(double min, double max) = 0;
+
+ virtual void set_update_time(double t) = 0;
+
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &label) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, int style) = 0;
+ virtual void set_line_marker(int which, int marker) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_grid(bool en=true) = 0;
+ virtual void enable_autoscale(bool en=true) = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_FREQ_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui/freq_sink_f.h b/gr-qtgui/include/qtgui/freq_sink_f.h
new file mode 100644
index 0000000000..131801f531
--- /dev/null
+++ b/gr-qtgui/include/qtgui/freq_sink_f.h
@@ -0,0 +1,111 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_FREQ_SINK_F_H
+#define INCLUDED_QTGUI_FREQ_SINK_F_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <filter/firdes.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals in frequency.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a floating
+ * point streams and plots the PSD. Each signal is plotted with a
+ * different color, and the \a set_title and \a set_color
+ * functions can be used to change the lable and color for a given
+ * input number.
+ */
+ class QTGUI_API freq_sink_f : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::freq_sink_f::sptr
+ typedef boost::shared_ptr<freq_sink_f> sptr;
+
+ /*!
+ * \brief Build a floating point PSD sink.
+ *
+ * \param fftsize size of the FFT to compute and display
+ * \param wintype type of window to apply (see filter/firdes.h)
+ * \param fc center frequency of signal (use for x-axis labels)
+ * \param bw bandwidth of signal (used to set x-axis labels)
+ * \param name title for the plot
+ * \param nconnections number of signals connected to sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int fftsize, int wintype,
+ double fc, double bw,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_fft_size(const int fftsize) = 0;
+ virtual int fft_size() const = 0;
+ virtual void set_fft_average(const float fftavg) = 0;
+ virtual float fft_average() const = 0;
+ virtual void set_fft_window(const gr::filter::firdes::win_type win) = 0;
+ virtual gr::filter::firdes::win_type fft_window() = 0;
+
+ virtual void set_frequency_range(const double centerfreq, const double bandwidth) = 0;
+ virtual void set_y_axis(double min, double max) = 0;
+
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &label) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, int style) = 0;
+ virtual void set_line_marker(int which, int marker) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_grid(bool en=true) = 0;
+ virtual void enable_autoscale(bool en=true) = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_FREQ_SINK_F_H */
diff --git a/gr-qtgui/include/qtgui/sink_c.h b/gr-qtgui/include/qtgui/sink_c.h
new file mode 100644
index 0000000000..45b980686c
--- /dev/null
+++ b/gr-qtgui/include/qtgui/sink_c.h
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2009,2011,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_SINK_C_H
+#define INCLUDED_QTGUI_SINK_C_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_block.h>
+#include <qapplication.h>
+#include <qwt_symbol.h>
+
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display freq, spec, time, and const plots.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes a complex stream and
+ * plots it. The default action is to plot the signal as a PSD (FFT),
+ * spectrogram (waterfall), time domain I&Q, and constellation (I
+ * vs. Q) plots. The plots may be turned off by setting the
+ * appropriate boolean value in the constructor to False.
+ */
+
+ class QTGUI_API sink_c : virtual public gr_block
+ {
+ public:
+ // gr::qtgui::sink_c::sptr
+ typedef boost::shared_ptr<sink_c> sptr;
+
+ /*!
+ * \brief Build a complex qtgui sink.
+ *
+ * \param fftsize size of the FFT to compute and display
+ * \param wintype type of window to apply (see filter/firdes.h)
+ * \param fc center frequency of signal (use for x-axis labels)
+ * \param bw bandwidth of signal (used to set x-axis labels)
+ * \param name title for the plot
+ * \param plotfreq Toggle frequency plot on/off
+ * \param plotwaterfall Toggle waterfall plot on/off
+ * \param plottime Toggle time plot on/off
+ * \param plotconst Toggle constellation plot on/off
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int fftsize, int wintype,
+ double fc, double bw,
+ const std::string &name,
+ bool plotfreq, bool plotwaterfall,
+ bool plottime, bool plotconst,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_fft_size(const int fftsize) = 0;
+ virtual int fft_size() const = 0;
+
+ virtual void set_frequency_range(const double centerfreq,
+ const double bandwidth) = 0;
+ virtual void set_fft_power_db(double min, double max) = 0;
+
+ //void set_time_domain_axis(double min, double max);
+ //void set_constellation_axis(double xmin, double xmax,
+ // double ymin, double ymax);
+ //void set_constellation_pen_size(int size);
+
+ virtual void set_update_time(double t) = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui/sink_f.h b/gr-qtgui/include/qtgui/sink_f.h
new file mode 100644
index 0000000000..c2bed902d9
--- /dev/null
+++ b/gr-qtgui/include/qtgui/sink_f.h
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2009,2011,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_SINK_F_H
+#define INCLUDED_QTGUI_SINK_F_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_block.h>
+#include <qapplication.h>
+#include <qwt_symbol.h>
+
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display freq, spec, and time.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes a float stream and
+ * plots it. The default action is to plot the signal as a PSD (FFT),
+ * spectrogram (waterfall), and time domain plots. The plots may be
+ * turned off by setting the appropriate boolean value in the
+ * constructor to False.
+ */
+
+ class QTGUI_API sink_f : virtual public gr_block
+ {
+ public:
+ // gr::qtgui::sink_f::sptr
+ typedef boost::shared_ptr<sink_f> sptr;
+
+ /*!
+ * \brief Build a floating point qtgui sink.
+ *
+ * \param fftsize size of the FFT to compute and display
+ * \param wintype type of window to apply (see filter/firdes.h)
+ * \param fc center frequency of signal (use for x-axis labels)
+ * \param bw bandwidth of signal (used to set x-axis labels)
+ * \param name title for the plot
+ * \param plotfreq Toggle frequency plot on/off
+ * \param plotwaterfall Toggle waterfall plot on/off
+ * \param plottime Toggle time plot on/off
+ * \param plotconst Toggle constellation plot on/off
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int fftsize, int wintype,
+ double fc, double bw,
+ const std::string &name,
+ bool plotfreq, bool plotwaterfall,
+ bool plottime, bool plotconst,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_fft_size(const int fftsize) = 0;
+ virtual int fft_size() const = 0;
+
+ virtual void set_frequency_range(const double centerfreq,
+ const double bandwidth) = 0;
+ virtual void set_fft_power_db(double min, double max) = 0;
+
+ //void set_time_domain_axis(double min, double max);
+ //void set_constellation_axis(double xmin, double xmax,
+ // double ymin, double ymax);
+ //void set_constellation_pen_size(int size);
+
+ virtual void set_update_time(double t) = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_SINK_F_H */
diff --git a/gr-qtgui/include/qtgui/time_raster_sink_b.h b/gr-qtgui/include/qtgui/time_raster_sink_b.h
new file mode 100644
index 0000000000..132ab9715c
--- /dev/null
+++ b/gr-qtgui/include/qtgui/time_raster_sink_b.h
@@ -0,0 +1,120 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_TIME_RASTER_SINK_B_H
+#define INCLUDED_QTGUI_TIME_RASTER_SINK_B_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <qwt_symbol.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals on a
+ * time_raster plot.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink that takes in byte
+ * streams and plots a time_raster (spectrogram) plot.
+ *
+ * Input stream: This expects a bit stream (0, 1 in the LSB of a
+ * byte). It will display packed bytes but the display will have
+ * to be autoscaled.
+ */
+ class QTGUI_API time_raster_sink_b : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::time_raster_sink_b::sptr
+ typedef boost::shared_ptr<time_raster_sink_b> sptr;
+
+ /*!
+ * \brief Build a bit time raster sink.
+ *
+ * \param samp_rate sample rate of signal
+ * \param cols number of cols to plot
+ * \param rows number of rows to plot
+ * \param mult vector of floats as a scaling multiplier for each input stream
+ * \param offset vector of floats as an offset for each input stream
+ * \param name title for the plot
+ * \param nconnections number of streams connected
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(double samp_rate,
+ double rows, double cols,
+ const std::vector<float> &mult,
+ const std::vector<float> &offset,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &lable) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, Qt::PenStyle style) = 0;
+ virtual void set_line_marker(int which, QwtSymbol::Style marker) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+ virtual void set_color_map(int which, const int color) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+ virtual int color_map(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void set_samp_rate(const double samp_rate) = 0;
+ virtual void set_num_rows(double rows) = 0;
+ virtual void set_num_cols(double cols) = 0;
+
+ virtual double num_rows() = 0;
+ virtual double num_cols() = 0;
+
+ virtual void set_multiplier(const std::vector<float> &mult) = 0;
+ virtual void set_offset(const std::vector<float> &offset) = 0;
+
+ virtual void set_intensity_range(float min, float max) = 0;
+
+ virtual void enable_menu(bool en) = 0;
+ virtual void enable_grid(bool en) = 0;
+ virtual void enable_autoscale(bool en) = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_TIME_RASTER_SINK_B_H */
diff --git a/gr-qtgui/include/qtgui/time_raster_sink_f.h b/gr-qtgui/include/qtgui/time_raster_sink_f.h
new file mode 100644
index 0000000000..7215373bec
--- /dev/null
+++ b/gr-qtgui/include/qtgui/time_raster_sink_f.h
@@ -0,0 +1,117 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_TIME_RASTER_SINK_F_H
+#define INCLUDED_QTGUI_TIME_RASTER_SINK_F_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <qwt_symbol.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals on a
+ * time_raster plot.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink that takes set of a floating
+ * point streams and plots a time_raster (spectrogram) plot.
+ *
+ */
+ class QTGUI_API time_raster_sink_f : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::time_raster_sink_f::sptr
+ typedef boost::shared_ptr<time_raster_sink_f> sptr;
+
+ /*!
+ * \brief Build a floating point time raster sink.
+ *
+ * \param samp_rate sample rate of signal
+ * \param cols number of cols to plot
+ * \param rows number of rows to plot
+ * \param mult vector of floats as a scaling multiplier for each input stream
+ * \param offset vector of floats as an offset for each input stream
+ * \param name title for the plot
+ * \param nconnections number of streams connected
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(double samp_rate,
+ double rows, double cols,
+ const std::vector<float> &mult,
+ const std::vector<float> &offset,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &lable) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, Qt::PenStyle style) = 0;
+ virtual void set_line_marker(int which, QwtSymbol::Style marker) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+ virtual void set_color_map(int which, const int color) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+ virtual int color_map(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void set_samp_rate(const double samp_rate) = 0;
+ virtual void set_num_rows(double rows) = 0;
+ virtual void set_num_cols(double cols) = 0;
+
+ virtual double num_rows() = 0;
+ virtual double num_cols() = 0;
+
+ virtual void set_multiplier(const std::vector<float> &mult) = 0;
+ virtual void set_offset(const std::vector<float> &offset) = 0;
+
+ virtual void set_intensity_range(float min, float max) = 0;
+
+ virtual void enable_menu(bool en) = 0;
+ virtual void enable_grid(bool en) = 0;
+ virtual void enable_autoscale(bool en) = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_TIME_RASTER_SINK_F_H */
diff --git a/gr-qtgui/include/qtgui/time_sink_c.h b/gr-qtgui/include/qtgui/time_sink_c.h
new file mode 100644
index 0000000000..82ab27d443
--- /dev/null
+++ b/gr-qtgui/include/qtgui/time_sink_c.h
@@ -0,0 +1,105 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2011,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_TIME_SINK_C_H
+#define INCLUDED_QTGUI_TIME_SINK_C_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals in time.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a complex
+ * streams and plots them in the time domain. For each signal, both
+ * the signal's I and Q parts are plotted, and they are all plotted
+ * with a different color, and the \a set_title and \a set_color
+ * functions can be used to change the lable and color for a given
+ * input number.
+ */
+ class QTGUI_API time_sink_c : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::time_sink_c::sptr
+ typedef boost::shared_ptr<time_sink_c> sptr;
+
+ /*!
+ * \brief Build complex time sink
+ *
+ * \param size number of points to plot at once
+ * \param samp_rate sample rate (used to set x-axis labels)
+ * \param name title for the plot
+ * \param nconnections number of signals connected to sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int size, double samp_rate,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_y_axis(double min, double max) = 0;
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &label) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, int style) = 0;
+ virtual void set_line_marker(int which, int marker) = 0;
+ virtual void set_nsamps(const int newsize) = 0;
+ virtual void set_samp_rate(const double samp_rate) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_grid(bool en=true) = 0;
+ virtual void enable_autoscale(bool en=true) = 0;
+ virtual void enable_stem_plot(bool en=true) = 0;
+ virtual void enable_semilogx(bool en=true) = 0;
+ virtual void enable_semilogy(bool en=true) = 0;
+ virtual int nsamps() const = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_TIME_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui/time_sink_f.h b/gr-qtgui/include/qtgui/time_sink_f.h
new file mode 100644
index 0000000000..6c0788f715
--- /dev/null
+++ b/gr-qtgui/include/qtgui/time_sink_f.h
@@ -0,0 +1,103 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2011 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_TIME_SINK_F_H
+#define INCLUDED_QTGUI_TIME_SINK_F_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals in time.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a float streams
+ * and plots them in the time domain. Each signal is plotted with a
+ * different color, and the \a set_title and \a set_color functions
+ * can be used to change the lable and color for a given input number.
+ */
+ class QTGUI_API time_sink_f : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::time_sink_f::sptr
+ typedef boost::shared_ptr<time_sink_f> sptr;
+
+ /*!
+ * \brief Build floating point time sink
+ *
+ * \param size number of points to plot at once
+ * \param samp_rate sample rate (used to set x-axis labels)
+ * \param name title for the plot
+ * \param nconnections number of signals connected to sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int size, double samp_rate,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void set_y_axis(double min, double max) = 0;
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &line) = 0;
+ virtual void set_line_color(int which, const std::string &color) = 0;
+ virtual void set_line_width(int which, int width) = 0;
+ virtual void set_line_style(int which, int style) = 0;
+ virtual void set_line_marker(int which, int marker) = 0;
+ virtual void set_nsamps(const int newsize) = 0;
+ virtual void set_samp_rate(const double samp_rate) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual std::string line_color(int which) = 0;
+ virtual int line_width(int which) = 0;
+ virtual int line_style(int which) = 0;
+ virtual int line_marker(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_grid(bool en=true) = 0;
+ virtual void enable_autoscale(bool en=true) = 0;
+ virtual void enable_stem_plot(bool en=true) = 0;
+ virtual void enable_semilogx(bool en=true) = 0;
+ virtual void enable_semilogy(bool en=true) = 0;
+ virtual int nsamps() const = 0;
+ virtual void reset() = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_TIME_SINK_F_H */
diff --git a/gr-qtgui/include/qtgui_util.h b/gr-qtgui/include/qtgui/utils.h
index 2deaddb947..f490c48567 100644
--- a/gr-qtgui/include/qtgui_util.h
+++ b/gr-qtgui/include/qtgui/utils.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2011 Free Software Foundation, Inc.
+ * Copyright 2011,2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -20,16 +20,15 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_QTGUI_UTIL_H
-#define INCLUDED_QTGUI_UTIL_H
+#ifndef INCLUDED_QTGUI_UTILS_H
+#define INCLUDED_QTGUI_UTILS_H
#include <qevent.h>
-#include <gr_qtgui_api.h>
+#include <qtgui/api.h>
#include <qwt_plot_picker.h>
#include <qwt_picker_machine.h>
-
-class GR_QTGUI_API QwtDblClickPlotPicker: public QwtPlotPicker
+class QTGUI_API QwtDblClickPlotPicker: public QwtPlotPicker
{
public:
QwtDblClickPlotPicker(QwtPlotCanvas *);
@@ -38,20 +37,19 @@ public:
virtual QwtPickerMachine * stateMachine(int) const;
};
-class GR_QTGUI_API QwtPickerDblClickPointMachine: public QwtPickerMachine
+class QTGUI_API QwtPickerDblClickPointMachine: public QwtPickerMachine
{
public:
QwtPickerDblClickPointMachine();
~QwtPickerDblClickPointMachine();
#if QWT_VERSION < 0x060000
- virtual CommandList transition( const QwtEventPattern &eventPattern,
- const QEvent *e);
+ virtual CommandList
#else
virtual QList<QwtPickerMachine::Command>
- transition( const QwtEventPattern &eventPattern,
- const QEvent *e);
#endif
+ transition( const QwtEventPattern &eventPattern,
+ const QEvent *e);
};
-#endif /* INCLUDED_QTGUI_UTIL_H */
+#endif /* INCLUDED_QTGUI_UTILS_H */
diff --git a/gr-qtgui/include/qtgui/waterfall_sink_c.h b/gr-qtgui/include/qtgui/waterfall_sink_c.h
new file mode 100644
index 0000000000..5bc921ccb3
--- /dev/null
+++ b/gr-qtgui/include/qtgui/waterfall_sink_c.h
@@ -0,0 +1,118 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_WATERFALL_SINK_C_H
+#define INCLUDED_QTGUI_WATERFALL_SINK_C_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <filter/firdes.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals on a
+ * waterfall (spectrogram) plot.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a complex
+ * streams and plots a waterfall (spectrogram) plot.
+ *
+ * Note that unlike the other qtgui sinks, this one does not
+ * support multiple input streams. We have yet to figure out a
+ * good way to display multiple, independent signals on this kind
+ * of a plot. If there are any suggestions or examples of this, we
+ * would love to see them. Otherwise, to display multiple signals
+ * here, it's probably best to sum the signals together and
+ * connect that here.
+ */
+ class QTGUI_API waterfall_sink_c : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::waterfall_sink_c::sptr
+ typedef boost::shared_ptr<waterfall_sink_c> sptr;
+
+
+ /*!
+ * \brief Build a complex waterfall sink.
+ *
+ * \param size size of the FFT to compute and display
+ * \param wintype type of window to apply (see filter/firdes.h)
+ * \param fc center frequency of signal (use for x-axis labels)
+ * \param bw bandwidth of signal (used to set x-axis labels)
+ * \param name title for the plot
+ * \param nconnections number of signals to be connected to the sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int size, int wintype,
+ double fc, double bw,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void clear_data() = 0;
+
+ virtual void set_fft_size(const int fftsize) = 0;
+ virtual int fft_size() const = 0;
+ virtual void set_fft_average(const float fftavg) = 0;
+ virtual float fft_average() const = 0;
+ virtual void set_fft_window(const gr::filter::firdes::win_type win) = 0;
+ virtual gr::filter::firdes::win_type fft_window() = 0;
+
+ virtual void set_frequency_range(const double centerfreq,
+ const double bandwidth) = 0;
+ virtual void set_intensity_range(const double min,
+ const double max) = 0;
+
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &line) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+ virtual void set_color_map(int which, const int color) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+ virtual int color_map(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void auto_scale() = 0;
+ virtual double min_intensity(int which) = 0;
+ virtual double max_intensity(int which) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_grid(bool en=true) = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_WATERFALL_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui/waterfall_sink_f.h b/gr-qtgui/include/qtgui/waterfall_sink_f.h
new file mode 100644
index 0000000000..98a434e668
--- /dev/null
+++ b/gr-qtgui/include/qtgui/waterfall_sink_f.h
@@ -0,0 +1,117 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_WATERFALL_SINK_F_H
+#define INCLUDED_QTGUI_WATERFALL_SINK_F_H
+
+#include <Python.h>
+#include <qtgui/api.h>
+#include <gr_sync_block.h>
+#include <qapplication.h>
+#include <filter/firdes.h>
+
+namespace gr {
+ namespace qtgui {
+
+ /*!
+ * \brief A graphical sink to display multiple signals on a
+ * waterfall (spectrogram) plot.
+ * \ingroup qtgui_blk
+ *
+ * This is a QT-based graphical sink the takes set of a floating
+ * point streams and plots a waterfall (spectrogram) plot.
+ *
+ * Note that unlike the other qtgui sinks, this one does not
+ * support multiple input streams. We have yet to figure out a
+ * good way to display multiple, independent signals on this kind
+ * of a plot. If there are any suggestions or examples of this, we
+ * would love to see them. Otherwise, to display multiple signals
+ * here, it's probably best to sum the signals together and
+ * connect that here.
+ */
+ class QTGUI_API waterfall_sink_f : virtual public gr_sync_block
+ {
+ public:
+ // gr::qtgui::waterfall_sink_f::sptr
+ typedef boost::shared_ptr<waterfall_sink_f> sptr;
+
+ /*!
+ * \brief Build a floating point waterfall sink.
+ *
+ * \param size size of the FFT to compute and display
+ * \param wintype type of window to apply (see filter/firdes.h)
+ * \param fc center frequency of signal (use for x-axis labels)
+ * \param bw bandwidth of signal (used to set x-axis labels)
+ * \param name title for the plot
+ * \param nconnections number of signals to be connected to the sink
+ * \param parent a QWidget parent object, if any
+ */
+ static sptr make(int size, int wintype,
+ double fc, double bw,
+ const std::string &name,
+ int nconnections=1,
+ QWidget *parent=NULL);
+
+ virtual void exec_() = 0;
+ virtual PyObject* pyqwidget() = 0;
+
+ virtual void clear_data() = 0;
+
+ virtual void set_fft_size(const int fftsize) = 0;
+ virtual int fft_size() const = 0;
+ virtual void set_fft_average(const float fftavg) = 0;
+ virtual float fft_average() const = 0;
+ virtual void set_fft_window(const gr::filter::firdes::win_type win) = 0;
+ virtual gr::filter::firdes::win_type fft_window() = 0;
+
+ virtual void set_frequency_range(const double centerfreq,
+ const double bandwidth) = 0;
+ virtual void set_intensity_range(const double min,
+ const double max) = 0;
+
+ virtual void set_update_time(double t) = 0;
+ virtual void set_title(const std::string &title) = 0;
+ virtual void set_line_label(int which, const std::string &line) = 0;
+ virtual void set_line_alpha(int which, double alpha) = 0;
+ virtual void set_color_map(int which, const int color) = 0;
+
+ virtual std::string title() = 0;
+ virtual std::string line_label(int which) = 0;
+ virtual double line_alpha(int which) = 0;
+ virtual int color_map(int which) = 0;
+
+ virtual void set_size(int width, int height) = 0;
+
+ virtual void auto_scale() = 0;
+ virtual double min_intensity(int which) = 0;
+ virtual double max_intensity(int which) = 0;
+
+ virtual void enable_menu(bool en=true) = 0;
+ virtual void enable_grid(bool en=true) = 0;
+
+ QApplication *d_qApplication;
+ };
+
+ } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_WATERFALL_SINK_F_H */
diff --git a/gr-qtgui/include/qtgui_sink_c.h b/gr-qtgui/include/qtgui_sink_c.h
deleted file mode 100644
index 68fff368a9..0000000000
--- a/gr-qtgui/include/qtgui_sink_c.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009,2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_QTGUI_SINK_C_H
-#define INCLUDED_QTGUI_SINK_C_H
-
-#include <Python.h>
-#include <gr_qtgui_api.h>
-#include <gr_block.h>
-#include <gr_firdes.h>
-#include <gri_fft.h>
-#include <qapplication.h>
-#include <gruel/high_res_timer.h>
-#include "SpectrumGUIClass.h"
-
-class qtgui_sink_c;
-typedef boost::shared_ptr<qtgui_sink_c> qtgui_sink_c_sptr;
-
-GR_QTGUI_API qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
- double fc=0, double bandwidth=1.0,
- const std::string &name="Spectrum Display",
- bool plotfreq=true, bool plotwaterfall=true,
- bool plottime=true, bool plotconst=true,
- QWidget *parent=NULL);
-
-/*!
- * \brief A graphical sink to display freq, spec, time, and const plots.
- * \ingroup qtgui_blk
- *
- * This is a QT-based graphical sink the takes a complex stream and
- * plots it. The default action is to plot the signal as a PSD (FFT),
- * spectrogram (waterfall), time domain I&Q, and constellation (I
- * vs. Q) plots. The plots may be turned off by setting the
- * appropriate boolean value in the constructor to False.
- */
-
-class GR_QTGUI_API qtgui_sink_c : public gr_block
-{
-private:
- friend GR_QTGUI_API qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
- double fc, double bw,
- const std::string &name,
- bool plotfreq, bool plotwaterfall,
- bool plottime, bool plotconst,
- QWidget *parent);
- qtgui_sink_c (int fftsize, int wintype,
- double fc, double bw,
- const std::string &name,
- bool plotfreq, bool plotwaterfall,
- bool plottime, bool plotconst,
- QWidget *parent);
-
- void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-
- void initialize();
-
- int d_fftsize;
- gr_firdes::win_type d_wintype;
- std::vector<float> d_window;
- double d_center_freq;
- double d_bandwidth;
- std::string d_name;
- gruel::high_res_timer_type d_last_update;
- bool d_update_active;
-
- bool d_shift;
- gri_fft_complex *d_fft;
-
- int d_index;
- gr_complex *d_residbuf;
-
- bool d_plotfreq, d_plotwaterfall, d_plottime, d_plotconst;
-
- gruel::high_res_timer_type d_update_time;
-
- QWidget *d_parent;
- SpectrumGUIClass *d_main_gui;
-
- void windowreset();
- void buildwindow();
- void fftresize();
- void fft(const gr_complex *data_in, int size);
-
-public:
- ~qtgui_sink_c();
- void exec_();
- QWidget* qwidget();
- PyObject* pyqwidget();
-
- void set_frequency_range(const double centerfreq,
- const double bandwidth);
-
- void set_time_domain_axis(double min, double max);
- void set_constellation_axis(double xmin, double xmax,
- double ymin, double ymax);
- void set_constellation_pen_size(int size);
- void set_frequency_axis(double min, double max);
-
- void set_update_time(double t);
-
- QApplication *d_qApplication;
-
- int general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_QTGUI_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui_sink_f.h b/gr-qtgui/include/qtgui_sink_f.h
deleted file mode 100644
index 709f02a2f5..0000000000
--- a/gr-qtgui/include/qtgui_sink_f.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009,2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_QTGUI_SINK_F_H
-#define INCLUDED_QTGUI_SINK_F_H
-
-#include <Python.h>
-#include <gr_qtgui_api.h>
-#include <gr_block.h>
-#include <gr_firdes.h>
-#include <gri_fft.h>
-#include <qapplication.h>
-#include "SpectrumGUIClass.h"
-
-class qtgui_sink_f;
-typedef boost::shared_ptr<qtgui_sink_f> qtgui_sink_f_sptr;
-
-GR_QTGUI_API qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype,
- double fc=0, double bw=1.0,
- const std::string &name="Spectrum Display",
- bool plotfreq=true, bool plotwaterfall=true,
- bool plottime=true, bool plotconst=false,
- QWidget *parent=NULL);
-
-/*!
- * \brief A graphical sink to display freq, spec, and time.
- * \ingroup qtgui_blk
- *
- * This is a QT-based graphical sink the takes a float stream and
- * plots it. The default action is to plot the signal as a PSD (FFT),
- * spectrogram (waterfall), and time domain plots. The plots may be
- * turned off by setting the appropriate boolean value in the
- * constructor to False.
- */
-
-class GR_QTGUI_API qtgui_sink_f : public gr_block
-{
-private:
- friend GR_QTGUI_API qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype,
- double fc, double bw,
- const std::string &name,
- bool plotfreq, bool plotwaterfall,
- bool plottime, bool plotconst,
- QWidget *parent);
- qtgui_sink_f (int fftsize, int wintype,
- double fc, double bw,
- const std::string &name,
- bool plotfreq, bool plotwaterfall,
- bool plottime, bool plotconst,
- QWidget *parent);
-
- void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-
- void initialize();
-
- int d_fftsize;
- gr_firdes::win_type d_wintype;
- std::vector<float> d_window;
- double d_center_freq;
- double d_bandwidth;
- std::string d_name;
-
- bool d_shift;
- gri_fft_complex *d_fft;
-
- int d_index;
- float *d_residbuf;
-
- bool d_plotfreq, d_plotwaterfall, d_plottime, d_plotconst;
-
- double d_update_time;
-
- QWidget *d_parent;
- SpectrumGUIClass *d_main_gui;
-
- void windowreset();
- void buildwindow();
- void fftresize();
- void fft(const float *data_in, int size);
-
-public:
- ~qtgui_sink_f();
- void exec_();
- QWidget* qwidget();
- PyObject* pyqwidget();
-
- void set_frequency_range(const double centerfreq,
- const double bandwidth);
-
- void set_time_domain_axis(double min, double max);
- void set_constellation_axis(double xmin, double xmax,
- double ymin, double ymax);
- void set_constellation_pen_size(int size);
- void set_frequency_axis(double min, double max);
-
- void set_update_time(double t);
-
- QApplication *d_qApplication;
-
- int general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_QTGUI_SINK_F_H */
diff --git a/gr-qtgui/include/qtgui_time_sink_c.h b/gr-qtgui/include/qtgui_time_sink_c.h
deleted file mode 100644
index 561d796cfa..0000000000
--- a/gr-qtgui/include/qtgui_time_sink_c.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_QTGUI_TIME_SINK_C_H
-#define INCLUDED_QTGUI_TIME_SINK_C_H
-
-#include <Python.h>
-#include <gr_qtgui_api.h>
-#include <gr_sync_block.h>
-#include <gr_firdes.h>
-#include <gri_fft.h>
-#include <qapplication.h>
-#include <timedisplayform.h>
-
-class qtgui_time_sink_c;
-typedef boost::shared_ptr<qtgui_time_sink_c> qtgui_time_sink_c_sptr;
-
-GR_QTGUI_API qtgui_time_sink_c_sptr qtgui_make_time_sink_c(int size, double bw,
- const std::string &name,
- int nconnectons=1,
- QWidget *parent=NULL);
-
-/*!
- * \brief A graphical sink to display multiple signals in time.
- * \ingroup qtgui_blk
- *
- * This is a QT-based graphical sink the takes set of a complex
- * streams and plots them in the time domain. For each signal, both
- * the signal's I and Q parts are plotted, and they are all plotted
- * with a different color, and the \a set_title and \a set_color
- * functions can be used to change the lable and color for a given
- * input number.
- */
-class GR_QTGUI_API qtgui_time_sink_c : public gr_sync_block
-{
-private:
- friend GR_QTGUI_API qtgui_time_sink_c_sptr qtgui_make_time_sink_c(int size, double bw,
- const std::string &name,
- int nconnections,
- QWidget *parent);
- qtgui_time_sink_c(int size, double bw,
- const std::string &name,
- int nconnections,
- QWidget *parent=NULL);
-
- void initialize();
-
- int d_size;
- double d_bandwidth;
- std::string d_name;
- int d_nconnections;
-
- int d_index;
- std::vector<double*> d_residbufs;
-
- double d_update_time;
-
- QWidget *d_parent;
- TimeDisplayForm *d_main_gui;
-
- gruel::high_res_timer_type d_current_time;
- gruel::high_res_timer_type d_last_time;
-
-public:
- ~qtgui_time_sink_c();
- void exec_();
- QWidget* qwidget();
- PyObject* pyqwidget();
-
- void set_time_domain_axis(double min, double max);
- void set_update_time(double t);
- void set_title(int which, const std::string &title);
- void set_color(int which, const std::string &color);
-
- QApplication *d_qApplication;
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_QTGUI_TIME_SINK_C_H */
diff --git a/gr-qtgui/include/qtgui_time_sink_f.h b/gr-qtgui/include/qtgui_time_sink_f.h
deleted file mode 100644
index 993e0556cf..0000000000
--- a/gr-qtgui/include/qtgui_time_sink_f.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_QTGUI_TIME_SINK_F_H
-#define INCLUDED_QTGUI_TIME_SINK_F_H
-
-#include <Python.h>
-#include <gr_qtgui_api.h>
-#include <gr_sync_block.h>
-#include <gr_firdes.h>
-#include <gri_fft.h>
-#include <qapplication.h>
-#include <timedisplayform.h>
-
-class qtgui_time_sink_f;
-typedef boost::shared_ptr<qtgui_time_sink_f> qtgui_time_sink_f_sptr;
-
-GR_QTGUI_API qtgui_time_sink_f_sptr qtgui_make_time_sink_f(int size, double bw,
- const std::string &name,
- int nconnectons=1,
- QWidget *parent=NULL);
-
-/*!
- * \brief A graphical sink to display multiple signals in time.
- * \ingroup qtgui_blk
- *
- * This is a QT-based graphical sink the takes set of a float streams
- * and plots them in the time domain. Each signal is plotted with a
- * different color, and the \a set_title and \a set_color functions
- * can be used to change the lable and color for a given input number.
- */
-class GR_QTGUI_API qtgui_time_sink_f : public gr_sync_block
-{
-private:
- friend GR_QTGUI_API qtgui_time_sink_f_sptr qtgui_make_time_sink_f(int size, double bw,
- const std::string &name,
- int nconnections,
- QWidget *parent);
- qtgui_time_sink_f(int size, double bw,
- const std::string &name,
- int nconnections,
- QWidget *parent=NULL);
-
- void initialize();
-
- int d_size;
- double d_bandwidth;
- std::string d_name;
- int d_nconnections;
-
- int d_index;
- std::vector<double*> d_residbufs;
-
- double d_update_time;
-
- QWidget *d_parent;
- TimeDisplayForm *d_main_gui;
-
- gruel::high_res_timer_type d_current_time;
- gruel::high_res_timer_type d_last_time;
-
-public:
- ~qtgui_time_sink_f();
- void exec_();
- QWidget* qwidget();
- PyObject* pyqwidget();
-
- void set_time_domain_axis(double min, double max);
- void set_update_time(double t);
- void set_title(int which, const std::string &title);
- void set_color(int which, const std::string &color);
-
- QApplication *d_qApplication;
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_QTGUI_TIME_SINK_F_H */