WatchedProperty#
- class scqubits.core.descriptors.WatchedProperty(target_type, event, inner_object_name=None, attr_name=None, fget=None, fset=None)[source]#
Descriptor class for properties that are to be monitored for changes. Upon change of the value, the instance class invokes its broadcast() method to send the appropriate event notification to CentralDispatch
- Parameters:
target_type (
Type
[TypeVar
(TargetType
)]) – type of watched propertyevent (
str
) – name of event to be triggered when property is changedinner_object_name (
Optional
[str
]) – Used, e.g., in FullZeroPi where an inner-object property is to be set.attr_name (
Optional
[str
]) – custom attribute name to be used (default: name from defining property in instance class, obtained in __set_name__
Methods
WatchedProperty.__init__
(target_type, event)