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

Class StructurePic

   PyQt4.QtGui.QGraphicsItem --+    
                               |    
ui.qt.structure2d.structure_item --+
                                   |
                                  StructurePic

The QGraphicsItem that holds a 2D image of a structure

Instance Methods [hide private]
 
__init__(self, scene)
Create a StructurePic instance
 
reset(self)
Clear all the annotators and remove the picture
 
hoverMoveEvent(self, event)
Track when the mouse is over an atom - emit a signal when it enters a new atom or leaves an atom.
 
setStructure(self, struct)
Set the structure - create a new image of it
 
selectAtom(self, index)
Select an atom in the image and regenerate the picture
 
markAtomMapped(self, index, guess=False)
Mark an atom as mapped (either by guess or manually) and regenerate the picture.
 
markAtomUnmapped(self, index)
Mark an atom as unmapped and regenerate the picture.
 
highlightAtom(self, index, guess=False)
Highlight an atom

Inherited from ui.qt.structure2d.structure_item: add_annotator, add_annotator_function_return, boundingRect, clear, clear_annotators, generate_picture, getBondAtLocation, mousePressEvent, paint, set_colormap, set_rect, set_structure, set_text

Method Details [hide private]

__init__(self, scene)
(Constructor)

 

Create a StructurePic instance

Parameters:
  • scene (QGraphicsScene) - The Scene this image is placed in
Overrides: ui.qt.structure2d.structure_item.__init__

hoverMoveEvent(self, event)

 

Track when the mouse is over an atom - emit a signal when it enters a new atom or leaves an atom. An index of 0 is emitted when the mouse is not over any atom.

setStructure(self, struct)

 

Set the structure - create a new image of it

Parameters:

selectAtom(self, index)

 

Select an atom in the image and regenerate the picture

Parameters:
  • index (int) - The atom index to select

markAtomMapped(self, index, guess=False)

 

Mark an atom as mapped (either by guess or manually) and regenerate the picture.

Parameters:
  • index (int) - The atom index to mark
  • guess (bool) - True if this mark results from a guess, False if not. The background color used depends on this parameter.

markAtomUnmapped(self, index)

 

Mark an atom as unmapped and regenerate the picture.

Parameters:
  • index (int) - The atom index to mark

highlightAtom(self, index, guess=False)

 

Highlight an atom

Parameters:
  • index (int) - The atom index to highlight
  • guess (bool) - True if this atom is marked by a guess, False if it was marked by the user. The background color used depends on this parameter.