schrodinger.maestro_utils.surface_manager.delegates module¶
- class schrodinger.maestro_utils.surface_manager.delegates.ChildIndentDelegate(parent: QTreeView, default_indentation: int)¶
Bases:
QStyledItemDelegate
Custom delegate that renders child items without indentation while preserving parent row indentation. It does that by adjusting the left position of the item rectangle to the left by the default indentation for child items.
- __init__(parent: QTreeView, default_indentation: int)¶
Constructor for ChildIndentDelegate. :param parent: The parent widget. :param default_indentation: The default indentation for items in the tree.
- paint(self, painter: Optional[QPainter], option: QStyleOptionViewItem, index: QModelIndex)¶