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

Class AttrTarget

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt5.QtCore.QObject --+    
                            |    
                       Target --+
                                |
                               AttrTarget


Allows an attribute on any object to be synchronized to a param. Example:

    target = AttrTarget(my_obj, 'x_data')

This creates a target for synchronizing my_obj.x_data.

Note that attributes by default don't have a signal, so auto-updating of
the model param won't work unless the optional signal argument is supplied.

Instance Methods [hide private]
 
__init__(self, obj, name, signal=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
getValue(self)
The standard method for getting a target's value, regardless of whether this is using a default getter or a custom one.
 
setValue(self, value)
The standard method for setting a target's value, regardless of whether this is using a default setter or a custom one.

Inherited from Target: onModelParamChanged, onTargetSignal, slot

Inherited from Target (private): _getAccess

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__

Static Methods [hide private]

Inherited from Target (private): _getDefaultAccess

Class Variables [hide private]

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Instance Variables [hide private]

Inherited from Target: targetChanged

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, obj, name, signal=None)
(Constructor)

 

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

Parameters:
  • obj - the object that has the attribute to be mapped
  • name (str) - the name of the target attribute on the object
  • signal (QtCore.pyqtSignal) - a Qt signal that indicates a change in the attribute's value.
Overrides: object.__init__

getValue(self)

 

The standard method for getting a target's value, regardless of whether this is using a default getter or a custom one.

Overrides: Target.getValue
(inherited documentation)

setValue(self, value)

 

The standard method for setting a target's value, regardless of whether this is using a default setter or a custom one.

Overrides: Target.setValue
(inherited documentation)