Package schrodinger :: Package ui :: Package qt :: Module structtable :: Class _GenericViewerDelegate
[hide private]
[frames] | no frames]

Class _GenericViewerDelegate

               object --+                    
                        |                    
        sip.simplewrapper --+                
                            |                
                  sip.wrapper --+            
                                |            
             PyQt5.QtCore.QObject --+        
                                    |        
PyQt5.QtWidgets.QAbstractItemDelegate --+    
                                        |    
            PyQt5.QtWidgets.QItemDelegate --+
                                            |
                                           _GenericViewerDelegate
Known Subclasses:

This is the class that handles the actual drawing of data. This doesn't handle any actual data, so you'll have to subclass it to get it to work. For your own widget table, you should subclass this class, add any data input you need into the __init__, and reimplement the _paint class for your needs, using your data.

An example of this is the StructureReaderDelegate in this file.

Nested Classes [hide private]

Inherited from PyQt5.QtWidgets.QAbstractItemDelegate: EndEditHint

Instance Methods [hide private]
 
__init__(self, tableview, tablemodel)
x.__init__(...) initializes x; see help(type(x)) for signature
 
paint(self, painter, option, index)
This handles the logic behind painting/not-painting when the scrollbar is being dragged.
 
setPaintWait(self, val)
Use this function to turn on/off delaying drawing of cells until the scrollbar is not being used.
 
paintWait(self)
Returns if we are drawing during while the scrollbar is dragged.
 
sizeHint(self, option, index)
Tells the default width,height of Cells
 
autoResizeCells(self)
Auto-resizes the cells based on the number of columns in the table model and the width of the table.
 
setCellSize(self, width, height)
Sets the default cell size, and resizes appropriately.
 
_paint(self, painter, option, index)
Reimplement this to draw what you want in the cell.
 
_paint_passive(self, painter, option, index)
This function paints a temporary cell if we're moving too fast for real content to be drawn.

Inherited from PyQt5.QtWidgets.QItemDelegate: createEditor, drawBackground, drawCheck, drawDecoration, drawDisplay, drawFocus, editorEvent, eventFilter, hasClipping, itemEditorFactory, setClipping, setEditorData, setItemEditorFactory, setModelData, updateEditorGeometry

Inherited from PyQt5.QtWidgets.QAbstractItemDelegate: closeEditor, commitData, destroyEditor, helpEvent, sizeHintChanged

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

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 PyQt5.QtWidgets.QAbstractItemDelegate: EditNextItem, EditPreviousItem, NoHint, RevertModelCache, SubmitModelCache

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, tableview, tablemodel)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

paint(self, painter, option, index)

 

This handles the logic behind painting/not-painting when the scrollbar is being dragged.

Overrides: PyQt5.QtWidgets.QAbstractItemDelegate.paint

setPaintWait(self, val)

 

Use this function to turn on/off delaying drawing of cells until the scrollbar is not being used. This may be useful in CPU intensive cell-drawing delegates.

sizeHint(self, option, index)

 

Tells the default width,height of Cells

Overrides: PyQt5.QtWidgets.QAbstractItemDelegate.sizeHint

_paint_passive(self, painter, option, index)

 

This function paints a temporary cell if we're moving too fast for real content to be drawn. By default this is just a primitive hourglass, though you can implement to draw real info if you desire.