The Inspector (GNU Radio module gr-inspector)
vis3d_vf.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2016 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * This 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  * This software 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 this software; 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 
24 #ifndef INCLUDED_INSPECTOR_VIS3D_VF_H
25 #define INCLUDED_INSPECTOR_VIS3D_VF_H
26 
27 
28 #ifdef ENABLE_PYTHON
29  #include <Python.h>
30 #endif
31 
32 
33 #include <inspector/api.h>
34 #include <gnuradio/sync_block.h>
35 #include <qapplication.h>
36 #include <QtGui>
37 
38 namespace gr {
39  namespace inspector {
40  /*!
41  * \brief 3D visualisation for the inspector toolkit
42  * \ingroup inspector
43  *
44  * \details
45  * This GUI uses QwtPlot3D to visualise data in 3D, for instance data
46  * from the gr-specest FAM block.
47  *
48  * Controls: Hold left mouse button and move cursor to rotate.
49  * Dragging using two fingers, zooms in or out
50  *
51  */
52  class INSPECTOR_API vis3d_vf : virtual public gr::sync_block
53  {
54  public:
55  typedef boost::shared_ptr<vis3d_vf> sptr;
56 
57  /*!
58  * \brief Build a 3D visualisation
59  *
60  * \param vlen The size of the input vector containing the data to be displayed
61  * \param width The 1D vector will be reshaped with this width
62  * \param height The 1D vector will be reshaped with this height
63  * \param gwidth The graph will be stretched to this width
64  * \param gheight The graph will be stretched to this height
65  * \param maxz You can set the graph to have a maximum Z value, so that the graph boundaries remain fixed, or if you set to 0, the Z axis of the graph, will grow according to the data.
66  * \param fps You can set the framerate of the graph, so that if a higher number vectors are received than the frame rate, they can be discarded.
67  * \param xaxis Label for X axis
68  * \param yaxis Label for Y axis
69  * \param zaxis Label for Z axis
70  * \param parent QWidget parent
71  */
72  static sptr make(int vlen,int width, int height,int gwidth,int gheight,double maxz, int fps,char *xaxis,char* yaxis, char *zaxis,QWidget *parent=NULL);
73 
74 #ifdef ENABLE_PYTHON
75  virtual PyObject* pyqwidget() = 0;
76 #else
77  virtual void* pyqwidget() = 0;
78 #endif
79  };
80 
81  } // namespace inspector
82 } // namespace gr
83 
84 #endif /* INCLUDED_INSPECTOR_VIS3D_VF_H */
85 
#define INSPECTOR_API
Definition: api.h:30
boost::shared_ptr< vis3d_vf > sptr
Definition: vis3d_vf.h:55
Definition: ofdm_bouzegzi_c.h:30
3D visualisation for the inspector toolkit
Definition: vis3d_vf.h:52