Package schrodinger :: Package application :: Package bioluminate :: Package antibody :: Module search_results_table :: Class FullProxyModel
[hide private]
[frames] | no frames]

Class FullProxyModel

         object --+                        
                  |                        
  sip.simplewrapper --+                    
                      |                    
            sip.wrapper --+                
                          |                
       PyQt4.QtCore.QObject --+            
                              |            
PyQt4.QtCore.QAbstractItemModel --+        
                                  |        
    PyQt4.QtGui.QAbstractProxyModel --+    
                                      |    
      PyQt4.QtGui.QSortFilterProxyModel --+
                                          |
                                         FullProxyModel
Known Subclasses:

A proxy model for the full search results. This proxy stores the most recent accepted row, i.e. the framework that was selected when the user clicked Accept. This row will be colored green if the user comes back to the table.

Instance Methods [hide private]
 
__init__(self, parent)
x.__init__(...) initializes x; see help(type(x)) for signature
bool
setData(self, index, value, role=2)
Store the accepted framework
 
data(self, index, role=0)
Color the background of the accepted framework row green, and pass through all other data from the model.
 
setSourceModel(self, source_model)
Set the source model for this proxy, and make sure that the accepted row is reset when the model is reset.
 
resetAcceptedRow(self)
Reset the accepted row.
False
lessThan(self, left, right)
Sort the data.

Inherited from PyQt4.QtGui.QSortFilterProxyModel: buddy, canFetchMore, clear, columnCount, dropMimeData, dynamicSortFilter, fetchMore, filterAcceptsColumn, filterAcceptsRow, filterCaseSensitivity, filterChanged, filterKeyColumn, filterRegExp, filterRole, flags, hasChildren, headerData, index, insertColumns, insertRows, invalidate, invalidateFilter, isSortLocaleAware, mapFromSource, mapSelectionFromSource, mapSelectionToSource, mapToSource, match, mimeData, mimeTypes, parent, removeColumns, removeRows, rowCount, setDynamicSortFilter, setFilterCaseSensitivity, setFilterFixedString, setFilterKeyColumn, setFilterRegExp, setFilterRole, setFilterWildcard, setHeaderData, setSortCaseSensitivity, setSortLocaleAware, setSortRole, sort, sortCaseSensitivity, sortColumn, sortOrder, sortRole, span, supportedDropActions

Inherited from PyQt4.QtGui.QAbstractProxyModel: itemData, revert, setItemData, sourceModel, submit

Inherited from PyQt4.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, changePersistentIndex, changePersistentIndexList, columnsAboutToBeInserted, columnsAboutToBeMoved, columnsAboutToBeRemoved, columnsInserted, columnsMoved, columnsRemoved, createIndex, dataChanged, decodeData, encodeData, endInsertColumns, endInsertRows, endMoveColumns, endMoveRows, endRemoveColumns, endRemoveRows, endResetModel, hasIndex, headerDataChanged, insertColumn, insertRow, layoutAboutToBeChanged, layoutChanged, modelAboutToBeReset, modelReset, persistentIndexList, removeColumn, removeRow, reset, resetInternalData, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, setRoleNames, setSupportedDragActions, sibling, supportedDragActions

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

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  COLUMN = FullColumns()
int DEFAULT_SORT_COLUMN = 2
When new data is loaded into a table using this proxy, it will be initially sorted using this column.
  DEFAULT_SORT_ORDER = 1
  SECONDARY_SORT_COLUMNS = {5: 2, 6: 2, 7: 5, 8: 6, 9: 2, 10: 2,...
When two rows contain identical values for a given sort column, those rows will be sorted using SECONDARY_SORT_COLUMNS[column]
PyQt4.QtGui.QColor ACCEPTED_FRAMEWORK_COLOR = QtGui.QColor()
The background color for the accepted framework row.

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

setData(self, index, value, role=2)

 

Store the accepted framework

Parameters:
  • index (PyQt4.QtCore.QModelIndex) - The index of a cell from the row to set as the accepted framework. The column of the index is ignored.
  • value (bool) - The value to set. Is expected to be True to set the accepted framework.
  • role (int) - The role to set data for. Is expected to be Qt.EditRole to set the accepted framework.
Returns: bool
True if the accepted framework was stored successfully. False otherwise.
Overrides: PyQt4.QtCore.QAbstractItemModel.setData

data(self, index, role=0)

 

Color the background of the accepted framework row green, and pass through all other data from the model.

Parameters:
  • index (PyQt4.QtCore.QModelIndex) - The index to retrieve data for
  • role (int) - The role to retrieve data for
Returns:
The requested data
Overrides: PyQt4.QtCore.QAbstractItemModel.data

setSourceModel(self, source_model)

 

Set the source model for this proxy, and make sure that the accepted row is reset when the model is reset.

Parameters:
Overrides: PyQt4.QtGui.QAbstractProxyModel.setSourceModel

lessThan(self, left, right)

 

Sort the data. Ties are decided using SECONDARY_SORT_COLUMNS.

Parameters:
  • left (PyQt4.QtCore.QModelIndex) - The left index for the comparison
  • right (PyQt4.QtCore.QModelIndex) - The right index for the comparison
Returns: False
True if left is less than right. False otherwise.
Overrides: PyQt4.QtGui.QSortFilterProxyModel.lessThan

Class Variable Details [hide private]

SECONDARY_SORT_COLUMNS

When two rows contain identical values for a given sort column, those rows will be sorted using SECONDARY_SORT_COLUMNS[column]
Value:
{5: 2, 6: 2, 7: 5, 8: 6, 9: 2, 10: 2, 11: 9, 12: 10}