A QListWidget that interacts with a structure picture to select atoms.
Clicking on a row will send a signal that an atom has been clicked on.
Atoms (rows) can be marked as Mapped or Unmapped, which will result in
changing the background color of the row.
There is 1 row in in the ListWidget for each atom in the structure, in
the same order as atoms are in the structure. Note that row indexes start
at 0 but atom indexes start at 1, so we often have to add/subtract 1 to
translate between the two.
|
__init__(self,
master)
Create a StructureListWidget instance |
|
|
|
setStructure(self,
struct)
Set the structure object for this widget and fill the widget |
|
|
|
fill(self)
Fill the items in the ListWidget using the current structure |
|
|
|
selectAtom(self,
index)
Select the item that corresponds to the atom index |
|
|
|
itemSelected(self,
row)
React to the user selecting an item in the ListWidget |
|
|
(str, int)
|
parseAtomText(self,
text)
Parse the given text into an element and atom index |
|
|
QListWidgetItem
|
markAtomMapped(self,
index,
guess=False)
Mark the row for the given atom index as mapped |
|
|
QListWidgetItem
|
|
Inherited from ui.qt.swidgets.SListWidget :
allItems ,
removeItem ,
removeItemByText ,
rowByText ,
selectedText ,
setTextSelected
|