GNU Radio 3.7.1 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2012 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef INCLUDED_QTGUI_WATERFALL_SINK_F_H 00024 #define INCLUDED_QTGUI_WATERFALL_SINK_F_H 00025 00026 #include <Python.h> 00027 #include <gnuradio/qtgui/api.h> 00028 #include <gnuradio/sync_block.h> 00029 #include <qapplication.h> 00030 #include <gnuradio/filter/firdes.h> 00031 00032 namespace gr { 00033 namespace qtgui { 00034 00035 /*! 00036 * \brief A graphical sink to display multiple signals on a 00037 * waterfall (spectrogram) plot. 00038 * \ingroup instrumentation_blk 00039 * \ingroup qtgui_blk 00040 * 00041 * \details 00042 * This is a QT-based graphical sink the takes set of a floating 00043 * point streams and plots a waterfall (spectrogram) plot. 00044 * 00045 * Note that unlike the other qtgui sinks, this one does not 00046 * support multiple input streams. We have yet to figure out a 00047 * good way to display multiple, independent signals on this kind 00048 * of a plot. If there are any suggestions or examples of this, we 00049 * would love to see them. Otherwise, to display multiple signals 00050 * here, it's probably best to sum the signals together and 00051 * connect that here. 00052 */ 00053 class QTGUI_API waterfall_sink_f : virtual public sync_block 00054 { 00055 public: 00056 // gr::qtgui::waterfall_sink_f::sptr 00057 typedef boost::shared_ptr<waterfall_sink_f> sptr; 00058 00059 /*! 00060 * \brief Build a floating point waterfall sink. 00061 * 00062 * \param size size of the FFT to compute and display 00063 * \param wintype type of window to apply (see gnuradio/filter/firdes.h) 00064 * \param fc center frequency of signal (use for x-axis labels) 00065 * \param bw bandwidth of signal (used to set x-axis labels) 00066 * \param name title for the plot 00067 * \param nconnections number of signals to be connected to the sink 00068 * \param parent a QWidget parent object, if any 00069 */ 00070 static sptr make(int size, int wintype, 00071 double fc, double bw, 00072 const std::string &name, 00073 int nconnections=1, 00074 QWidget *parent=NULL); 00075 00076 virtual void exec_() = 0; 00077 virtual PyObject* pyqwidget() = 0; 00078 00079 virtual void clear_data() = 0; 00080 00081 virtual void set_fft_size(const int fftsize) = 0; 00082 virtual int fft_size() const = 0; 00083 virtual void set_fft_average(const float fftavg) = 0; 00084 virtual float fft_average() const = 0; 00085 virtual void set_fft_window(const gr::filter::firdes::win_type win) = 0; 00086 virtual gr::filter::firdes::win_type fft_window() = 0; 00087 00088 virtual void set_frequency_range(const double centerfreq, 00089 const double bandwidth) = 0; 00090 virtual void set_intensity_range(const double min, 00091 const double max) = 0; 00092 00093 virtual void set_update_time(double t) = 0; 00094 virtual void set_title(const std::string &title) = 0; 00095 virtual void set_line_label(int which, const std::string &line) = 0; 00096 virtual void set_line_alpha(int which, double alpha) = 0; 00097 virtual void set_color_map(int which, const int color) = 0; 00098 00099 virtual std::string title() = 0; 00100 virtual std::string line_label(int which) = 0; 00101 virtual double line_alpha(int which) = 0; 00102 virtual int color_map(int which) = 0; 00103 00104 virtual void set_size(int width, int height) = 0; 00105 00106 virtual void auto_scale() = 0; 00107 virtual double min_intensity(int which) = 0; 00108 virtual double max_intensity(int which) = 0; 00109 00110 virtual void enable_menu(bool en=true) = 0; 00111 virtual void enable_grid(bool en=true) = 0; 00112 00113 QApplication *d_qApplication; 00114 }; 00115 00116 } /* namespace qtgui */ 00117 } /* namespace gr */ 00118 00119 #endif /* INCLUDED_QTGUI_WATERFALL_SINK_F_H */