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

Class ProxyMixin

object --+
         |
        ProxyMixin
Known Subclasses:

A mixin class that provides functionality common to all the proxies.

Main use is to connect the residuesSelected signal to a method that emits its own residuesSelected after translating the indices properly.

We also cache the sourceModel to avoid going through the C++ layer.

Note that this mixin should be listed first in the parents for the proxy classes that use it.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
residuesSelected(...)
 
residueFormatChanged(...)
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
 
emitResidueSelection(self, indices)
Emits an array of indices, mapped according to the rules of the proxy
 
sourceModel(self)
We override this and return the cached source model so that we avoid going through the C++ layer
 
setSourceModel(self, model)

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

emitResidueSelection(self, indices)

 

Emits an array of indices, mapped according to the rules of the proxy

Parameters:
  • indices (list of QtCore.QModelIndex) - The selected indices