gr-fosphor: Export method to retrieve the underying QWidget

This is to allow usage in pure c++ flow graph

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2014-05-13 00:16:02 +02:00
parent 2140ef7bb1
commit 4254a3a714
3 changed files with 19 additions and 0 deletions

View File

@ -52,6 +52,9 @@ namespace gr {
*/
static sptr make(QWidget *parent=NULL);
virtual void exec_() = 0;
virtual QWidget* qwidget() = 0;
#if defined(PY_VERSION) || defined(SWIGPYTHON)
virtual PyObject* pyqwidget() = 0;
#else

View File

@ -93,6 +93,19 @@ qt_sink_c_impl::glctx_update()
}
void
qt_sink_c_impl::exec_()
{
d_qApplication->exec();
}
QWidget*
qt_sink_c_impl::qwidget()
{
return dynamic_cast<QWidget*>(this->d_gui);
}
#ifdef ENABLE_PYTHON
PyObject*
qt_sink_c_impl::pyqwidget()

View File

@ -53,6 +53,9 @@ namespace gr {
public:
qt_sink_c_impl(QWidget *parent=NULL);
void exec_();
QWidget* qwidget();
#if defined(PY_VERSION) || defined(SWIGPYTHON)
PyObject* pyqwidget();
#else