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.

Parameters:
_main_window#

The _main_window widget of the visual interface.

Type:

Optional[QObject]

name#

The name of the visual interface.

Type:

str

ui#

The UI layout of the setup interface.

Type:

object

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_custom_signal_buffers()

Clear the buffers of the custom signals.

close_event(event)

Close the interface and stop necessary processes.

connect_custom_signals()

Connect custom signals to slots.

disable_ui()

Disable the UI elements.

disconnect_custom_signals()

Disconnect custom signals from slots.

enable_ui()

Enable the UI elements.

get_custom_save_data()

Get custom data to save.

initialize_ui_logic()

Initialize the logic of the UI elements.

interface_was_killed()

Kill the visual interface.

start_interface()

Start the visual interface.

stop_interface()

Stop the visual interface.

abstract clear_custom_signal_buffers()[source]#

Clear the buffers of the custom signals.

abstract close_event(event)[source]#

Close the interface and stop necessary processes.

Parameters:

event (QCloseEvent)

Return type:

None

abstract connect_custom_signals()[source]#

Connect custom signals to slots.

disable_ui()[source]#

Disable the UI elements.

Important

This method assumes that the UI elements are in a groupBox widget.

abstract disconnect_custom_signals()[source]#

Disconnect custom signals from slots.

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:

dict

abstract initialize_ui_logic()[source]#

Initialize the logic of the UI elements.

Return type:

None

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

abstract start_interface()[source]#

Start the visual interface.

This method should be called when the visual interface is started. .. tip:: It is generally a good idea to also start the connection to it here.

Return type:

None

abstract stop_interface()[source]#

Stop the visual interface.

This method should be called when the visual interface is stopped. .. tip:: It is generally a good idea to also stop the connection to it here.

Return type:

None