Package schrodinger :: Package application :: Package matsci :: Module reordergui :: Class ReferenceListWidget
[hide private]
[frames] | no frames]

Class ReferenceListWidget

PyQt4.QtGui.QListWidget --+        
                          |        
 ui.qt.swidgets.SListWidget --+    
                              |    
            StructureListWidget --+
                                  |
                                 ReferenceListWidget

The ListWidget for the reference structure.

Instance Methods [hide private]
QListWidgetItem
markAtomMapped(self, index, guess=False)
Mark the row for the given atom index as mapped and update the text
QListWidgetItem
markAtomUnmapped(self, index)
Remove the mapping for atom index
str
getAtomText(self, atom)
Get the text to display in a row of the ListWidget

Inherited from StructureListWidget: __init__, fill, itemSelected, parseAtomText, selectAtom, setStructure

Inherited from ui.qt.swidgets.SListWidget: allItems, removeItem, removeItemByText, rowByText, selectedText, setTextSelected

Class Variables [hide private]

Inherited from StructureListWidget: atom_clicked

Method Details [hide private]

markAtomMapped(self, index, guess=False)

 

Mark the row for the given atom index as mapped and update the text

Adds to the parent method by changing the text of the marked item to reflect the mapping.

Parameters:
  • index (int) - Atom to mark
  • guess (bool) - True if this mark results from a guess, False if not. The background color used depends on this parameter.
Returns: QListWidgetItem
The list widget item for the affected atom
Overrides: StructureListWidget.markAtomMapped

markAtomUnmapped(self, index)

 

Remove the mapping for atom index

Adds to the parent method by changing the text of the marked item to reflect the unmapping.

Parameters:
  • index (int) - The atom index to unmap
Returns: QListWidgetItem
The list widget item for the affected atom
Overrides: StructureListWidget.markAtomUnmapped

getAtomText(self, atom)

 

Get the text to display in a row of the ListWidget

The atom text for an item is the atom element plus index for the Reference atom, plus the atom index of any Comparison atom mapped to this atom.

Parameters:
  • atom (int or _StructureAtom) - A reference to the atom to create text for
Returns: str
The text to display for this atom