SFG GUI¶
Module contents¶
B-ASIC GUI Module.
Graphical user interface for B-ASIC.
Submodules¶
sfg_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.sfg_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)¶
sfg_gui.arrow module¶
B-ASIC GUI Arrow Module.
Contains a GUI class for arrows.
- class b_asic.sfg_gui.arrow.Arrow(source_port_button: PortButton, destination_port_button: PortButton, window: SFGMainWindow, signal: Signal | None = None, parent=None)¶
Bases:
QGraphicsPathItemArrow/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
- property destination_operation_button: DragButton¶
The destination DragButton.
- property destination_port_button: PortButton¶
The destination PortButton.
- set_destination_operation(destination: Operation) None¶
Set operation of the destination DragButton.
- Parameters:
- destination
Operation The operation to use as destination.
- destination
- set_source_operation(source: Operation) None¶
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.
sfg_gui.gui_interface module¶
B-ASIC GUI interface module.
Contains a GUI class for the interface. Originally generated from QT designer, but now manually maintained.
sfg_gui.precedence_graph_window module¶
B-ASIC window to show precedence graph.
- class b_asic.sfg_gui.precedence_graph_window.PrecedenceGraphWindow(window)¶
Bases:
QDialogPrecedence graph window.
- 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.
sfg_gui.properties_window module¶
B-ASIC GUI Properties Module.
Contains a GUI class the properties window.
sfg_gui.select_sfg_window module¶
B-ASIC select SFG window.
- class b_asic.sfg_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.
sfg_gui.signal_generator_input module¶

B-ASIC GUI Signal Generator Input Module.
Contains classes for signal generator input.
- class b_asic.sfg_gui.signal_generator_input.ConstantInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputClass for graphically configuring and generating a
Constantsignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.DelayInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputAbstract 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.sfg_gui.signal_generator_input.FromFileInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputClass for graphically configuring and generating a
FromFilesignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.GaussianInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputClass for graphically configuring and generating a
Gaussiansignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.ImpulseInput(*args, **kwargs)¶
Bases:
DelayInputClass for graphically configuring and generating an
Impulsesignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.SignalGeneratorInput(logger, *args, **kwargs)¶
Bases:
QGridLayoutAbstract class for graphically configuring and generating signal generators.
- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.SinusoidInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputClass for graphically configuring and generating a
Sinusoidsignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.StepInput(*args, **kwargs)¶
Bases:
DelayInputClass for graphically configuring and generating a
Stepsignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.UniformInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputClass for graphically configuring and generating a
Uniformsignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
- class b_asic.sfg_gui.signal_generator_input.ZeroPadInput(*args, **kwargs)¶
Bases:
SignalGeneratorInputClass for graphically configuring and generating a
ZeroPadsignal generator.- get_generator() SignalGenerator¶
Return the SignalGenerator based on the graphical input.
sfg_gui.simulate_sfg_window module¶
B-ASIC window to simulate an SFG.
- class b_asic.sfg_gui.simulate_sfg_window.SimulateSFGWindow(window)¶
Bases:
QDialogSimulation 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.
sfg_gui.simulation_worker module¶
B-ASIC GUI Simulation Worker Module.
Contains a class for simulation workers.
- class b_asic.sfg_gui.simulation_worker.SimulationWorker(sfg: SFG, properties)¶
Bases:
QObjectSimulation 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.
sfg_gui.util_dialogs module¶
B-ASIC GUI Utility Dialogs Module.
- class b_asic.sfg_gui.util_dialogs.FaqWindow(window)¶
Bases:
QDialog