summaryrefslogtreecommitdiff
path: root/gr-qtgui/src/python/qttest_c.py
diff options
context:
space:
mode:
authortrondeau2008-10-25 23:29:43 +0000
committertrondeau2008-10-25 23:29:43 +0000
commit144fa44ed2e0378e2ec585c3991108926d9449be (patch)
treebd4a6db6c9c1feb20fc30387ca702694ac427be7 /gr-qtgui/src/python/qttest_c.py
parent57b846ed17b0084563988d7817302f4f5b0d8e3c (diff)
downloadgnuradio-144fa44ed2e0378e2ec585c3991108926d9449be.tar.gz
gnuradio-144fa44ed2e0378e2ec585c3991108926d9449be.tar.bz2
gnuradio-144fa44ed2e0378e2ec585c3991108926d9449be.zip
Merging qtgui branch-r9068:9837: this ads a qtgui_sink_c and qtgui_sink_f that displays the time, PSD, and spectrogram plots of a signal put into it. It requires qt4, qwt, and qwtplot3d and has not been tested on OSX.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9853 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-qtgui/src/python/qttest_c.py')
-rwxr-xr-xgr-qtgui/src/python/qttest_c.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/gr-qtgui/src/python/qttest_c.py b/gr-qtgui/src/python/qttest_c.py
new file mode 100755
index 000000000..40d1f42b7
--- /dev/null
+++ b/gr-qtgui/src/python/qttest_c.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+from gnuradio import gr
+from gnuradio.qtgui import qtgui
+
+class my_top_block(gr.top_block):
+ def __init__(self):
+ gr.top_block.__init__(self)
+
+ fftsize = 2048
+
+ src1 = gr.sig_source_c(1, gr.GR_SIN_WAVE, 0.1, 0.01, 0)
+ src2 = gr.sig_source_c(1, gr.GR_SIN_WAVE, 0.015, 0.01, 0)
+ src = gr.add_cc()
+ thr = gr.throttle(gr.sizeof_gr_complex, 20*fftsize)
+ self.snk = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, -0.5, 0.5)
+
+ self.connect(src1, (src,0))
+ self.connect(src2, (src,1))
+ self.connect(src, thr, self.snk)
+
+if __name__ == "__main__":
+ tb = my_top_block();
+ tb.start()
+ tb.snk.start_app();
+ #tb.wait();
+