Package schrodinger :: Package tasks :: Module mappers :: Class TargetParamMapper
[hide private]
[frames] | no frames]

Class TargetParamMapper

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt5.QtCore.QObject --+    
                            |    
          AbstractParamMapper --+
                                |
                               TargetParamMapper

Maps Target objects to params in a model.

Instance Methods [hide private]
 
__init__(self, auto_update_target=True, auto_update_model=True)
x.__init__(...) initializes x; see help(type(x)) for signature
 
getTargetSlot(self, target)
Gets the target-specific slot function for responding to param change.
 
getParamSlot(self, param)
Gets the param-specific slot function for responding to target change.
 
getSignalsAndSlots(self, model)
Given a model object, return all signals and slots that need to be connected to support auto updating.
 
_getTargetValue(self, target_obj)
This virtual method should return a mapped object's value, however that is defined by the derived class.
 
_setTargetValue(self, target_obj, value)
This virtual method should set a mapped object's value, however that is defined by the derived class.

Inherited from AbstractParamMapper: addMapping, setModel, setModelClass, suspend_auto_update_target, updateModel, updateTarget

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, parent, 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]

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, auto_update_target=True, auto_update_model=True)
(Constructor)

 

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

Parameters:
  • auto_update_target (bool) - whether to update the target immediately when the model is changed
  • auto_update_model (bool) - whether to update the model immediately when the target is changed
Overrides: object.__init__

getTargetSlot(self, target)

 

Gets the target-specific slot function for responding to param change. If no slot exists for this target, a new one is created.

getParamSlot(self, param)

 

Gets the param-specific slot function for responding to target change. If no slot exists for this param, a new one is created.

getSignalsAndSlots(self, model)

 

Given a model object, return all signals and slots that need to be connected to support auto updating. Override this method in subclasses.

Returns:
a list of 2-tuples where each tuple is a signal, slot pair
Overrides: AbstractParamMapper.getSignalsAndSlots
(inherited documentation)

_getTargetValue(self, target_obj)

 

This virtual method should return a mapped object's value, however that is defined by the derived class.

Parameters:
  • target_obj - the target object
Overrides: AbstractParamMapper._getTargetValue
(inherited documentation)

_setTargetValue(self, target_obj, value)

 

This virtual method should set a mapped object's value, however that is defined by the derived class.

Parameters:
  • target_obj - the target object
Overrides: AbstractParamMapper._setTargetValue
(inherited documentation)