def open_modulator_dialog(self): selected_message = self.simulator_message_table_model.protocol.messages[self.ui.tblViewMessage.selected_rows[0]] preselected_index = selected_message.modulator_index modulator_dialog = ModulatorDialog(self.project_manager.modulators, tree_model=self.tree_model, parent=self) modulator_dialog.ui.comboBoxCustomModulations.setCurrentIndex(preselected_index) modulator_dialog.showMaximized() modulator_dialog.initialize(selected_message.encoded_bits_str[0:10]) modulator_dialog.finished.connect(self.refresh_modulators) modulator_dialog.finished.connect(self.generator_tab_controller.refresh_pause_list)
def on_btn_configuration_dialog_clicked(self): dialog = ModulatorDialog(self.modulators, parent=self) if self.signal_tree_model: dialog.ui.treeViewSignals.setModel(self.signal_tree_model) dialog.ui.treeViewSignals.expandAll() dialog.ui.comboBoxCustomModulations.setCurrentIndex( self.ui.comboBoxModulationProfiles.currentIndex()) dialog.finished.connect(self.refresh_modulators_from_dialog) dialog.exec_()
def open_modulator_dialog(self): selected_message = self.simulator_message_table_model.protocol.messages[self.ui.tblViewMessage.selected_rows[0]] preselected_index = selected_message.modulator_index modulator_dialog = ModulatorDialog(self.project_manager.modulators, parent=self) modulator_dialog.ui.treeViewSignals.setModel(self.tree_model) modulator_dialog.ui.treeViewSignals.expandAll() modulator_dialog.ui.comboBoxCustomModulations.setCurrentIndex(preselected_index) modulator_dialog.showMaximized() self.generator_tab_controller.initialize_modulation_dialog(selected_message.encoded_bits_str[0:10], modulator_dialog) modulator_dialog.finished.connect(self.refresh_modulators) modulator_dialog.finished.connect(self.generator_tab_controller.refresh_pause_list)
def prepare_modulation_dialog(self) -> (ModulatorDialog, Message): preselected_index = self.ui.cBoxModulations.currentIndex() min_row, max_row, start, end = self.ui.tableMessages.selection_range() if min_row > -1: try: selected_message = self.table_model.protocol.messages[min_row] preselected_index = selected_message.modulator_index except IndexError: selected_message = Message([1, 0, 1, 0, 1, 0, 1, 0], 0, [], MessageType("empty")) else: selected_message = Message([1, 0, 1, 0, 1, 0, 1, 0], 0, [], MessageType("empty")) if len(self.table_model.protocol.messages) > 0: selected_message.bit_len = self.table_model.protocol.messages[ 0].bit_len for m in self.modulators: m.default_sample_rate = self.project_manager.device_conf[ "sample_rate"] modulator_dialog = ModulatorDialog(self.modulators, tree_model=self.tree_model, parent=self.parent()) modulator_dialog.ui.comboBoxCustomModulations.setCurrentIndex( preselected_index) modulator_dialog.finished.connect(self.refresh_modulators) modulator_dialog.finished.connect(self.refresh_pause_list) return modulator_dialog, selected_message
def on_btn_configuration_dialog_clicked(self): dialog = ModulatorDialog(self.modulators, tree_model=self.signal_tree_model, parent=self) dialog.ui.comboBoxCustomModulations.setCurrentIndex( self.ui.comboBoxModulationProfiles.currentIndex()) dialog.finished.connect(self.refresh_modulators_from_dialog) dialog.show() dialog.initialize("10101011010010")
def initialize_modulation_dialog(self, bits: str, dialog: ModulatorDialog): dialog.on_modulation_type_changed( ) # for drawing modulated signal initially dialog.original_bits = bits dialog.ui.linEdDataBits.setText(bits) dialog.ui.gVOriginalSignal.signal_tree_root = self.tree_model.rootItem dialog.draw_original_signal() dialog.ui.gVModulated.show_full_scene(reinitialize=True) dialog.ui.gVData.show_full_scene(reinitialize=True) dialog.ui.gVData.auto_fit_view() dialog.ui.gVCarrier.show_full_scene(reinitialize=True) dialog.ui.gVCarrier.auto_fit_view() dialog.mark_samples_in_view()
def on_btn_configuration_dialog_clicked(self): dialog = ModulatorDialog(self.modulators, tree_model=self.signal_tree_model, parent=self) dialog.ui.comboBoxCustomModulations.setCurrentIndex(self.ui.comboBoxModulationProfiles.currentIndex()) dialog.finished.connect(self.refresh_modulators_from_dialog) dialog.show() dialog.initialize("101010")