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

Class ConstraintCoordinatesModel

PyQt4.QtCore.QAbstractTableModel --+    
                                   |    
        coordinates.CoordinatesModel --+
                                       |
                                      ConstraintCoordinatesModel

A model to store scan tab coordinates data.

Instance Methods [hide private]
 
addCoordinate(self, st, atoms, coordinate_type, target_value=None)
Add new coordinate row.
 
flags(self, index)
Returns flags for the specified cell.
 
data(self, index, role=Qt.DisplayRole)
Retrieve the requested data
 
setData(self, index, value, role=Qt.EditRole)
Modify coordinate values.

Inherited from coordinates.CoordinatesModel: __init__, checkNewCoordinate, columnCount, findCoordinate, headerData, removeCoordinate, removeRow, reset, rowCount

Class Variables [hide private]
object COLUMN = ConstraintCoordinateColumns()
class that contains information about columns in which coordinates data is displayed.
Method Details [hide private]

addCoordinate(self, st, atoms, coordinate_type, target_value=None)

 

Add new coordinate row.

Parameters:
  • st (schrodinger.structure.Structure) - structure
  • atoms (list) - atom indices
  • coordinate_type (int) - coordinate type
  • target_value (float) - target coordinate value

flags(self, index)

 

Returns flags for the specified cell. Whether it is editable or not.

Parameters:
  • index (PyQt4.QtCore.QModelIndex) - The index to retrieve flags for.

data(self, index, role=Qt.DisplayRole)

 

Retrieve the requested data

Parameters:
  • index (PyQt4.QtCore.QModelIndex) - The index to retrieve data for
  • role (int) - The role to retrieve data for
Returns:
The requested data

setData(self, index, value, role=Qt.EditRole)

 

Modify coordinate values.

Parameters:
  • index (QtCore.QModelIndex) - the index of table cell
  • value (str) - new value
  • role (int) - The role to set data for.