commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 18/24: qtgui: fixes number sink to handle P


From: git
Subject: [Commit-gnuradio] [gnuradio] 18/24: qtgui: fixes number sink to handle Python/C++ exposure (see: 6a78af5919133 and d9dbb6b489deb)
Date: Tue, 18 Mar 2014 17:51:41 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit e7942e24a48cde22e7503fec763983230bf65354
Author: Tom Rondeau <address@hidden>
Date:   Mon Mar 17 16:41:11 2014 -0400

    qtgui: fixes number sink to handle Python/C++ exposure (see: 6a78af5919133 
and d9dbb6b489deb)
---
 gr-qtgui/include/gnuradio/qtgui/number_sink.h | 3 +++
 gr-qtgui/lib/number_sink_impl.cc              | 6 ++++++
 gr-qtgui/lib/number_sink_impl.h               | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/gr-qtgui/include/gnuradio/qtgui/number_sink.h 
b/gr-qtgui/include/gnuradio/qtgui/number_sink.h
index c3829a1..7c7b865 100644
--- a/gr-qtgui/include/gnuradio/qtgui/number_sink.h
+++ b/gr-qtgui/include/gnuradio/qtgui/number_sink.h
@@ -73,9 +73,12 @@ namespace gr {
                       QWidget *parent=NULL);
 
       virtual void exec_() = 0;
+      virtual QWidget* qwidget() = 0;
 
 #ifdef ENABLE_PYTHON
       virtual PyObject* pyqwidget() = 0;
+#else
+      virtual void* pyqwidget() = 0;
 #endif
 
       virtual void set_update_time(double t) = 0;
diff --git a/gr-qtgui/lib/number_sink_impl.cc b/gr-qtgui/lib/number_sink_impl.cc
index a2a7d67..abfb872 100644
--- a/gr-qtgui/lib/number_sink_impl.cc
+++ b/gr-qtgui/lib/number_sink_impl.cc
@@ -131,6 +131,12 @@ namespace gr {
       PyObject *retarg = Py_BuildValue("N", w);
       return retarg;
     }
+#else
+    void *
+    number_sink_impl::pyqwidget()
+    {
+      return NULL;
+    }
 #endif
 
     void
diff --git a/gr-qtgui/lib/number_sink_impl.h b/gr-qtgui/lib/number_sink_impl.h
index ca1ad0f..0f4fd48 100644
--- a/gr-qtgui/lib/number_sink_impl.h
+++ b/gr-qtgui/lib/number_sink_impl.h
@@ -78,6 +78,8 @@ namespace gr {
 
 #ifdef ENABLE_PYTHON
       PyObject* pyqwidget();
+#else
+      void* pyqwidget();
 #endif
 
       void set_update_time(double t);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]