GNU Radio's FOSPHOR Package
qt_sink_c_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013-2014 Sylvain Munaut <tnt@246tNt.com>
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #ifndef INCLUDED_GR_FOSPHOR_QT_SINK_C_IMPL_H
23 #define INCLUDED_GR_FOSPHOR_QT_SINK_C_IMPL_H
24 
26 
27 #include "base_sink_c_impl.h"
28 #include "QGLSurface.h"
29 
30 namespace gr {
31  namespace fosphor {
32 
33  class QGLSurface;
34 
35  /*!
36  * \brief Qt version of fosphor sink (implementation)
37  * \ingroup fosphor
38  */
39  class qt_sink_c_impl : public qt_sink_c, public base_sink_c_impl
40  {
41  friend class QGLSurface;
42 
43  private:
44  QGLSurface *d_gui;
45  QWidget* d_parent;
46 
47  protected:
48  /* Delegated implementation of GL context management */
49  void glctx_init();
50  void glctx_swap();
51  void glctx_poll();
52  void glctx_fini();
53  void glctx_update();
54 
55  public:
56  qt_sink_c_impl(QWidget *parent=NULL);
57 
58  void exec_();
59  QWidget* qwidget();
60 
61 #if ENABLE_PYTHON
62  PyObject* pyqwidget();
63 #else
64  void* pyqwidget();
65 #endif
66  };
67 
68  } // namespace fosphor
69 } // namespace gr
70 
71 #endif /* INCLUDED_GR_FOSPHOR_QT_SINK_C_IMPL_H */
72 
Definition: private.h:43
Base class for fosphor sink implementation.
Definition: base_sink_c_impl.h:43
Definition: base_sink_c.h:30
Qt version of fosphor sink (implementation)
Definition: qt_sink_c_impl.h:39
Qt version of fosphor sink.
Definition: qt_sink_c.h:44
Definition: QGLSurface.h:52
qt_sink_c_impl(QWidget *parent=NULL)