Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module input_tab_widgets :: Class BasisSetDelegate
[hide private]
[frames] | no frames]

Class BasisSetDelegate

           object --+                    
                    |                    
    sip.simplewrapper --+                
                        |                
              sip.wrapper --+            
                            |            
         PyQt4.QtCore.QObject --+        
                                |        
PyQt4.QtGui.QAbstractItemDelegate --+    
                                    |    
      PyQt4.QtGui.QStyledItemDelegate --+
                                        |
                                       BasisSetDelegate

A delegate for selecting a basis set. If a blank basis is committed, model.setData will be called with a value of None. Additionally, Ctrl+Enter will cause the current value to be committed to all selected rows.


Note: BasisSelectorLineEdit already handles keyboard events and catching the Ctrl+Enter combo, so this class doesn't inherit from CommitMultipleDelegate (although it uses an identical commit_data_to_to_selected signal).

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QAbstractItemDelegate: EndEditHint

Instance Methods [hide private]
 
__init__(self, parent)
Instantiate the delegate
 
createEditor(self, parent, option, index)
 
setEditorData(self, editor, index)
 
setModelData(self, editor, model, index)
 
eventFilter(self, editor, event)
Ignore the editor losing focus, since focus may be switching to one of the pop up widgets.
 
popUpClosed(self, editor, accept)
Respond to the editor closing by either rejecting the data, accepting the data, or committing the data to all selected rows.

Inherited from PyQt4.QtGui.QStyledItemDelegate: displayText, editorEvent, initStyleOption, itemEditorFactory, paint, setItemEditorFactory, sizeHint, updateEditorGeometry

Inherited from PyQt4.QtGui.QAbstractItemDelegate: closeEditor, commitData, elidedText, helpEvent, sizeHintChanged

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, event, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from PyQt4.QtGui.QAbstractItemDelegate: EditNextItem, EditPreviousItem, NoHint, RevertModelCache, SubmitModelCache

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Instance Variables [hide private]
 
commit_data_to_selected(...)
Commit the data from the current editor to all selected cells.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent)
(Constructor)

 

Instantiate the delegate

Parameters:
  • parent (PyQt4.QtGui.QWidget) - The Qt parent. Note that the font is pulled from here and applied to the pop up, since the pop up font looks hideous otherwise.
Overrides: object.__init__

createEditor(self, parent, option, index)

 
Overrides: PyQt4.QtGui.QAbstractItemDelegate.createEditor

setEditorData(self, editor, index)

 
Overrides: PyQt4.QtGui.QAbstractItemDelegate.setEditorData

setModelData(self, editor, model, index)

 
Overrides: PyQt4.QtGui.QAbstractItemDelegate.setModelData

eventFilter(self, editor, event)

 

Ignore the editor losing focus, since focus may be switching to one of the pop up widgets. If the editor including the popup loses focus, popUpClosed will be called.

Overrides: PyQt4.QtCore.QObject.eventFilter

popUpClosed(self, editor, accept)

 

Respond to the editor closing by either rejecting the data, accepting the data, or committing the data to all selected rows.

Parameters:
  • editor (BasisSetEditor) - The editor that was just closed
  • accept (int) - The signal that was emitted by the editor when it closed

Instance Variable Details [hide private]

commit_data_to_selected(...)

 
Commit the data from the current editor to all selected cells. This signal is emitted with the editor, the current index, and the delegate.