SetupInterfaceTemplate#
- class myogestic.gui.widgets.templates.SetupInterfaceTemplate(main_window, name='SetupUI', ui=None)[source]#
Base class for the setup interface of a visual interface.
This class contains the logic and the UI elements of the setup interface of a visual interface.
- _main_window#
The _main_window widget of the visual interface.
- Type:
Optional[QObject]
- outgoing_message_signal#
The outgoing message signal of the visual interface.
- Type:
PySide6.SignalInstance
- incoming_message_signal#
The incoming message signal of the visual interface.
- Type:
PySide6.SignalInstance
Methods
__init__
(main_window[, name, ui])_log_error
(message)Log an error message.
Clear the buffers of the custom signals.
close_event
(event)Close the interface and stop necessary processes.
Connect custom signals to slots.
Disable the UI elements.
Disconnect custom signals from slots.
Enable the UI elements.
Get custom data to save.
Initialize the logic of the UI elements.
Kill the visual interface.
Start the visual interface.
Stop the visual interface.
- abstract close_event(event)[source]#
Close the interface and stop necessary processes.
- Parameters:
event (QCloseEvent)
- Return type:
None
- disable_ui()[source]#
Disable the UI elements.
Important
This method assumes that the UI elements are in a groupBox widget.
- enable_ui()[source]#
Enable the UI elements.
Important
This method assumes that the UI elements are in a groupBox widget.
- get_custom_save_data()[source]#
Get custom data to save.
- Returns:
The custom data to save. If no custom data is available, an empty dictionary must be returned.
- Return type:
- abstract interface_was_killed()[source]#
Kill the visual interface.
This method should be called when the visual interface is killed. .. tip:: It is generally a good idea to also kill the connection to it here.
- Return type:
None