MCPcopy Create free account
hub / github.com/FutureSDR/FutureSDR / __init__

Method __init__

examples/ssb/ssbdecoder.py:48–153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46class ssbdecoder(gr.top_block, Qt.QWidget):
47
48 def __init__(self):
49 gr.top_block.__init__(self, "SSB decoder", catch_exceptions=True)
50 Qt.QWidget.__init__(self)
51 self.setWindowTitle("SSB decoder")
52 qtgui.util.check_set_qss()
53 try:
54 self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
55 except:
56 pass
57 self.top_scroll_layout = Qt.QVBoxLayout()
58 self.setLayout(self.top_scroll_layout)
59 self.top_scroll = Qt.QScrollArea()
60 self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
61 self.top_scroll_layout.addWidget(self.top_scroll)
62 self.top_scroll.setWidgetResizable(True)
63 self.top_widget = Qt.QWidget()
64 self.top_scroll.setWidget(self.top_widget)
65 self.top_layout = Qt.QVBoxLayout(self.top_widget)
66 self.top_grid_layout = Qt.QGridLayout()
67 self.top_layout.addLayout(self.top_grid_layout)
68
69 self.settings = Qt.QSettings("GNU Radio", "ssbdecoder")
70
71 try:
72 if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
73 self.restoreGeometry(self.settings.value("geometry").toByteArray())
74 else:
75 self.restoreGeometry(self.settings.value("geometry"))
76 except:
77 pass
78
79 ##################################################
80 # Variables
81 ##################################################
82 self.samp_rate_low = samp_rate_low = 32000
83 self.samp_rate = samp_rate = 256000
84
85 ##################################################
86 # Blocks
87 ##################################################
88 self.qtgui_waterfall_sink_x_0 = qtgui.waterfall_sink_c(
89 1024, #size
90 window.WIN_BLACKMAN_hARRIS, #wintype
91 0, #fc
92 samp_rate_low, #bw
93 "", #name
94 1, #number of inputs
95 None # parent
96 )
97 self.qtgui_waterfall_sink_x_0.set_update_time(0.10)
98 self.qtgui_waterfall_sink_x_0.enable_grid(False)
99 self.qtgui_waterfall_sink_x_0.enable_axis_labels(True)
100
101
102
103 labels = ['', '', '', '', '',
104 '', '', '', '', '']
105 colors = [0, 0, 0, 0, 0,

Callers

nothing calls this directly

Calls 1

connectMethod · 0.45

Tested by

no test coverage detected