Package schrodinger :: Package application :: Package matsci :: Module builderwidgets :: Class TemplateCombo
[hide private]
[frames] | no frames]

Class TemplateCombo

   PyQt4.QtGui.QComboBox --+        
                           |        
ui.qt.utils.EnhancedComboBox --+    
                               |    
        ui.qt.swidgets.SComboBox --+
                                   |
                                  TemplateCombo

A Combo Box for managing template lists

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
See parent class for documentation
 
silentlySetItems(self, items)
Set the items for the combobox without emitting any signals
 
silentlyTryToSelectText(self, text)
Select the item with the given text and do so without emitting any signals.

Inherited from ui.qt.swidgets.SComboBox: currentString, reset, setCurrentText

Inherited from ui.qt.utils.EnhancedComboBox: addItemsFromDict, currentData, findDataPy, setCurrentData

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

 

See parent class for documentation

Parameters:
  • parent - The parent widget of this SComboBox
  • items - list of items (str) to be added to the ComboBox - see also itemdict.
  • default_item - text of the item to select initially and upon reset
  • default_index - the index of the item to select initially and upon reset. default_item overrides this parameter.
  • command - The slot to connect to the currentIndexChanged[str] signal. This command will be called when the default item is selected during initialization unless nocall=True.
  • nocall - True if command should be called during initialization, False if not
  • layout - The layout to place this widget in
  • tip - The tooltip for the combo
  • itemdict - An OrderedDictionary with ComboBox items as keys and data as values. The data for the current ComboBox item is returned by the currentData method (inherited from EnhancedComboBox). If both items and itemdict are given, items are added first.
Overrides: ui.qt.swidgets.SComboBox.__init__

silentlySetItems(self, items)

 

Set the items for the combobox without emitting any signals

Parameters:
  • items (list) - The new items (str) for the combo box

silentlyTryToSelectText(self, text)

 

Select the item with the given text and do so without emitting any signals. Also do not give an error if no item with text exists.

Parameters:
  • text (str) - The text of the item to select