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

Class ReorderAtomsDialog

PyQt4.QtGui.QDialog --+
                      |
                     ReorderAtomsDialog

A Window-Modal dialog that allows the user to reorder atoms in a comparison structure based on a reference structure.

Instance Methods [hide private]
 
__init__(self, struct1, struct2, accept_command=None, reject_command=None, modality=QtCore.Qt.NonModal, title='Reorder Atoms')
Create a ReorderAtomDialog instance
 
help(self)
Show the help topic for this panel
int or None
accept(self)
User has clicked accept, get the reordered structure, call the accept_command with it and close the dialog.
int
reject(self)
User has clicked reject - do nothing but call custom reject method
 
warning(self, msg)
Post a warning dialog
Method Details [hide private]

__init__(self, struct1, struct2, accept_command=None, reject_command=None, modality=QtCore.Qt.NonModal, title='Reorder Atoms')
(Constructor)

 

Create a ReorderAtomDialog instance

Parameters:
  • struct1 (schrodinger.structure.Structure) - The reference structure. This structure will not be reordered.
  • struct2 (schrodinger.structure.Structure) - The comparison structure. A copy of this structure will be reordered when the user clicks OK
  • accept_command (callable) - The command to call with the reordred structure when the user clicks OK. This command should accept two paramters, the reordered structure, and a list. The index of the list is the atom.index-1 of an atom in the reordered structure. The item at that index is the atom.index of the same atom in the original comparison structure.
  • accept_command (callable) - The command to call when the user clicks Cancel - takes no parameters
  • modality (int) - The modality of the dialog. Default is Qt.NonModal, other options may be Qt.WindowModal or Qt.ApplicationModal.
  • title (str) - The window title
  • reject_command (callable)

accept(self)

 

User has clicked accept, get the reordered structure, call the accept_command with it and close the dialog.

Returns: int or None
QDialog.Accepted if a structure has been reordered, or None if the reordering was incomplete and the dialog not closed

reject(self)

 

User has clicked reject - do nothing but call custom reject method

Returns: int
QDialog.Reject

warning(self, msg)

 

Post a warning dialog

Parameters:
  • msg (str) - The message to display