Uranium
Application Framework
|
Encapsulates all state of a setting. More...
Public Member Functions | |
None | __init__ (self, SettingDefinition definition, ContainerInterface container, *Any args, **Any kwargs) |
Constructor. | |
Iterable[str] | getPropertyNames (self) |
Get a list of all supported property names. | |
__deepcopy__ (self, memo) | |
Copies the setting instance and all its properties and state. | |
bool | __eq__ (self, Any other) |
bool | __ne__ (self, Any other) |
Any | __getattr__ (self, str name) |
setProperty (self, str name, Any value, ContainerInterface container=None) | |
updateProperty (self, str name, Optional[ContainerInterface] container=None) | |
SettingDefinition | definition (self) |
The SettingDefinition this instance maintains state for. | |
ContainerInterface | container (self) |
The container of this instance. | |
validationState (self) | |
Get the state of validation of this instance. | |
InstanceState | state (self) |
None | resetState (self) |
str | __repr__ (self) |
None | updateRelations (self, ContainerInterface container) |
protected: | |
Static Public Attributes | |
propertyChanged = Signal() | |
Emitted whenever a property of this instance changes. | |
Protected Member Functions | |
_addRelations (self, Set["SettingRelation"] relations_set, List["SettingRelation"] relations, str role) | |
Recursive function to put all settings that require eachother for changes of a property value in a list. | |
Protected Attributes | |
_definition | |
_container | |
_visible | |
_validator | |
_state | |
Encapsulates all state of a setting.
The SettingInstance class contains all state related to a setting.
None UM.Settings.SettingInstance.SettingInstance.__init__ | ( | self, | |
SettingDefinition | definition, | ||
ContainerInterface | container, | ||
*Any | args, | ||
**Any | kwargs | ||
) |
Constructor.
definition | The SettingDefinition object this is an instance of. |
container | The container of this instance. Needed for relation handling. |
UM.Settings.SettingInstance.SettingInstance.__deepcopy__ | ( | self, | |
memo | |||
) |
Copies the setting instance and all its properties and state.
The definition and the instance container containing this instance are not deep-copied but just taken over from the original, since they are seen as back-links. Please set them correctly after deep-copying this instance.
|
protected |
Recursive function to put all settings that require eachother for changes of a property value in a list.
relations_set | set Set of keys (strings) of settings that are influenced |
relations | list of relation objects that need to be checked. |
role | name of the property value of the settings |
|
static |
Emitted whenever a property of this instance changes.
instance | The instance that reported the property change (usually self). |
property | The name of the property that changed. |