Now adding y-axis controls for frequency domain plot.
[debian/gnuradio] / gr-qtgui / src / lib / qtgui.i
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2008,2009 Free Software Foundation, Inc.
4  * 
5  * This file is part of GNU Radio
6  * 
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  * 
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 %include "gnuradio.i"
24
25 %{
26 #include "qtgui_sink_c.h"
27 #include "qtgui_sink_f.h"
28 %}
29
30 GR_SWIG_BLOCK_MAGIC(qtgui,sink_c)
31
32   qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
33                                        float fmin=-0.5, float fmax=0.5,
34                                        const std::string &name="Display",
35                                        bool plotfreq=true, bool plotwaterfall=true,
36                                        bool plotwaterfall3d=true, bool plottime=true,
37                                        bool plotconst=true,
38                                        QWidget *parent=NULL);
39
40 class qtgui_sink_c : public gr_block
41 {
42 private:
43   friend qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
44                                               float fmin, float fmax,
45                                               const std::string &name,
46                                               bool plotfreq, bool plotwaterfall,
47                                               bool plotwaterfall3d, bool plottime,
48                                               bool plotconst,
49                                               QWidget *parent);
50   qtgui_sink_c (int fftsize, int wintype,
51                 float fmin, float fmax,
52                 const std::string &name,
53                 bool plotfreq, bool plotwaterfall,
54                 bool plotwaterfall3d, bool plottime,
55                 bool plotconst,
56                 QWidget *parent);
57
58 public:
59   void exec_();
60   PyObject* pyqwidget();
61
62   void set_frequency_range(const double centerfreq,
63                            const double startfreq,
64                            const double stopfreq);
65   void set_time_domain_axis(double min, double max);
66   void set_constellation_axis(double xmin, double xmax,
67                               double ymin, double ymax);
68   void set_frequency_axis(double min, double max);
69 };
70
71
72
73 /*********************************************************************/
74
75
76 GR_SWIG_BLOCK_MAGIC(qtgui,sink_f)
77   
78 qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype,
79                                      float fmin=-0.5, float fmax=0.5,
80                                      const std::string &name="Display",
81                                      bool plotfreq=true, bool plotwaterfall=true,
82                                      bool plotwaterfall3d=true, bool plottime=true,
83                                      bool plotconst=true,
84                                      QWidget *parent=NULL);
85
86 class qtgui_sink_f : public gr_block
87 {
88 private:
89   friend qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype,
90                                               float fmin, float fmax,
91                                               const std::string &name,
92                                               bool plotfreq, bool plotwaterfall,
93                                               bool plotwaterfall3d, bool plottime,
94                                               bool plotconst,
95                                               QWidget *parent);
96   qtgui_sink_f (int fftsize, int wintype,
97                 float fmin, float fmax,
98                 const std::string &name,
99                 bool plotfreq, bool plotwaterfall,
100                 bool plotwaterfall3d, bool plottime,
101                 bool plotconst,
102                 QWidget *parent);
103
104 public:
105   void exec_();
106   PyObject* pyqwidget();
107
108   void set_frequency_range(const double centerfreq,
109                            const double startfreq,
110                            const double stopfreq);
111   void set_time_domain_axis(double min, double max);
112   void set_constellation_axis(double xmin, double xmax,
113                               double ymin, double ymax);
114   void set_frequency_axis(double min, double max);
115 };
116