From 144fa44ed2e0378e2ec585c3991108926d9449be Mon Sep 17 00:00:00 2001 From: trondeau Date: Sat, 25 Oct 2008 23:29:43 +0000 Subject: 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 --- gr-qtgui/src/python/qttest_f.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 gr-qtgui/src/python/qttest_f.py (limited to 'gr-qtgui/src/python/qttest_f.py') diff --git a/gr-qtgui/src/python/qttest_f.py b/gr-qtgui/src/python/qttest_f.py new file mode 100755 index 000000000..a950b35b1 --- /dev/null +++ b/gr-qtgui/src/python/qttest_f.py @@ -0,0 +1,29 @@ +#!/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 = 8192 + + win = gr.firdes.window(gr.firdes.WIN_HANN, fftsize, 0) + + src1 = gr.sig_source_f(1, gr.GR_SIN_WAVE, 0.1, 0.1, 0) + src2 = gr.sig_source_f(1, gr.GR_SIN_WAVE, 0.015, 0.1, 0) + src = gr.add_ff() + thr = gr.throttle(gr.sizeof_float, 20*fftsize) + self.snk = qtgui.sink_f(fftsize, win, -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(); + -- cgit