Package schrodinger :: Package application :: Package msv :: Package gui :: Module viewmodel :: Class SortProxyModel
[hide private]
[frames] | no frames]

Class SortProxyModel

                                 object --+    
                                          |    
                                 ProxyMixin --+
                                              |
         object --+                           |
                  |                           |
  sip.simplewrapper --+                       |
                      |                       |
            sip.wrapper --+                   |
                          |                   |
       PyQt4.QtCore.QObject --+               |
                              |               |
PyQt4.QtCore.QAbstractItemModel --+           |
                                  |           |
    PyQt4.QtGui.QAbstractProxyModel --+       |
                                      |       |
      PyQt4.QtGui.QSortFilterProxyModel --+   |
                                          |   |
            Qt.QtCore.QSortFilterProxyModel --+
                                              |
                                             SortProxyModel

A proxy for sorting sequences.

Nested Classes [hide private]

Inherited from ProxyMixin: __metaclass__

Instance Methods [hide private]
 
aboutToSort(...)
A signal emitted immediately before the proxy changes the sorting.
 
__init__(self, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
setSourceModel(self, model)
 
sortBy(self, sort_by, order=0)
Sort the table by the specified criteria.
 
currentSorting(self)
Return the current sorting criteria.
list
currentOrdering(self)
Return the current row ordering

Inherited from ProxyMixin: emitResidueSelection, residueFormatChanged, residuesSelected, sourceModel

Inherited from Qt.QtCore.QSortFilterProxyModel: reset, setRoleNames, setSupportedDragActions

Inherited from PyQt4.QtGui.QSortFilterProxyModel: buddy, canFetchMore, clear, columnCount, data, dropMimeData, dynamicSortFilter, fetchMore, filterAcceptsColumn, filterAcceptsRow, filterCaseSensitivity, filterChanged, filterKeyColumn, filterRegExp, filterRole, flags, hasChildren, headerData, index, insertColumns, insertRows, invalidate, invalidateFilter, isSortLocaleAware, lessThan, mapFromSource, mapSelectionFromSource, mapSelectionToSource, mapToSource, match, mimeData, mimeTypes, parent, removeColumns, removeRows, rowCount, setData, 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, 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, resetInternalData, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, 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]

Inherited from PyQt4.QtCore.QObject: staticMetaObject

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)

setSourceModel(self, model)

 
Overrides: PyQt4.QtGui.QAbstractProxyModel.setSourceModel

sortBy(self, sort_by, order=0)

 

Sort the table by the specified criteria.

Parameters:
  • sort_by (SortBy or NoneType) - The category to use for sorting. If None, the original input order will be used.
  • order (int) - Whether the data should be sorted in ascending (Qt.AscendingOrder) or descending (Qt.DescendingOrder) order.

currentSorting(self)

 

Return the current sorting criteria.

Returns:
A tuple of
  • The sorting category. Will be None if using the input order. (SortBy or NoneType)
  • The sort order (Qt.AscendingType or Qt.DescendingType)

currentOrdering(self)

 

Return the current row ordering

Returns: list
A list of row numbers in the current sorted ordering.