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

Class ScanCoordinatesDelegate

PyQt4.QtGui.QItemDelegate --+
                            |
                           ScanCoordinatesDelegate

This delegate is used to define how float coordinate values are displayed in a line edit widget. This class is needed for mapping between table view and other widgets as defined via QDataWidgetMapper.

Instance Methods [hide private]
 
setEditorData(self, editor, index)
This function is used to initialize editor with the relevant data.
 
setModelData(self, editor, model, index)
This function is responsible for transferring data from the editors back to the model.
Class Variables [hide private]
  COLUMN = ScanCoordinateColumns()
Method Details [hide private]

setEditorData(self, editor, index)

 

This function is used to initialize editor with the relevant data.

Parameters:
  • editor (QtGui.QWidget) - editor
  • index (QtGui.QModelIndex) - index of data in source model

setModelData(self, editor, model, index)

 

This function is responsible for transferring data from the editors back to the model. So, here we convert text string into float number.

Parameters:
  • editor (QtGui.QWidget) - editor
  • model (QtCore.QAbstractItemModel) - data model
  • index (QtGui.QModelIndex) - index of data in source model