GNU Radio's TEST Package
qt_sink_c.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013-2021 Sylvain Munaut <tnt@246tNt.com>
4 *
5 * This file is part of gr-fosphor
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 */
9
10#pragma once
11
14
15#include <gnuradio/sync_block.h>
16
17class QApplication;
18class QWidget;
19
20namespace gr {
21 namespace fosphor {
22
23 /*!
24 * \brief Qt version of fosphor sink
25 * \ingroup fosphor
26 */
27 class GR_FOSPHOR_API qt_sink_c : virtual public base_sink_c
28 {
29 public:
30 typedef std::shared_ptr<qt_sink_c> sptr;
31
32 /*!
33 * \brief Return a shared_ptr to a new instance of fosphor::qt_sink_c.
34 *
35 * To avoid accidental use of raw pointers, fosphor::qt_sink_c's
36 * constructor is in a private implementation
37 * class. fosphor::qt_sink_c::make is the public interface for
38 * creating new instances.
39 */
40 static sptr make(QWidget *parent=NULL);
41
42 virtual void exec_() = 0;
43 virtual QWidget* qwidget() = 0;
44
45#if defined(PY_VERSION)
46 virtual PyObject* pyqwidget() = 0;
47#else
48 virtual void* pyqwidget() = 0;
49#endif
50
51 QApplication *d_qApplication;
52 };
53
54 } // namespace fosphor
55} // namespace gr
#define GR_FOSPHOR_API
Definition: api.h:17
Base fosphor sink API interface.
Definition: base_sink_c.h:25
Qt version of fosphor sink.
Definition: qt_sink_c.h:28
virtual void exec_()=0
virtual void * pyqwidget()=0
virtual QWidget * qwidget()=0
static sptr make(QWidget *parent=NULL)
Return a shared_ptr to a new instance of fosphor::qt_sink_c.
std::shared_ptr< qt_sink_c > sptr
Definition: qt_sink_c.h:30
QApplication * d_qApplication
Definition: qt_sink_c.h:51
Definition: base_sink_c.h:17
Definition: private.h:31