Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Module optimization_tab :: Class ConstraintCoordinatesDelegate
[hide private]
[frames] | no frames]

Class ConstraintCoordinatesDelegate

PyQt4.QtGui.QItemDelegate --+
                            |
                           ConstraintCoordinatesDelegate

This delegate is used to validate values entered in 'target value' column.

Instance Methods [hide private]
QtGui.QLineEdit
createEditor(self, parent, option, index)
This function returns an editor widget (QLineEdit) for 'target value' column.
 
setEditorData(self, editor, index)
This function read data from model, converts it to text and sets it in the editor widget.
 
setModelData(self, editor, model, index)
This function reads text from QLineEdit and writes it to the model
Class Variables [hide private]
  COLUMN = ConstraintCoordinateColumns()
Method Details [hide private]

createEditor(self, parent, option, index)

 

This function returns an editor widget (QLineEdit) for 'target value' column.

Parameters:
  • parent (QtGui.QWidget) - parent widget
  • option (QtGui.QStyleOptionViewItem) - not used, but kept for compatibility
  • index (QtCore.QModelIndex) - model index
Returns: QtGui.QLineEdit
QLineEdit editor widget

setEditorData(self, editor, index)

 

This function read data from model, converts it to text and sets it in the editor widget.

Parameters:
  • editor (QtGui.QLineEdit) - editor widget
  • index (QtCore.QModelIndex) - model index

setModelData(self, editor, model, index)

 

This function reads text from QLineEdit and writes it to the model

Parameters:
  • editor (QtGui.QLineEdit) - editor widget
  • model (QtCore.QAbstractItemModel) - data model
  • index (QtCore.QModelIndex) - model index