blacs.tab_base_classes.Tab
- class blacs.tab_base_classes.Tab(notebook, settings, restart=False)[source]
Bases:
object
Methods
__init__
(notebook, settings[, 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 builtin settings to be restored like whether the terminal is visible.
mainloop
()queue_work
(worker_process, worker_function, ...)restart
(*args)Restore builtin settings to be restored like whether the terminal is visible.
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)supports_smart_programming
(support)update_from_settings
(settings)Attributes
- ICON_BUSY = ':/qtutils/fugue/hourglass'
- ICON_ERROR = ':/qtutils/fugue/exclamation'
- ICON_FATAL_ERROR = ':/qtutils/fugue/exclamation-red'
- ICON_OK = ':/qtutils/fugue/tick'
- 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
- 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
- property error_message
- property force_full_buffered_reprogram
- get_builtin_save_data()[source]
Get builtin settings to be restored like whether the terminal is visible. Not to be overridden.
- property mode
- 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
- property state