Function Runner
hardware_control.gui.widgets.function_runner module
- class hardware_control.gui.widgets.function_runner.FunctionRunnerTool(name: str, button_label: str, call_function: Callable, countdown: int = 0, countdown_callback=None)
Bases:
QGroupBoxCreate a button that runs a python function.
There is an option to add a countdown timer next to the button.
- Parameters:
name (str) – Name of the QGroupBox
button_label (str) – Label of the QPushbutton that will trigger the function call
call_function (Callable) – The function to call when the button gets pressed
countdown (int) – If > 0 then add a countdown to the right of the button
countdown_callback (Callable) – Call this function when the countdown reaches zero
- run_function()
- update_countdown()