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:
parent
2140ef7bb1
commit
4254a3a714
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue