Package schrodinger :: Package application :: Package bioluminate :: Module propfilter :: Class PropFilterDialog
[hide private]
[frames] | no frames]

Class PropFilterDialog

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt4.QtCore.QObject --+        
                            |        
           object --+       |        
                    |       |        
    sip.simplewrapper --+   |        
                        |   |        
 PyQt4.QtGui.QPaintDevice --+        
                            |        
          PyQt4.QtGui.QWidget --+    
                                |    
              PyQt4.QtGui.QDialog --+
                                    |
                                   PropFilterDialog

Panel to allow the user to define criteria for filtering property values

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QDialog: DialogCode

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
__init__(self, parent, criteria=None, databases=None)
Create a PropFilterDialog instance
 
getCumulativeMatches(self)
 
accept(self)
Add the selected criteria to the parent - calls parent.setCriteria() with a list of StringDatabaseCriterion, NumericalDatabaseCriterion and BooleanDatabaseCriterion objects
 
filterSelectionChanged(self, selected=None, deselected=None)
Enables or disables the Delete button as appropriate depending on the selection in the Criteria display area
 
selectProperty(self)
Populate the property name edit with the property name of the property the user just selected.
 
joinerChanged(self, result)
Enable/disable the second criteria widgets as appropriate for the joiner ("", AND, OR) that the user just selected.
 
updateText(self)
Rewrite the text in the criteria text box
 
loadDatabases(self, databases)
Load in the data from the database - populates the upper text box with property names.
str
convertToClassToken(self, s)
This function converts given string to one of class tokens (either 'Light', 'Heavy' or 'Misc').
list
findCommonDatanames(self, databases)
This function find column names that are present in all databases.
 
addCriterion(self)
Adds a criterion when the user hits the Add button
 
operator1Changed(self, result)
Disable/enable the value edit as appropriate for the selected operator.
 
operater2Changed(self, result)
Disable/enable the value edit as appropriate for the selected operator.
 
letUserSelectValues(self, propmenu, value_edit)
Open a ValueSelectionDialog to allow the user to select values of the property that will match the criterion.
 
setSelectedValues(self, values, value_edit)
Called by ValueSelectionDialog to set the text in the proper value_edit to the values the user selected.
 
checkPropertyType(self, prop)
Callback for modifications to the property QLineEdit.
 
deleteEntry(self)
Delete the selected criterion or pattern
 
setDefaults(self, criteria=None)
Set the panel defaults
 
setProperties(self, property_names)
Set the list of properties the user can choose from.
 
warning(self, text)
Pop up a warning dialog
list
getPropertyMinMax(self, property)
Get the min and max values of property from the database.

Inherited from PyQt4.QtGui.QDialog: accepted, closeEvent, contextMenuEvent, done, eventFilter, exec_, extension, finished, isSizeGripEnabled, keyPressEvent, minimumSizeHint, open, orientation, reject, rejected, resizeEvent, result, setExtension, setModal, setOrientation, setResult, setSizeGripEnabled, setVisible, showEvent, showExtension, sizeHint

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, 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, keyReleaseEvent, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, 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, 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, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, 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, 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.QDialog: Accepted, Rejected

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, criteria=None, databases=None)
(Constructor)

 

Create a PropFilterDialog instance

Parameters:
Overrides: object.__init__

accept(self)

 

Add the selected criteria to the parent - calls parent.setCriteria() with a list of StringDatabaseCriterion, NumericalDatabaseCriterion and BooleanDatabaseCriterion objects

Overrides: PyQt4.QtGui.QDialog.accept

filterSelectionChanged(self, selected=None, deselected=None)

 

Enables or disables the Delete button as appropriate depending on the selection in the Criteria display area

Parameters:
  • selected - Unused
  • deselected - Unused

joinerChanged(self, result)

 

Enable/disable the second criteria widgets as appropriate for the joiner ("", AND, OR) that the user just selected.

Parameters:
  • result (str) - The current value selected in the joiner combobox

loadDatabases(self, databases)

 

Load in the data from the database - populates the upper text box with property names. Adds Misc, Light, or Heavy to property names so the user can filter them by class.

Parameters:
  • database (schrodinger.application.prime.packages.PrimeStructureDatabase.PrimeStructureDB) - The database to load data from

convertToClassToken(self, s)

 

This function converts given string to one of class tokens (either 'Light', 'Heavy' or 'Misc'). Valid 'light' and 'heavy' strings are defined in light and heavy variables respectively.

Parameters:
  • s (str) - property class string
Returns: str
class token

findCommonDatanames(self, databases)

 

This function find column names that are present in all databases.

Parameters:
  • databases (list) - List of the databases to load data from.
Returns: list
list of common column names

operator1Changed(self, result)

 

Disable/enable the value edit as appropriate for the selected operator. Opens a ValueSelectionDialog if the operator is SELECT.

Parameters:
  • result (str) - The current value in the 1st operator combobox

operater2Changed(self, result)

 

Disable/enable the value edit as appropriate for the selected operator. Opens a ValueSelectionDialog if the operator is SELECT.

Parameters:
  • result (str) - The current value in the 2nd operator combobox

letUserSelectValues(self, propmenu, value_edit)

 

Open a ValueSelectionDialog to allow the user to select values of the property that will match the criterion.

Parameters:
  • propmenu (QComboBox or object with setCurrentIndex method) - The cancel method of the dialog sets propmenu.setCurrentIndex(0)
  • value_edit - value_edit is passed to setSelectedValues in the accept method of the dialog

setSelectedValues(self, values, value_edit)

 

Called by ValueSelectionDialog to set the text in the proper value_edit to the values the user selected.

Parameters:
  • values (list) - list of values selected by the user
  • value_edit (QLineEdit) - The edit that values should be placed in

checkPropertyType(self, prop)

 

Callback for modifications to the property QLineEdit. Adjust the operator list and value validator according to the property type entered.

Parameters:
  • prop (str) - The current value of the property QLineEdit

setDefaults(self, criteria=None)

 

Set the panel defaults

Parameters:

setProperties(self, property_names)

 

Set the list of properties the user can choose from.

Parameters:

warning(self, text)

 

Pop up a warning dialog

Parameters:
  • text (str) - The text to display in the dialog

getPropertyMinMax(self, property)

 

Get the min and max values of property from the database.

Parameters:
  • property (str) - The name of a database property to get the min and max of
Returns: list
[min, max] of property. Returns [None, None] if the database is not defined.