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

Class StructureLabel

       object --+                            
                |                            
sip.simplewrapper --+                        
                    |                        
          sip.wrapper --+                    
                        |                    
     PyQt4.QtCore.QObject --+                
                            |                
           object --+       |                
                    |       |                
    sip.simplewrapper --+   |                
                        |   |                
 PyQt4.QtGui.QPaintDevice --+                
                            |                
          PyQt4.QtGui.QWidget --+            
                                |            
               PyQt4.QtGui.QFrame --+        
                                    |        
                   PyQt4.QtGui.QLabel --+    
                                        |    
                    ui.qt.swidgets.SLabel --+
                                            |
                                           StructureLabel

A label that gives information about the ligand for a given row and shows the set structure in a tooltip.

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QFrame: Shadow, Shape, StyleMask

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
__init__(self, master, layout, unset_tooltip, unset_text='Not set', prefix='', suffix='')
Create a StructureLabel instance
 
unset(self)
Change the text & tooltip to indicate there is no ligand set
 
set(self, struct, prefix=None, suffix=None)
Change the text & tooltip to indicate there is a ligand set
bool
event(self, event)
Override event to make the structure tooltip work
 
leaveEvent(self, event)
Removes the structure tooltip if necessary when the mouse leaves the widget.

Inherited from ui.qt.swidgets.SLabel: reset

Inherited from PyQt4.QtGui.QLabel: alignment, buddy, changeEvent, clear, contextMenuEvent, focusInEvent, focusNextPrevChild, focusOutEvent, hasScaledContents, hasSelectedText, heightForWidth, indent, keyPressEvent, linkActivated, linkHovered, margin, minimumSizeHint, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, movie, openExternalLinks, paintEvent, picture, pixmap, selectedText, selectionStart, setAlignment, setBuddy, setIndent, setMargin, setMovie, setNum, setOpenExternalLinks, setPicture, setPixmap, setScaledContents, setSelection, setText, setTextFormat, setTextInteractionFlags, setWordWrap, sizeHint, text, textFormat, textInteractionFlags, wordWrap

Inherited from PyQt4.QtGui.QFrame: drawFrame, frameRect, frameShadow, frameShape, frameStyle, frameWidth, lineWidth, midLineWidth, setFrameRect, setFrameShadow, setFrameShape, setFrameStyle, setLineWidth, setMidLineWidth

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, find, focusNextChild, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontChange, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, handle, hasFocus, hasMouseTracking, height, hide, hideEvent, inputContext, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyReleaseEvent, keyboardGrabber, languageChange, layout, layoutDirection, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumWidth, mouseDoubleClickEvent, mouseGrabber, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, paletteChange, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resetInputContext, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputContext, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setShown, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, winId, window, windowActivationChange, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, x, x11Info, x11PictureHandle, y

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

Inherited from PyQt4.QtGui.QPaintDevice: colorCount, depth, heightMM, logicalDpiX, logicalDpiY, numColors, paintingActive, physicalDpiX, physicalDpiY, widthMM

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.QFrame: Box, HLine, NoFrame, Panel, Plain, Raised, Shadow_Mask, Shape_Mask, StyledPanel, Sunken, VLine, WinPanel

Inherited from PyQt4.QtGui.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Inherited from PyQt4.QtGui.QPaintDevice: PdmDepth, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, master, layout, unset_tooltip, unset_text='Not set', prefix='', suffix='')
(Constructor)

 

Create a StructureLabel instance

Parameters:
  • master (ItemRow) - The ItemRow object this label is for
  • layout (QBoxLayout) - The layout this label should add itself to
  • unset_tooltip (str) - The tooltip to display if no structure has been set.
  • unset_text (str) - The text to display in the label if no structure has been set
  • prefix (str) - The text to put before the molecular formula
  • suffix (str) - The text to put after the molecular formula
Overrides: object.__init__

set(self, struct, prefix=None, suffix=None)

 

Change the text & tooltip to indicate there is a ligand set

Parameters:
  • struct (schrodinger.structure.Structure) - The structure that is set for this row
  • prefix (str) - A string to add before the molecular formala - if not given, the default prefix set in the __init__ method is used.
  • suffix (str) - A string to add after the molecular formala - if not given, the default suffix set in the __init__ method is used.

event(self, event)

 

Override event to make the structure tooltip work

Parameters:
  • event (QEvent) - The QEvent object generated by this event
Returns: bool
Whether the event was recognized
Overrides: PyQt4.QtCore.QObject.event

leaveEvent(self, event)

 

Removes the structure tooltip if necessary when the mouse leaves the widget.

Parameters:
  • event (QEvent) - The QEvent object generated by this event
Overrides: PyQt4.QtGui.QWidget.leaveEvent