blacs.tab_base_classes.Tab

class blacs.tab_base_classes.Tab(notebook, settings, restart=False)[source]

Bases: object

__init__(notebook, settings, restart=False)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(notebook, settings[, restart])

Initialize self.

check_time()

clean_ui_on_restart()

close_tab([finalise])

Close the tab, terminate subprocesses and join the mainloop thread.

connect_restart_receiver(function)

continue_restart(currentpage)

Called in a thread for the stages of restarting that may be blocking, so as to not block the main thread.

create_worker(name, WorkerClass[, workerargs])

Set up a worker process.

disconnect_restart_receiver(function)

finalise_close_tab(currentpage)

finalise_restart(currentpage)

get_all_save_data()

get_builtin_save_data()

Get builtin settings to be restored like whether the terminal is visible.

get_tab_layout()

hide_error()

mainloop()

on_force_full_buffered_reprogram()

queue_work(worker_process, worker_function, …)

restart(*args)

restore_builtin_save_data(data)

Restore builtin settings to be restored like whether the terminal is visible.

set_tab_icon_and_colour()

Set the tab icon and the colour of its text to the values of self._tab_icon and self._tab_text_colour respectively

set_terminal_visible(visible)

shutdown_workers(*args, **kwargs)

statemachine_timeout_add(delay, …)

statemachine_timeout_remove(statefunction)

statemachine_timeout_remove_all()

supports_smart_programming(support)

update_from_settings(settings)

Attributes

ICON_BUSY

ICON_ERROR

ICON_FATAL_ERROR

ICON_OK

device_name

error_message

force_full_buffered_reprogram

mode

state

ICON_BUSY = ':/qtutils/fugue/hourglass'
ICON_ERROR = ':/qtutils/fugue/exclamation'
ICON_FATAL_ERROR = ':/qtutils/fugue/exclamation-red'
ICON_OK = ':/qtutils/fugue/tick'
check_time()[source]
clean_ui_on_restart()[source]
close_tab(finalise=True)[source]

Close the tab, terminate subprocesses and join the mainloop thread. If finalise=False, then do not terminate subprocesses or join the mainloop. In this case, callers must manually call finalise_close_tab() to perform these potentially blocking operations

connect_restart_receiver(function)[source]
continue_restart(currentpage)[source]

Called in a thread for the stages of restarting that may be blocking, so as to not block the main thread. Calls subsequent GUI operations in the main thread once finished blocking.

create_worker(name, WorkerClass, workerargs=None)[source]

Set up a worker process. WorkerClass can either be a subclass of Worker, or a string containing a fully qualified import path to a worker. The latter is useful if the worker class is in a separate file with global imports or other import-time behaviour that is undesirable to have run in the main process, for example if the imports may not be available to the main process (as may be the case once remote worker processes are implemented and the worker may be on a separate computer). The worker process will not be started immediately, it will be started once the state machine mainloop begins running. This way errors in startup will be handled using the normal state machine machinery.

property device_name
disconnect_restart_receiver(function)[source]
property error_message
finalise_close_tab(currentpage)[source]
finalise_restart(currentpage)[source]
property force_full_buffered_reprogram
get_all_save_data()[source]
get_builtin_save_data()[source]

Get builtin settings to be restored like whether the terminal is visible. Not to be overridden.

get_tab_layout()[source]
hide_error()[source]
mainloop()[source]
property mode
on_force_full_buffered_reprogram()[source]
queue_work(worker_process, worker_function, *args, **kwargs)[source]
restart(*args)[source]
restore_builtin_save_data(data)[source]

Restore builtin settings to be restored like whether the terminal is visible. Not to be overridden.

set_tab_icon_and_colour()[source]

Set the tab icon and the colour of its text to the values of self._tab_icon and self._tab_text_colour respectively

set_terminal_visible(visible)[source]
shutdown_workers(*args, **kwargs)[source]
property state
statemachine_timeout_add(delay, statefunction, *args, **kwargs)[source]
statemachine_timeout_remove(statefunction)[source]
statemachine_timeout_remove_all()[source]
supports_smart_programming(support)[source]
update_from_settings(settings)[source]