scistag.vislog.widgets.log_button.LogButton

class LogButton(log, name, caption='', on_click=None)[source]

Bases: LogWidget

The LogButton adds a button the log which upon click triggers it’s click event.

Parameters
  • log (VisualLog) – The log to which the button shall be added

  • name (str) – The button’s name

  • caption (str) – The button’s caption

  • on_click (Callable | None) – The function to be called when the button is clicked

Methods

handle_event

Is called for each event received by the web server

write

Tells the widget to write all of it's data to the log

Attributes

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)

caption

The buttons caption

handle_event(event)[source]

Is called for each event received by the web server

write()[source]

Tells the widget to write all of it’s data to the log

caption

The buttons caption

log

The log to which this widget belongs

name

The widget’s name

visible

Defines if the widget is currently visible