-
Notifications
You must be signed in to change notification settings - Fork 112
API: BaseAttributeWidget and subclasses specification
lneuhaus edited this page Jul 1, 2017
·
1 revision
In my first cleanup, I made the following properties (including setters except for the descriptor)
- attribute_value
- attribute_descriptor
- widget_value
They already make things much simpler. When widget_value is set, the widget value is changed and widget.value_changed is NOT emitted to avoid infinite loops. When attribute_value is modified, the whole procedure of saving in the config file and emitting the 'update_attribute_by_name' signal ensues. The BaseModuleWidget, which is the host of all attribute_widgets, catches the signal update_attribute_by_name, and either passes its argument on to the attribute_widget's function "update_attribute_by_name", or - in case that function does not exists - directly sets the widget_value from the attribute_value.
???