Package schrodinger :: Package application :: Package msv :: Package gui :: Module delegates :: Class SecondaryStructureDelegate
[hide private]
[frames] | no frames]

Class SecondaryStructureDelegate

               object --+                            
                        |                            
        sip.simplewrapper --+                        
                            |                        
                  sip.wrapper --+                    
                                |                    
             PyQt5.QtCore.QObject --+                
                                    |                
PyQt5.QtWidgets.QAbstractItemDelegate --+            
                                        |            
      PyQt5.QtWidgets.QStyledItemDelegate --+        
                                            |        
                      AbstractBaseRowDelegate --+    
                                                |    
              AbstractSingleElementHeightDelegate --+
                                                    |
                                                   SecondaryStructureDelegate

Nested Classes [hide private]

Inherited from PyQt5.QtWidgets.QAbstractItemDelegate: EndEditHint

Instance Methods [hide private]
 
_paintPartiallyBorderedRect(self, left_x, bottom_y, width, height, painter, brush_color)
Paints a rectangle with dark upper and lower border and the specified dimensions.
 
_paintSSAStartImage(self, ssa_type, brush_color, width, height, bottom_left, painter)
Paint an SSA start block for the specified SSA type.
 
_paintSSAMiddleImage(self, ssa_type, brush_color, width, height, bottom_left, painter)
Paints an SSA middle block for the specified SSA type.
 
_paintSSAEndImage(self, ssa_type, brush_color, width, height, bottom_left, painter)
Paint an SSA end block for the specified SSA type.
 
_paintWithBrush(self, painter, option, index, background_brush)
Paint an SSA image with the specified painter in the location specified by option that matches the data at the specified index in the model
 
_paintSelection(self, painter, option, index)
We want the selection painted in the default way, but without colors
 
_paintDefault(self, painter, option, index)
Paints the default (non-selected) cell using the specified painter, option, and index

Inherited from AbstractSingleElementHeightDelegate: __init__, heightHint, sizeHint

Inherited from AbstractBaseRowDelegate: paint

Inherited from PyQt5.QtWidgets.QStyledItemDelegate: createEditor, displayText, editorEvent, eventFilter, initStyleOption, itemEditorFactory, 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]
enum.Enum or None ANNOTATION_TYPE = <ANNOTATION_TYPES.secondary_structure: 13>
The annotation type associated with this class

Inherited from AbstractBaseRowDelegate: SAMPLE_DATA

Inherited from PyQt5.QtWidgets.QAbstractItemDelegate: EditNextItem, EditPreviousItem, NoHint, RevertModelCache, SubmitModelCache

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from AbstractSingleElementHeightDelegate: element_height

Inherited from object: __class__

Method Details [hide private]

_paintPartiallyBorderedRect(self, left_x, bottom_y, width, height, painter, brush_color)

 

Paints a rectangle with dark upper and lower border and the specified dimensions.

Parameters:
  • left_x (int) - Left x position of the rectangle
  • bottom_y (int) - Bottom y position of the rectangle
  • width (float) - Width of the rectangle
  • height (float) - Height of the rectangle
  • painter (QtGui.QPainter) - The painter to use to paint this rectangle
  • brush_color (QtGui.QColor) - Brush color to paint the rectangle with

_paintSSAStartImage(self, ssa_type, brush_color, width, height, bottom_left, painter)

 

Paint an SSA start block for the specified SSA type.

Parameters:
  • ssa_type - What type of SSA this is. Should be one of schrodinger.structure.SS_HELIX or schrodinger.structure.SS_STRAND
  • brush_color (QtGui.QColor) - What color to paint this image with
  • width (int) - Width of the image
  • height (int) - Height of the image
  • bottom_left (QtGui.QPoint) - The bottom left point of the element to be painted.
  • painter (QtGui.QPainter) - The painter to draw this annotation
  • ss_type (int)

_paintSSAMiddleImage(self, ssa_type, brush_color, width, height, bottom_left, painter)

 

Paints an SSA middle block for the specified SSA type.

Parameters:
  • ssa_type - What type of SSA this is. Should be one of schrodinger.structure.SS_HELIX or schrodinger.structure.SS_STRAND
  • brush_color (QtGui.QColor) - What color to paint this image with
  • width (int) - Width of the image
  • height (int) - Height of the image
  • bottom_left (QtGui.QPoint) - Bottom left corner of the element to paint.
  • painter (QtGui.QPainter) - Painter to paint this image
  • ss_type (int)

_paintSSAEndImage(self, ssa_type, brush_color, width, height, bottom_left, painter)

 

Paint an SSA end block for the specified SSA type.

Parameters:
  • ssa_type - What type of SSA this is. Should be one of schrodinger.structure.SS_HELIX or schrodinger.structure.SS_STRAND
  • brush_color (QtGui.QColor) - What color to paint this image with
  • width (int) - Width of the image
  • height (int) - Height of the image
  • bottom_left (QtGui.QPoint) - Bottom left corner of the element to paint
  • painter - Painter to paint the image @type painter; QtGui.QPainter
  • ss_type (int)

_paintWithBrush(self, painter, option, index, background_brush)

 

Paint an SSA image with the specified painter in the location specified by option that matches the data at the specified index in the model

If the data at the index cannot be converted to an SSA, the parent's paint method is called

Parameters:
  • option (QtWidgets.QStyleOptionViewItem) - The option to modify with cached information
  • index (QtCore.QModelIndex) - The index in the model
  • background_brush (QtGui.QBrush) - The brush to use

_paintSelection(self, painter, option, index)

 

We want the selection painted in the default way, but without colors

Parameters:
  • painter - The painter for the cell
  • option - The option for the cell
  • index - The index in the table
Overrides: AbstractBaseRowDelegate._paintSelection

_paintDefault(self, painter, option, index)

 

Paints the default (non-selected) cell using the specified painter, option, and index

Note: This method is overridden in subclasses and should not be merged into paint().

Parameters:
  • painter - The painter for the cell
  • option - The option for the cell
  • index - The index in the table
Overrides: AbstractBaseRowDelegate._paintDefault
(inherited documentation)