2013-10-26 19:07:14 +00:00
|
|
|
/* -*- c++ -*- */
|
|
|
|
/*
|
2021-01-08 12:12:43 +00:00
|
|
|
* Copyright 2013-2021 Sylvain Munaut <tnt@246tNt.com>
|
2013-10-26 19:07:14 +00:00
|
|
|
*
|
2021-01-08 12:12:43 +00:00
|
|
|
* This file is part of gr-fosphor
|
2013-10-26 19:07:14 +00:00
|
|
|
*
|
2021-01-08 12:12:43 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2013-10-26 19:07:14 +00:00
|
|
|
*/
|
|
|
|
|
2021-01-08 11:12:32 +00:00
|
|
|
#pragma once
|
2013-10-26 19:07:14 +00:00
|
|
|
|
|
|
|
#include <gnuradio/fosphor/qt_sink_c.h>
|
|
|
|
|
|
|
|
#include "base_sink_c_impl.h"
|
|
|
|
|
|
|
|
namespace gr {
|
|
|
|
namespace fosphor {
|
|
|
|
|
2019-12-02 19:13:26 +00:00
|
|
|
class QGLSurface;
|
|
|
|
|
2013-10-26 19:07:14 +00:00
|
|
|
/*!
|
|
|
|
* \brief Qt version of fosphor sink (implementation)
|
|
|
|
* \ingroup fosphor
|
|
|
|
*/
|
|
|
|
class qt_sink_c_impl : public qt_sink_c, public base_sink_c_impl
|
|
|
|
{
|
|
|
|
friend class QGLSurface;
|
|
|
|
|
|
|
|
private:
|
2019-12-02 19:13:26 +00:00
|
|
|
QGLSurface *d_gui;
|
2013-10-26 19:07:14 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/* Delegated implementation of GL context management */
|
|
|
|
void glctx_init();
|
|
|
|
void glctx_swap();
|
|
|
|
void glctx_poll();
|
|
|
|
void glctx_fini();
|
2014-01-12 09:48:21 +00:00
|
|
|
void glctx_update();
|
2013-10-26 19:07:14 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
qt_sink_c_impl(QWidget *parent=NULL);
|
|
|
|
|
2014-05-12 22:16:02 +00:00
|
|
|
void exec_();
|
|
|
|
QWidget* qwidget();
|
|
|
|
|
2021-01-08 12:41:42 +00:00
|
|
|
#if defined(PY_VERSION)
|
2013-10-26 19:07:14 +00:00
|
|
|
PyObject* pyqwidget();
|
|
|
|
#else
|
|
|
|
void* pyqwidget();
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace fosphor
|
|
|
|
} // namespace gr
|