magneticalc.ModelAccess.ModelAccess

# ``magneticalc`.`ModelAccess`.`ModelAccess``

class documentation

`class ModelAccess:`

Constructor: `ModelAccess(gui, recalculate)`

View In Hierarchy

Model access class.

Method | `__enter__` | Entering the context kills possibly running calculation if recalculation is enabled.
Method | `__exit__` | Leaving the context starts recalculation if enabled; otherwise, just redraw.
Method | `__init__` | Initializes model access.
Class Variable | `DebugValidity` | Undocumented
Instance Variable | `gui` | Undocumented
Instance Variable | `_recalculate` | Undocumented

def __enter__(self):

Entering the context kills possibly running calculation if recalculation is enabled.

def __exit__(self, _exc_type: `type[BaseException] | None`, _exc_val: `BaseException | None`, _exc_tb: `TracebackType | None`):

Leaving the context starts recalculation if enabled; otherwise, just redraw.

def __init__(self, gui: `GUI`, recalculate: `bool`):

Initializes model access.

Parameters
gui: `GUI` | GUI
recalculate: `bool` | Enable to recalculate upon exiting the context

DebugValidity: `bool` =

Undocumented

gui =

Undocumented

_recalculate =

Undocumented