Package schrodinger :: Package application :: Package matsci :: Module mswidgets :: Class CompactSolventSelector
[hide private]
[frames] | no frames]

Class CompactSolventSelector

PyQt4.QtGui.QFrame --+
                     |
                    CompactSolventSelector

A single line of widgets that displays the currently chosen solvent and a button that will open a dialog allowing a new solvent model/solvent choice. Tracks the necessary Jaguar keywords to implement the user's choice.

Instance Methods [hide private]
 
__init__(self, parent=None, layout=None, keywords=None, **extra_args)
Create a CompactSolventSelector object
 
chooseSolvent(self)
Open a dialog that lets the user choose solvent parameters (model, solvent, solvent properties) and store the choices
 
solventKeywordsChanged(self, keywords)
Called when the user clicks accept on the SolventDialog
bool
isSolventModelUsed(self)
Has a solvent model been chosen?
str
getSolventName(self)
Get the name of the chosen solvent
str
getKeystring(self)
Get a string containing all the keywords specified by the user's choices
 
reset(self)
Reset all the widgets to their original values
Method Details [hide private]

__init__(self, parent=None, layout=None, keywords=None, **extra_args)
(Constructor)

 

Create a CompactSolventSelector object

Additional keyword arguments are passed on to the SolventDialog that is opened by this widget.

Parameters:
  • parent (QWidget) - The parent object for this widget
  • layout (QBoxLayout) - The layout to place this widget into
  • keywords (dict) - Dictionary of solvent-related Jaguar key/value pairs to initialize/reset the widgets with

solventKeywordsChanged(self, keywords)

 

Called when the user clicks accept on the SolventDialog

Parameters:
  • keywords (dict) - A dictionary of Jaguar solvent model keywords

isSolventModelUsed(self)

 

Has a solvent model been chosen?

Returns: bool
True if yes, False if no

getSolventName(self)

 

Get the name of the chosen solvent

Returns: str
The user-facing name of the chosen solvent, or NO_SOLVENT if no model has been chosen

getKeystring(self)

 

Get a string containing all the keywords specified by the user's choices

Returns: str
A string containg keywords that define the user's choices. An empty string is returned if no model has been selected