From 4a1dfe6b13a6ea839e1e6f4792d5f8992c495594 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Mar 2011 13:10:40 -0400 Subject: gr-qtgui: wip: moving and renaming files for new structure. --- gr-qtgui/swig/qtgui_swig.i | 131 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 gr-qtgui/swig/qtgui_swig.i (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i new file mode 100644 index 000000000..bb64c6ae2 --- /dev/null +++ b/gr-qtgui/swig/qtgui_swig.i @@ -0,0 +1,131 @@ +/* -*- c++ -*- */ +/* + * Copyright 2008,2009 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. + */ + +%include "gnuradio.i" + +%{ +#include "qtgui_sink_c.h" +#include "qtgui_sink_f.h" +%} + +GR_SWIG_BLOCK_MAGIC(qtgui,sink_c) + + qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype, + double fc=0, double bw=1.0, + const std::string &name="Display", + bool plotfreq=true, bool plotwaterfall=true, + bool plotwaterfall3d=true, bool plottime=true, + bool plotconst=true, + bool use_openGL=true, + QWidget *parent=NULL); + +class qtgui_sink_c : public gr_block +{ +private: + friend 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 plotwaterfall3d, bool plottime, + bool plotconst, + bool use_openGL, + QWidget *parent); + qtgui_sink_c (int fftsize, int wintype, + double fc, double bw, + const std::string &name, + bool plotfreq, bool plotwaterfall, + bool plotwaterfall3d, bool plottime, + bool plotconst, + bool use_openGL, + QWidget *parent); + +public: + void exec_(); + 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_frequency_axis(double min, double max); + void set_constellation_pen_size(int size); +}; + + + +/*********************************************************************/ + + +GR_SWIG_BLOCK_MAGIC(qtgui,sink_f) + +qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype, + double fc=0, double bw=0.0, + const std::string &name="Display", + bool plotfreq=true, bool plotwaterfall=true, + bool plotwaterfall3d=true, bool plottime=true, + bool plotconst=true, + bool use_openGL=true, + QWidget *parent=NULL); + +class qtgui_sink_f : public gr_block +{ +private: + friend 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 plotwaterfall3d, bool plottime, + bool plotconst, + bool use_openGL, + QWidget *parent); + qtgui_sink_f (int fftsize, int wintype, + double fc, double bw, + const std::string &name, + bool plotfreq, bool plotwaterfall, + bool plotwaterfall3d, bool plottime, + bool plotconst, + bool use_openGL, + QWidget *parent); + +public: + void exec_(); + 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_frequency_axis(double min, double max); + void set_constellation_pen_size(int size); +}; + +#if SWIGGUILE +%scheme %{ +(load-extension-global "libguile-gnuradio-qtgui" "scm_init_gnuradio_qtgui_module") +%} + +%goops %{ +(use-modules (gnuradio gnuradio_core_runtime)) +%} +#endif -- cgit From 147143f58f50210c5ad2dc66d00d12237183d428 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Mar 2011 14:11:26 -0400 Subject: gr-qtgui: qtgui builds and passes make check under new structure. --- gr-qtgui/swig/qtgui_swig.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index bb64c6ae2..ba97b4e9a 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -122,7 +122,7 @@ public: #if SWIGGUILE %scheme %{ -(load-extension-global "libguile-gnuradio-qtgui" "scm_init_gnuradio_qtgui_module") +(load-extension-global "libguile-gnuradio-qtgui_swig" "scm_init_gnuradio_qtgui_swig_module") %} %goops %{ -- cgit From 8f53f5a782a6500d191ba557b37e7e3785cf6e02 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Wed, 6 Apr 2011 00:22:29 -0400 Subject: gr-qtgui: removing references to 3D waterfall plot and changning QtGui API to remove bool that turns it on/off. --- gr-qtgui/swig/qtgui_swig.i | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index ba97b4e9a..8069ed6c2 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -33,8 +33,7 @@ GR_SWIG_BLOCK_MAGIC(qtgui,sink_c) double fc=0, double bw=1.0, const std::string &name="Display", bool plotfreq=true, bool plotwaterfall=true, - bool plotwaterfall3d=true, bool plottime=true, - bool plotconst=true, + bool plottime=true, bool plotconst=true, bool use_openGL=true, QWidget *parent=NULL); @@ -45,16 +44,14 @@ private: double fc, double bw, const std::string &name, bool plotfreq, bool plotwaterfall, - bool plotwaterfall3d, bool plottime, - bool plotconst, + bool plottime, bool plotconst, bool use_openGL, QWidget *parent); qtgui_sink_c (int fftsize, int wintype, double fc, double bw, const std::string &name, bool plotfreq, bool plotwaterfall, - bool plotwaterfall3d, bool plottime, - bool plotconst, + bool plottime, bool plotconst, bool use_openGL, QWidget *parent); @@ -82,8 +79,7 @@ qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype, double fc=0, double bw=0.0, const std::string &name="Display", bool plotfreq=true, bool plotwaterfall=true, - bool plotwaterfall3d=true, bool plottime=true, - bool plotconst=true, + bool plottime=true, bool plotconst=true, bool use_openGL=true, QWidget *parent=NULL); @@ -94,16 +90,14 @@ private: double fc, double bw, const std::string &name, bool plotfreq, bool plotwaterfall, - bool plotwaterfall3d, bool plottime, - bool plotconst, + bool plottime, bool plotconst, bool use_openGL, QWidget *parent); qtgui_sink_f (int fftsize, int wintype, double fc, double bw, const std::string &name, bool plotfreq, bool plotwaterfall, - bool plotwaterfall3d, bool plottime, - bool plotconst, + bool plottime, bool plotconst, bool use_openGL, QWidget *parent); -- cgit From c4050c5bdb55ce14565d0ade84bd518cc8c27ec5 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 10 Apr 2011 17:13:15 -0400 Subject: gr-qtgui: removed OpenGL calls; we still link against the QTOPENGL_LIBS because of some dependencies in Qwt. --- gr-qtgui/swig/qtgui_swig.i | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index 8069ed6c2..734709f09 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -34,7 +34,6 @@ GR_SWIG_BLOCK_MAGIC(qtgui,sink_c) const std::string &name="Display", bool plotfreq=true, bool plotwaterfall=true, bool plottime=true, bool plotconst=true, - bool use_openGL=true, QWidget *parent=NULL); class qtgui_sink_c : public gr_block @@ -45,14 +44,12 @@ private: const std::string &name, bool plotfreq, bool plotwaterfall, bool plottime, bool plotconst, - bool use_openGL, 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, - bool use_openGL, QWidget *parent); public: @@ -80,7 +77,6 @@ qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype, const std::string &name="Display", bool plotfreq=true, bool plotwaterfall=true, bool plottime=true, bool plotconst=true, - bool use_openGL=true, QWidget *parent=NULL); class qtgui_sink_f : public gr_block @@ -91,14 +87,12 @@ private: const std::string &name, bool plotfreq, bool plotwaterfall, bool plottime, bool plotconst, - bool use_openGL, 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, - bool use_openGL, QWidget *parent); public: -- cgit From 16ec5a3bf5a22cc72423d975666878eeadd2cf3c Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 10 Apr 2011 17:21:38 -0400 Subject: gr-qtgui: exposing set_update_time to Python. --- gr-qtgui/swig/qtgui_swig.i | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index 734709f09..c471bb09c 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -63,6 +63,7 @@ public: double ymin, double ymax); void set_frequency_axis(double min, double max); void set_constellation_pen_size(int size); + void set_update_time(double t); }; @@ -106,6 +107,7 @@ public: double ymin, double ymax); void set_frequency_axis(double min, double max); void set_constellation_pen_size(int size); + void set_update_time(double t); }; #if SWIGGUILE -- cgit From ef619231cd6f8b6fcf4548a8422aafd3d2d07a17 Mon Sep 17 00:00:00 2001 From: Mike Cornelius Date: Sun, 10 Apr 2011 22:24:37 -0400 Subject: gr-qtgui: rearranging swig directory to allow other .i files; adding a qtgui2 interface file. --- gr-qtgui/swig/qtgui_swig.i | 98 +++------------------------------------------- 1 file changed, 5 insertions(+), 93 deletions(-) (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index c471bb09c..92c9789e3 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008,2009 Free Software Foundation, Inc. + * Copyright 2008,2009,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -23,99 +23,11 @@ %include "gnuradio.i" %{ -#include "qtgui_sink_c.h" -#include "qtgui_sink_f.h" +#include +#include %} -GR_SWIG_BLOCK_MAGIC(qtgui,sink_c) +%include "qtgui_sink_c.i" +%include "qtgui_sink_f.i" - qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype, - double fc=0, double bw=1.0, - const std::string &name="Display", - bool plotfreq=true, bool plotwaterfall=true, - bool plottime=true, bool plotconst=true, - QWidget *parent=NULL); -class qtgui_sink_c : public gr_block -{ -private: - friend 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); - -public: - void exec_(); - 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_frequency_axis(double min, double max); - void set_constellation_pen_size(int size); - void set_update_time(double t); -}; - - - -/*********************************************************************/ - - -GR_SWIG_BLOCK_MAGIC(qtgui,sink_f) - -qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype, - double fc=0, double bw=0.0, - const std::string &name="Display", - bool plotfreq=true, bool plotwaterfall=true, - bool plottime=true, bool plotconst=true, - QWidget *parent=NULL); - -class qtgui_sink_f : public gr_block -{ -private: - friend 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); - -public: - void exec_(); - 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_frequency_axis(double min, double max); - void set_constellation_pen_size(int size); - void set_update_time(double t); -}; - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-qtgui_swig" "scm_init_gnuradio_qtgui_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif -- cgit From 9ad807544990bf4a4a8f5fb746f33b796258f9ee Mon Sep 17 00:00:00 2001 From: Mike Cornelius Date: Sun, 10 Apr 2011 22:55:17 -0400 Subject: gr-qtgui: fix the interface file. --- gr-qtgui/swig/qtgui_swig.i | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gr-qtgui/swig/qtgui_swig.i') diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index 92c9789e3..c250cdd04 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -27,7 +27,6 @@ #include %} -%include "qtgui_sink_c.i" -%include "qtgui_sink_f.i" +%include "qtgui.i" -- cgit