def __init__(self, top_block, title='', scale=1): plot_form.__init__(self, top_block, title, scale) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1, 4, 1, 1) self.auto_scale = QtGui.QCheckBox("Auto Scale", self) if (self.top_block._auto_scale): self.auto_scale.setChecked(self.top_block._auto_scale) self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), self.set_auto_scale) self.right_col_layout.addWidget(self.auto_scale) self.ncols_edit = QtGui.QLineEdit(self) self.ncols_edit.setMinimumWidth(100) self.ncols_edit.setMaximumWidth(100) self.ncols_edit.setText(QtCore.QString("%1").arg(top_block._ncols)) self.right_col_form.addRow("Num. Cols.", self.ncols_edit) self.connect(self.ncols_edit, QtCore.SIGNAL("returnPressed()"), self.ncols_update) self.nrows_edit = QtGui.QLineEdit(self) self.nrows_edit.setMinimumWidth(100) self.nrows_edit.setMaximumWidth(100) self.nrows_edit.setText(QtCore.QString("%1").arg(top_block._nrows)) self.right_col_form.addRow("Num. Rows.", self.nrows_edit) self.connect(self.nrows_edit, QtCore.SIGNAL("returnPressed()"), self.nrows_update) self.add_raster_control(self.right_col_layout)
def __init__(self, top_block, title='', scale=1): plot_form.__init__(self, top_block, title, scale) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1,4,1,1) self.auto_scale = QtGui.QCheckBox("Auto Scale", self) if(self.top_block._auto_scale): self.auto_scale.setChecked(self.top_block._auto_scale) self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), self.set_auto_scale) self.right_col_layout.addWidget(self.auto_scale) self.ncols_edit = QtGui.QLineEdit(self) self.ncols_edit.setMinimumWidth(100) self.ncols_edit.setMaximumWidth(100) self.ncols_edit.setText(QtCore.QString("%1").arg(top_block._ncols)) self.right_col_form.addRow("Num. Cols.", self.ncols_edit) self.connect(self.ncols_edit, QtCore.SIGNAL("returnPressed()"), self.ncols_update) self.nrows_edit = QtGui.QLineEdit(self) self.nrows_edit.setMinimumWidth(100) self.nrows_edit.setMaximumWidth(100) self.nrows_edit.setText(QtCore.QString("%1").arg(top_block._nrows)) self.right_col_form.addRow("Num. Rows.", self.nrows_edit) self.connect(self.nrows_edit, QtCore.SIGNAL("returnPressed()"), self.nrows_update) self.add_raster_control(self.right_col_layout)
def __init__(self, top_block, title='', scale=1): plot_form.__init__(self, top_block, title, scale) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1,4,1,1) # Constellation resizing scales x and y together. # Set the bar to go from 0.001 to max self.ybar.setMinimum(1) self.ybar.setMaximum(self._pos_scale*self.top_block._y_max) self.ybar.setSingleStep(self._pos_scale*(max(self.top_block._y_range/10, 0.010))) self.ybar.setPageStep(self._pos_scale*(max(self.top_block._y_range/2, 0.010))) self.auto_scale = QtGui.QCheckBox("Auto Scale", self) if(self.top_block._auto_scale): self.auto_scale.setChecked(self.top_block._auto_scale) self.set_auto_scale(self.top_block._auto_scale) self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), self.set_auto_scale) self.right_col_layout.addWidget(self.auto_scale) self.ybar.setValue(1000*self.top_block._y_value) self.add_line_control(self.right_col_layout)
def __init__(self, top_block, title='', scale=1): plot_form.__init__(self, top_block, title, scale) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1, 4, 1, 1) # Constellation resizing scales x and y together. # Set the bar to go from 0.001 to max self.ybar.setMinimum(1) self.ybar.setMaximum(self._pos_scale * self.top_block._y_max) self.ybar.setSingleStep(self._pos_scale * (max(self.top_block._y_range / 10, 0.010))) self.ybar.setPageStep(self._pos_scale * (max(self.top_block._y_range / 2, 0.010))) self.auto_scale = QtGui.QCheckBox("Auto Scale", self) if (self.top_block._auto_scale): self.auto_scale.setChecked(self.top_block._auto_scale) self.set_auto_scale(self.top_block._auto_scale) self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), self.set_auto_scale) self.right_col_layout.addWidget(self.auto_scale) self.ybar.setValue(1000 * self.top_block._y_value) self.add_line_control(self.right_col_layout)
def __init__(self, top_block, title=''): plot_form.__init__(self, top_block, title) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1, 4, 1, 1) self.psd_size_val = QtGui.QIntValidator(0, 2**18, self) self.psd_size_edit = QtGui.QLineEdit(self) self.psd_size_edit.setMinimumWidth(50) self.psd_size_edit.setMaximumWidth(100) self.psd_size_edit.setText( QtCore.QString("%1").arg(top_block._psd_size)) self.psd_size_edit.setValidator(self.psd_size_val) self.right_col_form.addRow("FFT Size:", self.psd_size_edit) self.connect(self.psd_size_edit, QtCore.SIGNAL("returnPressed()"), self.update_psd_size) self.psd_win_combo = QtGui.QComboBox(self) self.psd_win_combo.addItems([ "None", "Hamming", "Hann", "Blackman", "Rectangular", "Kaiser", "Blackman-harris" ]) self.psd_win_combo.setCurrentIndex( self.top_block.gui_snk.fft_window() + 1) self.right_col_form.addRow("Window:", self.psd_win_combo) self.connect(self.psd_win_combo, QtCore.SIGNAL("currentIndexChanged(int)"), self.update_psd_win) self.psd_avg_val = QtGui.QDoubleValidator(0, 1.0, 4, self) self.psd_avg_edit = QtGui.QLineEdit(self) self.psd_avg_edit.setMinimumWidth(50) self.psd_avg_edit.setMaximumWidth(100) self.psd_avg_edit.setText(QtCore.QString("%1").arg(top_block._avg)) self.psd_avg_edit.setValidator(self.psd_avg_val) self.right_col_form.addRow("Average:", self.psd_avg_edit) self.connect(self.psd_avg_edit, QtCore.SIGNAL("returnPressed()"), self.update_psd_avg) self.autoscale_button = QtGui.QPushButton("Auto Scale", self) self.autoscale_button.setMaximumWidth(100) self.right_col_layout.addWidget(self.autoscale_button) self.connect(self.autoscale_button, QtCore.SIGNAL("clicked()"), self.spectrogram_auto_scale) self.add_spectrogram_control(self.right_col_layout)
def __init__(self, top_block, title=''): plot_form.__init__(self, top_block, title) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1,4,1,1) self.psd_size_val = QtGui.QIntValidator(0, 2**18, self) self.psd_size_edit = QtGui.QLineEdit(self) self.psd_size_edit.setMinimumWidth(50) self.psd_size_edit.setMaximumWidth(100) self.psd_size_edit.setText(QtCore.QString("%1").arg(top_block._psd_size)) self.psd_size_edit.setValidator(self.psd_size_val) self.right_col_form.addRow("FFT Size:", self.psd_size_edit) self.connect(self.psd_size_edit, QtCore.SIGNAL("returnPressed()"), self.update_psd_size) self.psd_win_combo = QtGui.QComboBox(self) self.psd_win_combo.addItems(["None", "Hamming", "Hann", "Blackman", "Rectangular", "Kaiser", "Blackman-harris"]) self.psd_win_combo.setCurrentIndex(self.top_block.gui_snk.fft_window()+1) self.right_col_form.addRow("Window:", self.psd_win_combo) self.connect(self.psd_win_combo, QtCore.SIGNAL("currentIndexChanged(int)"), self.update_psd_win) self.psd_avg_val = QtGui.QDoubleValidator(0, 1.0, 4, self) self.psd_avg_edit = QtGui.QLineEdit(self) self.psd_avg_edit.setMinimumWidth(50) self.psd_avg_edit.setMaximumWidth(100) self.psd_avg_edit.setText(QtCore.QString("%1").arg(top_block._avg)) self.psd_avg_edit.setValidator(self.psd_avg_val) self.right_col_form.addRow("Average:", self.psd_avg_edit) self.connect(self.psd_avg_edit, QtCore.SIGNAL("returnPressed()"), self.update_psd_avg) self.autoscale_button = QtGui.QPushButton("Auto Scale", self) self.autoscale_button.setMaximumWidth(100) self.right_col_layout.addWidget(self.autoscale_button) self.connect(self.autoscale_button, QtCore.SIGNAL("clicked()"), self.spectrogram_auto_scale) self.add_spectrogram_control(self.right_col_layout)
def __init__(self, top_block, title='', scale=1): plot_form.__init__(self, top_block, title, scale) self.right_col_layout = QtGui.QVBoxLayout() self.right_col_form = QtGui.QFormLayout() self.right_col_layout.addLayout(self.right_col_form) self.layout.addLayout(self.right_col_layout, 1,4,1,1) self.auto_scale = QtGui.QCheckBox("Auto Scale", self) if(self.top_block._auto_scale): self.auto_scale.setChecked(self.top_block._auto_scale) self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"), self.set_auto_scale) self.right_col_layout.addWidget(self.auto_scale) self.stem = QtGui.QCheckBox("Stem", self) self.connect(self.stem, QtCore.SIGNAL("stateChanged(int)"), self.enable_stem) self.right_col_layout.addWidget(self.stem) self.add_line_control(self.right_col_layout)