motile_plugin.widgets.motile.params_viewer

Classes

ParamView

SolverParamsViewer

Widget for viewing SolverParams. To update for a backend change to

Module Contents

class motile_plugin.widgets.motile.params_viewer.ParamView(param_name: str, solver_params: motile_plugin.backend.solver_params.SolverParams)

Bases: qtpy.QtWidgets.QWidget

param_name
field
dtype
title
param_label
param_value
layout
update_from_params(params: motile_plugin.backend.solver_params.SolverParams)

Updates the current parameter value displayed in self.param_value, or hides the whole row if the value is None.

Args:
params (SolverParams): The solver parameters we use to update

the UI. This object uses self.param_name to know which value to retrieve.

class motile_plugin.widgets.motile.params_viewer.SolverParamsViewer

Bases: qtpy.QtWidgets.QWidget

Widget for viewing SolverParams. To update for a backend change to SolverParams, emit the new_params signal, which each parameter label will connect to and use to update the UI.

new_params
solver_params
param_categories
main_layout
_params_group(title: str, param_category: str) qtpy.QtWidgets.QGroupBox

A helper function to create a group of parameters in the UI. Also connects each parameter to the self.new_params signal so the values can be updated when new parameters are viewed.

Args:

title (str): The title to put at the top of the group param_category (str): A key of self.param_categories used to

get the list of parameters in this group.

Returns:
QGroupBox: A widget containing all the parameters in the group,

with static titles and values that can be updated via emitting the self.new_params signal.