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

Class BaseAdjacentAlignmentProxyModel

                                  object --+            
                                           |            
 ui.qt.table_helper.DataMethodDecoratorMixin --+        
                                               |        
ui.qt.table_speed_up.MultipleRolesRoleModelMixin --+    
                                                   |    
    ui.qt.table_speed_up.MultipleRolesRoleProxyMixin --+
                                                       |
                                          object --+   |
                                                   |   |
                            GroupExpansionProxyMixin --+
                                                       |
                      object --+                       |
                               |                       |
               sip.simplewrapper --+                   |
                                   |                   |
                         sip.wrapper --+               |
                                       |               |
                    PyQt5.QtCore.QObject --+           |
                                           |           |
             PyQt5.QtCore.QAbstractItemModel --+       |
                                               |       |
                PyQt5.QtCore.QAbstractProxyModel --+   |
                                                   |   |
                                         NestedProxy --+
                                                       |
                                                      BaseAdjacentAlignmentProxyModel
Known Subclasses:

A base proxy model to be subclassed by other proxy models that show data related to and synchronized with an alignment but in separate, adjacent views.

Nested Classes [hide private]

Inherited from GroupExpansionProxyMixin: __metaclass__

Inherited from PyQt5.QtCore.QAbstractItemModel: LayoutChangeHint

Instance Methods [hide private]
 
textSizeChanged(...)
 
__init__(self, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
setSourceModel(self, model)
 
rowCount(self, parent=None)
 
mapToSource(self, proxy_index)
 
mapFromSource(self, source_index)
object
data(self, proxy_index, role=0, multiple_roles=None)
Provide data for the specified index and role.
list
_genDataArgs(self, proxy_index, source_index, source_model)
Return any arguments that should be passed to the data methods.
dict
_multipleRolesData(self, proxy_index, source_index, source_model, col, multiple_roles)
Provide data for all requested roles.
 
_displayData(self, proxy_index, source_index, source_model, col)
 
columnCount(self, parent=None)
 
_sourceRowsAboutToBeInserted(self, source_parent, first, last)
 
_sourceRowsAboutToBeRemoved(self, source_parent, first, last)
 
updateData(self, role, source_row)
Update a specified index when data changes.
 
_textSizeChanged(self)
Emit dataChanged and textSizeChanged when we receive a textSizeChanged signal.

Inherited from ui.qt.table_speed_up.MultipleRolesRoleModelMixin (private): _fetchMultipleRoles

Inherited from ui.qt.table_helper.DataMethodDecoratorMixin (private): _callDataMethod, _collectDataMethods

Inherited from GroupExpansionProxyMixin: groupByChanged, groupExpansionChanged

Inherited from NestedProxy: buddy, hasChildren, index, parent

Inherited from PyQt5.QtCore.QAbstractProxyModel: canDropMimeData, canFetchMore, dropMimeData, fetchMore, flags, headerData, itemData, mapSelectionFromSource, mapSelectionToSource, mimeData, mimeTypes, resetInternalData, revert, setData, setHeaderData, setItemData, sibling, sort, sourceModel, sourceModelChanged, span, submit, supportedDragActions, supportedDropActions

Inherited from PyQt5.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, insertColumns, insertRow, insertRows, layoutAboutToBeChanged, layoutChanged, match, modelAboutToBeReset, modelReset, moveColumn, moveColumns, moveRow, moveRows, persistentIndexList, removeColumn, removeColumns, removeRow, removeRows, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved

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

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 = None
hash(x)

Inherited from NestedProxy: TOP_LEVEL

Inherited from PyQt5.QtCore.QAbstractItemModel: HorizontalSortHint, NoLayoutChangeHint, VerticalSortHint

Inherited from PyQt5.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: PyQt5.QtCore.QAbstractProxyModel.setSourceModel

rowCount(self, parent=None)

 
Overrides: PyQt5.QtCore.QAbstractItemModel.rowCount

mapToSource(self, proxy_index)

 
Overrides: PyQt5.QtCore.QAbstractProxyModel.mapToSource

mapFromSource(self, source_index)

 
Overrides: PyQt5.QtCore.QAbstractProxyModel.mapFromSource

data(self, proxy_index, role=0, multiple_roles=None)

 

Provide data for the specified index and role. Subclasses normally do not need to redefine this method. Instead, new methods should be created and decorated with table_helper.data_method.

Parameters:
  • index - The index to return data for.
  • role - The role to request data for.
  • multiple_roles - If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, a set of roles to retrieve data for. Ignored otherwise.
Returns: object
The requested data. If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, will be a dictionary of {role: value}. The dictionary not contain roles that are not provided by this model and may contain additional roles that were not explicitly requested.
Overrides: PyQt5.QtCore.QAbstractItemModel.data

_genDataArgs(self, proxy_index, source_index, source_model)

 

Return any arguments that should be passed to the data methods. Note that the proxy index, source index, and source model (i.e. the arguments to this method) will always be passed to data methods as the first three arguments regardless of the list returned from this method. Subclasses may redefine this method to return any additional required arguments. Note that this method must return a list, not a tuple.

Parameters:
  • proxy_index - The index that data() was called on.
  • source_index - The source model index that proxy_index maps to.
  • source_model - The source model. Provided because calling model.data(index) is much faster than calling index.data().
Returns: list
A list of arugments. If this list contains more arguments than any given data method accepts, it will be truncated when that method is called.
Overrides: ui.qt.table_helper.DataMethodDecoratorMixin._genDataArgs
(inherited documentation)

_multipleRolesData(self, proxy_index, source_index, source_model, col, multiple_roles)

 

Provide data for all requested roles. The last argument must be an iterable of roles to fetch data for. All additional arguments will be passed to the data methods.

Returns: dict
A {role: value} dictionary of data for all requested roles.
Decorators:
  • @table_helper.data_method(CustomRole.MultipleRoles)
Overrides: ui.qt.table_speed_up.MultipleRolesRoleModelMixin._multipleRolesData
(inherited documentation)

_displayData(self, proxy_index, source_index, source_model, col)

 
Decorators:
  • @table_helper.data_method(Qt.DisplayRole)

columnCount(self, parent=None)

 
Overrides: PyQt5.QtCore.QAbstractItemModel.columnCount

updateData(self, role, source_row)

 

Update a specified index when data changes.

Parameters:
  • role (enum.Enum) - Role of the data that changed.
  • source_row (int) - Index of the source model index to update.