schrodinger.application.models.gui.delegates module¶
- class schrodinger.application.models.gui.delegates.IconConfig(icon: schrodinger.ui.panelx._common.icons.Icon, fill_color: PyQt6.QtGui.QColor)¶
Bases:
object- icon: Icon¶
- fill_color: QColor¶
- __init__(icon: Icon, fill_color: QColor) None¶
- class schrodinger.application.models.gui.delegates.TrailingIconDelegate¶
Bases:
QStyledItemDelegateA basic delegate that paints a trailing icon
- paint(self, painter: Optional[QPainter], option: QStyleOptionViewItem, index: QModelIndex)¶
- class schrodinger.application.models.gui.delegates.FileBrowserDelegate(*args, **kwargs)¶
Bases:
LineEditDelegateA delegate for file and structure inputs with a browse button.
For FILE and STRUCTURE input types, a browse button is shown on the right side of the cell. Clicking it opens a file dialog.
Display text is provided by the table model; this delegate is a pure renderer.
- createEditor(parent: QWidget, option: QStyleOptionViewItem, index: QModelIndex) PyQt6.QtWidgets.QWidget | None¶
Prevent inline text editing for file inputs.
- paint(painter: QPainter, option: QStyleOptionViewItem, index: QModelIndex) None¶
Paint the cell with text and optionally a browse button.
Non-file inputs use standard delegate rendering. File inputs use custom rendering with left-elided text and a browse button.
- editorEvent(event: QEvent, model: QAbstractItemModel, option: QStyleOptionViewItem, index: QModelIndex) bool¶
Handle mouse events. Opens file dialog if browse button is clicked.