Package schrodinger :: Package ui :: Module residueselector :: Class MutationSelectorFrame
[hide private]
[frames] | no frames]

Class MutationSelectorFrame

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt4.QtCore.QObject --+        
                            |        
           object --+       |        
                    |       |        
    sip.simplewrapper --+   |        
                        |   |        
 PyQt4.QtGui.QPaintDevice --+        
                            |        
          PyQt4.QtGui.QWidget --+    
                                |    
               PyQt4.QtGui.QFrame --+
                                    |
                                   MutationSelectorFrame
Known Subclasses:

This frame contains widgets for selecting one or more residue type (e.g. ALA, VAL, and GLY). The editor has a checkbox for each residue, along with convenience checkboxes that allow the user to toggle multiple residues that match a description (e.g., polar).

This frame is intended to be embedded in a layout. For using as a pop-up, see MutationSelectorPopUp.

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]
 
dataChanged(...)
 
getResidueGroups(self)
 
__init__(self, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
setupCheckboxes(self)
Populate the std residues, custom residues, and groups layouts with checkboxes based on the current residue groups.
 
_addResiduesToLayout(self, res_names, layout)
Add checkboxes with the given names to the specified QGridLayout, hook up their toggled signals to self.updateSelections(), and add them to the self._checkboxes dict.
 
getResidueCheckbox(self, residue_name)
Return the checkbox for the residue or residue group.
 
updateSelections(self)
Collect checked residues and then add any residues selected via the group checkboxes.
 
setSelectedMutations(self, residues)
 
selectResidueCheckbox(self, residue_name, check=True)
Selects (or deselects, if False) a single residue checkbox
 
selectAll(self)
Selects every enabled residue checkbox in the pop up
 
applyGroupSelections(self)
Examines the relevant group checkboxes to determine which residues should be selected and selects them.
 
deselectAll(self)
Deselects all the residue checkboxes if the None convenience checkbox has been selected
 
disableResidue(self, res_name, tooltip=None)
Disable the given residue checkbox in the pop-up dialog.
 
clear(self)
De-select all residues.
 
disableResidues(self, disable_residues)

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

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, contextMenuEvent, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontChange, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, handle, hasFocus, hasMouseTracking, height, heightForWidth, 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, keyPressEvent, keyReleaseEvent, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, 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, parent=None)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

setupCheckboxes(self)

 

Populate the std residues, custom residues, and groups layouts with checkboxes based on the current residue groups. Can be called to re-populate the pop-up widget if the return value of getResidueGroups() of the subclass has changed.

getResidueCheckbox(self, residue_name)

 

Return the checkbox for the residue or residue group.

Parameters:
  • residue_name (str) - The name of the residue

updateSelections(self)

 

Collect checked residues and then add any residues selected via the group checkboxes. Emits a set of selected residues.

setSelectedMutations(self, residues)

 
Parameters:
  • residues (set of str

    Checks the checkboxes corresponding to the given set of residue strings, and unchecks the other checkboxes. Connect to the dataChanged signal to get updates on the selected mutations.

    ) - The residues selected by the user

selectResidueCheckbox(self, residue_name, check=True)

 

Selects (or deselects, if False) a single residue checkbox

Parameters:
  • residue_name (str) - The name of the residue corresponding to the checkbox
  • check (bool) - Whether to check or uncheck the checkbox

applyGroupSelections(self)

 

Examines the relevant group checkboxes to determine which residues should be selected and selects them.

Our groups obey the following rules:

* no residues in a group selected -> group deselected * some but not all residues in a group selected -> group partially selected * all residues in a group selected -> group selected * a user selects a group -> group selected * a user deselects a group -> group deselected

In other words, for users, the groups function as dual state, but in terms of display, the groups are tristate.

Note that this function can only be called as a signal, because it needs to call self.sender()

deselectAll(self)

 

Deselects all the residue checkboxes if the None convenience checkbox has been selected

Parameters:
  • checked (bool) - Whether the None checkbox is checked

disableResidues(self, disable_residues)

 
Parameters:
  • disable_residues (List of (str, str) tuples.) - List of residues to disable. Each item is a tuple of (res_name, tooltip).