Block Diagram GUI¶
Module contents¶
B-ASIC GUI Module.
Graphical user interface for B-ASIC.
Submodules¶
GUI.main_window module¶
B-ASIC Signal Flow Graph Editor Module.
This file opens the main SFG editor window of the GUI for B-ASIC when run.
- class b_asic.GUI.main_window.SFGMainWindow(*args, **kwargs)¶
Bases:
QMainWindow
- add_namespace(*args, **kwargs)¶
- add_operation(*args, **kwargs)¶
- add_operations_from_namespace(*args, **kwargs)¶
- create_sfg_from_toolbar(*args, **kwargs)¶
- display_about_page(*args, **kwargs)¶
- display_faq_page(*args, **kwargs)¶
- display_keybindings_page(*args, **kwargs)¶
- exit_app(*args, **kwargs)¶
- get_operations_from_namespace(*args, **kwargs)¶
- load_work(*args, **kwargs)¶
- save_work(*args, **kwargs)¶
- simulate_sfg(*args, **kwargs)¶
- update_statusbar(*args, **kwargs)¶
- view_operation_names(*args, **kwargs)¶
GUI.arrow module¶
- class b_asic.GUI.arrow.Arrow(source_port_button: PortButton, destination_port_button: PortButton, window: SFGMainWindow, signal: Signal | None = None, parent=None)¶
Bases:
QGraphicsPathItem
Arrow/connection in signal flow graph GUI.
- Parameters:
- source_port_button
PortButton
Source port button.
- destination_port_button
PortButton
Destination port button.
- window
SFGMainWindow
Window containing signal flow graph.
- signalSignal, optional
Let arrow represent signal.
- parentoptional
Parent.
- source_port_button
- contextMenuEvent(event)¶
Open right-click menu.
- Parameters:
- eventQEvent
The event.
- property destination_operation_button: DragButton¶
The destination DragButton.
- property destination_port_button: PortButton¶
The destination PortButton.
- remove()¶
Remove line and connections to signals etc.
- set_destination_operation(destination: Operation)¶
Set operation of the destination DragButton.
- Parameters:
- destination
Operation
The operation to use as destination.
- destination
- set_source_operation(source: Operation)¶
Set operation of the source DragButton.
- Parameters:
- source
Operation
The operation to use as source.
- source
- property source_operation_button: DragButton¶
The source DragButton.
- property source_port: OutputPort¶
The source OutputPort.
- property source_port_button: PortButton¶
The source PortButton.
- update_arrow()¶
Update coordinates for arrow.
Used as callback when moving operations.
GUI.gui_interface module¶
GUI.precedence_graph_window module¶
B-ASIC window to show precedence graph.
- class b_asic.GUI.precedence_graph_window.PrecedenceGraphWindow(window)¶
Bases:
QDialog
Precedence graph window.
- add_sfg_to_dialog()¶
- pc¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- show_precedence_graph()¶
GUI.properties_window module¶
GUI.select_sfg_window module¶
B-ASIC select SFG window.
- class b_asic.GUI.select_sfg_window.SelectSFGWindow(window: SFGMainWindow)¶
Bases:
QDialog
- ok¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- save_properties()¶
GUI.signal_generator_input module¶

- class b_asic.GUI.signal_generator_input.ConstantInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Class for graphically configuring and generating a
Constant
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.DelayInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Abstract class for graphically configuring and generating signal generators that have a single delay parameter.
- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.FromFileInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Class for graphically configuring and generating a
FromFile
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- get_input_file(i, file_browser)¶
- class b_asic.GUI.signal_generator_input.GaussianInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Class for graphically configuring and generating a
Gaussian
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.ImpulseInput(*args, **kwargs)¶
Bases:
DelayInput
Class for graphically configuring and generating an
Impulse
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.SignalGeneratorInput(logger, *args, **kwargs)¶
Bases:
QGridLayout
Abstract class for graphically configuring and generating signal generators.
- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.SinusoidInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Class for graphically configuring and generating a
Sinusoid
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.StepInput(*args, **kwargs)¶
Bases:
DelayInput
Class for graphically configuring and generating a
Step
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.UniformInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Class for graphically configuring and generating a
Uniform
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
- class b_asic.GUI.signal_generator_input.ZeroPadInput(*args, **kwargs)¶
Bases:
SignalGeneratorInput
Class for graphically configuring and generating a
ZeroPad
signal generator.- get_generator() SignalGenerator ¶
Return the SignalGenerator based on the graphical input.
GUI.simulate_sfg_window module¶
B-ASIC window to simulate an SFG.
- class b_asic.GUI.simulate_sfg_window.SimulateSFGWindow(window)¶
Bases:
QDialog
Simulation window.
- add_sfg_to_dialog(sfg: SFG) None ¶
Add a signal flow graph to the dialog.
- Parameters:
- sfgSFG
The signal flow graph to add.
- change_input_format(i: int, text: str) None ¶
Change the input format selector.
- Parameters:
- iint
Input number to change for.
- textstr
Name of generator.
- simulate¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
GUI.simulation_worker module¶
- class b_asic.GUI.simulation_worker.SimulationWorker(sfg: SFG, properties)¶
Bases:
QObject
Simulation worker to enable running simulation in a separate thread.
- Parameters:
- sfgSFG
The signal flow graph to simulate.
- propertiesdict
Dictionary containing information about the simulation.
- finished¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- start_simulation()¶
Start simulation and emit signal when finished.
GUI.util_dialogs module¶
- class b_asic.GUI.util_dialogs.FaqWindow(window)¶
Bases:
QDialog