Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module basis_selector :: Class _BasisSelectorPopUp
[hide private]
[frames] | no frames]

Class _BasisSelectorPopUp

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt4.QtCore.QObject --+        
                            |        
           object --+       |        
                    |       |        
    sip.simplewrapper --+   |        
                        |   |        
 PyQt4.QtGui.QPaintDevice --+        
                            |        
          PyQt4.QtGui.QWidget --+    
                                |    
                    BasisSelector --+
                                    |
                                   _BasisSelectorPopUp

The pop up window that is displayed adjacent to BasisSelectorLineEdit

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
__init__(self, parent)
Populate the combo boxes and connect them to the appropriate signals
 
_createInfoLabels(self)
Create self.text_lbl to display text and self.icon_lbl containing an error icon
 
installPopUpEventFilter(self, event_filter)
Install the provided event filter on all widgets within this pop up that can receive focus
 
setStructure(self, struc)
Set the structure to use for determining basis set information and availability
 
_layoutWidgets(self)
Arrange all basis selector widgets
 
_disableBasis(self)
The popup cannot be disabled, so this function is a no op.
bool
setBasisSafe(self, basis_full='')
Set the basis to the requested value.
 
_clearInfoLabels(self)
Clear the labels used to present information to the user
 
subWidgetHasFocus(self)
Return True if any widget within the popup has focus.
PyQt4.QtGui.QAbstractItemModel
basisModel(self)
Return the model of basis set names
 
_updateLabels(self)
Update the labels in response the newly loaded structure and/or newly selected basis set.
 
_showWarning(self)
Show a warning that the user has specified an invalid basis set
 
setBlankBasisAllowed(self, allowed)
Specify whether a blank basis set is allowed or should result in an "Invalid basis set" warning.
int
estimateMaxHeight(self)
Estimate the maximum height of this widget (since the popup's height may increase when more text is added to the bottom label).

Inherited from BasisSelector: basis_changed, getBasis, isValid, setBasis, setInputSelector, structureChanged, structureUpdated

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, event, 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, paintEvent, 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, sizeHint, 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]
  ENABLE_WHEN_NO_STRUC = True
hash(x)
  ERROR_FORMAT = '<span style=\'color: red; font-weight: bold\'>...

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

Instance Variables [hide private]
 
pop_up_resized(...)
A signal emitted when the pop up has changed size due to a change in the label text.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent)
(Constructor)

 

Populate the combo boxes and connect them to the appropriate signals

Parameters:
  • parent - The Qt parent
  • input_selector - The AppFramework input selector. If not given, the input_selector may be set later using setInputSelector().
  • ENABLE_WHEN_NO_STRUC - Should the basis selector be enabled when no structure has been loaded into it?
Overrides: object.__init__
(inherited documentation)

_createInfoLabels(self)

 

Create self.text_lbl to display text and self.icon_lbl containing an error icon

Overrides: BasisSelector._createInfoLabels

installPopUpEventFilter(self, event_filter)

 

Install the provided event filter on all widgets within this pop up that can receive focus

Parameters:

setStructure(self, struc)

 

Set the structure to use for determining basis set information and availability

Parameters:

_layoutWidgets(self)

 

Arrange all basis selector widgets

Overrides: BasisSelector._layoutWidgets
(inherited documentation)

_disableBasis(self)

 

The popup cannot be disabled, so this function is a no op.

Overrides: BasisSelector._disableBasis

setBasisSafe(self, basis_full='')

 

Set the basis to the requested value. If the provided basis name is invalid, then the combo boxes will be cleared. (With setBasis(), an exception is raised if the basis name is invalid.)

Parameters:
  • basis_full (str) - The requested basis set name including any *'s and +'s.
Returns: bool
True if the basis was valid. False otherwise.

subWidgetHasFocus(self)

 

Return True if any widget within the popup has focus. False otherwise.

Note: Note that combo boxes have various list view and frame children that can receive focus, and which of these widgets can receive focus varies by OS. As a result, we check ancestry of the focus widget here rather than just checking to see if the combo boxes themselves have focus. Also note that we can't use Qt's isAncestorOf() function to check ancestry, since combo box drop downs are considered to be their own window and isAncestorOf() requires ancestors to be part of the same window.

basisModel(self)

 

Return the model of basis set names

Returns: PyQt4.QtGui.QAbstractItemModel
The model of basis set names

_updateLabels(self)

 

Update the labels in response the newly loaded structure and/or newly selected basis set.

Overrides: BasisSelector._updateLabels
(inherited documentation)

setBlankBasisAllowed(self, allowed)

 

Specify whether a blank basis set is allowed or should result in an "Invalid basis set" warning.

Parameters:
  • allowed - True if a blank basis set should be allowed. False if a blank basis set should result in an invalid basis set warning.

estimateMaxHeight(self)

 

Estimate the maximum height of this widget (since the popup's height may increase when more text is added to the bottom label).

Returns: int
The estimated maximum height

Note: This function is only an estimate since Qt won't accurately calculate height until after a redraw. As such, the maximum label height may not be accurate and the presence/absence of the warning icon isn't taken into account.


Class Variable Details [hide private]

ERROR_FORMAT

Value:
'<span style=\'color: red; font-weight: bold\'>%s</span>'