Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module input_tab_widgets :: Class WorkspaceInclusionDelegate
[hide private]
[frames] | no frames]

Class WorkspaceInclusionDelegate

PyQt4.QtGui.QStyledItemDelegate --+
                                  |
                                 WorkspaceInclusionDelegate

A delegate for representing workspace inclusion as it is shown in the project table. This delegate allows an entry to be set as the only workspace entry by clicking, or allows workspace inclusion to be toggled by holding down Ctrl.

Instance Methods [hide private]
 
__init__(self, parent)
 
createEditor(self, parent, option, index)
This delegate does not have a separate editor widget, so we return None.
 
paint(self, painter, option, index)
Paint the appropriate icon
bool
editorEvent(self, event, model, option, index)
Handle mouse clicks and key presses
Method Details [hide private]

createEditor(self, parent, option, index)

 

This delegate does not have a separate editor widget, so we return None. All arguments are ignored, but are present for Qt compatibility.

paint(self, painter, option, index)

 

Paint the appropriate icon

Parameters:
  • painter (QPainter) - The painter being used to render the delegate
  • option (QStyleOptionViewItem) - The style options to use when painting
  • index (PyQt4.QtCore.QModelIndex) - The index being represented

editorEvent(self, event, model, option, index)

 

Handle mouse clicks and key presses

Parameters:
  • event (PyQt4.QtCore.QEvent) - The event that occurred
  • model (QAbstractTableModel) - The data model
  • option - Ignored, but present for Qt compatibility
  • index (PyQt4.QtCore.QModelIndex) - The index being edited
Returns: bool
True if the event was handled. False otherwise.