schrodinger.application.models.gui.delegates.value_routing_delegate module

Routing delegate for value cells with mixed input types.

Qt assigns one delegate per column, but the value column contains mixed input types. This thin dispatcher routes paint/edit/event calls to the correct type-specific sub-delegate.

class schrodinger.application.models.gui.delegates.value_routing_delegate.ValueRoutingDelegate(parent: PyQt6.QtCore.QObject | None = None)

Bases: QStyledItemDelegate

Routing delegate that dispatches to the correct delegate based on InputType.

Qt assigns one delegate per column, but the value column contains mixed input types. This thin dispatcher routes paint/edit/event calls to the correct type-specific sub-delegate.

__init__(parent: PyQt6.QtCore.QObject | None = None)
paint(self, painter: Optional[QPainter], option: QStyleOptionViewItem, index: QModelIndex)
createEditor(self, parent: Optional[QWidget], option: QStyleOptionViewItem, index: QModelIndex) Optional[QWidget]
setEditorData(self, editor: Optional[QWidget], index: QModelIndex)
setModelData(self, editor: Optional[QWidget], model: Optional[QAbstractItemModel], index: QModelIndex)
updateEditorGeometry(self, editor: Optional[QWidget], option: QStyleOptionViewItem, index: QModelIndex)
sizeHint(self, option: QStyleOptionViewItem, index: QModelIndex) QSize
helpEvent(self, event: Optional[QHelpEvent], view: Optional[QAbstractItemView], option: QStyleOptionViewItem, index: QModelIndex) bool
editorEvent(self, event: Optional[QEvent], model: Optional[QAbstractItemModel], option: QStyleOptionViewItem, index: QModelIndex) bool
eventFilter(obj, event)

Route viewport events to the correct sub-delegate.

setFileNameMapping(mapping: dict[str, str]) None

Forward file name mapping to the file delegate.