motile_plugin.widgets.motile.runs_list

Classes

RunButton

RunsList

Widget for holding in-memory Runs. Emits a view_run signal whenever

Module Contents

class motile_plugin.widgets.motile.runs_list.RunButton(run: motile_plugin.backend.motile_run.MotileRun)

Bases: qtpy.QtWidgets.QWidget

run
run_name
datetime
icon
delete
layout
sizeHint()
class motile_plugin.widgets.motile.runs_list.RunsList

Bases: qtpy.QtWidgets.QGroupBox

Widget for holding in-memory Runs. Emits a view_run signal whenever a run is selected in the list, useful for telling the widget to display the selected run.

view_run
file_dialog
runs_list
load_button
layout
_selection_changed()
add_run(run: motile_plugin.backend.motile_run.MotileRun, select=True)

Add a run to the list and optionally select it. Will make a new row in the list UI representing the given run.

Note: selecting the run will also emit the selection changed event on the list.

Args:

run (MotileRun): _description_ select (bool, optional): _description_. Defaults to True.

remove_run(item: qtpy.QtWidgets.QListWidgetItem)

Remove a run from the list. You must pass the list item that represents the run, not the run itself.

Args:
item (QListWidgetItem): The list item to remove. This list item

contains the RunButton that represents a run.

load_run()

Load a run from disk. The user selects the run directory created by calling save_run (named with the timestamp and run name).