schrodinger.maestro_utils.surface_manager.surface_model module¶
- class schrodinger.maestro_utils.surface_manager.surface_model.SurfaceModel¶
Bases:
TreeModelSubclass of maestro_ui.maestro.TreeModel.
- Variables:
displayedSurfacesUpdated (QtCore.pyqtSignal) – Signal emitted when the displayed surfaces are updated.
_displayed_surfaces_count (int) – Count of displayed surfaces. Default = 0.
- displayedSurfacesUpdated¶
A
pyqtSignalemitted by instances of the class.
- __init__()¶
Constructor for SurfaceModel.
- updateSurfaceVisibility(surface_nodes: list[SurfaceNodeItem])¶
Update the visibility of the surfaces.
- Parameters:
surface_nodes – List of surface nodes to update.
- populateModel(project: Project) None¶
Populate the model with surface information from the project. We disconnect the leafItemsChecked signal before populating the model to avoid triggering visibility updates, and reconnect it after populating the model.
- Parameters:
project – The project containing surface information.
- setData(index, value, role)¶
Set the data for the model.
- Parameters:
index – The index of the item.
value – The value to set.
role – The role of the item.
- deleteSurfaces(surface_nodes: list[SurfaceNodeItem]) None¶
Delete the surfaces.
- Parameters:
surface_nodes – List of surface nodes to delete.
- removeRow(row: int, parent: QModelIndex = None) bool¶
Remove a row from the model. If row is an entry row, then we delete all its surface rows.
- Parameters:
row – The row to remove.
parent – The parent index.
- Returns:
True if the row was removed, False otherwise.