schrodinger.maestro_utils.surface_manager.surface_model module¶
- class schrodinger.maestro_utils.surface_manager.surface_model.SurfaceModel¶
Bases:
TreeModel
Subclass 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
pyqtSignal
emitted 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)¶
Populate the model with surface information from the project.
- 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.
- getSurfaceNodesFromIndices(indices: list[PyQt6.QtCore.QModelIndex]) list[SurfaceNodeItem] ¶
Get the surface nodes from given indices.
- Parameters:
indices – List of indices.
- Returns:
List of surface nodes.
- getSurfaceNodesFromEntryNode(entry_node: EntryNodeItem) list[SurfaceNodeItem] ¶
Get the surface nodes from the entry node.
- Parameters:
entry_node – The entry node item.
- Returns:
List of surface nodes.
- deleteSurfaces(surface_nodes: list[SurfaceNodeItem])¶
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.