Uranium
Application Framework
UM.Settings.SettingInstance.SettingInstance Class Reference

Encapsulates all state of a setting. More...

Public Member Functions

None __init__ (self, SettingDefinition definition, ContainerInterface container, *Any args, **Any kwargs)
 Constructor. More...
 
Iterable[str] getPropertyNames (self)
 Get a list of all supported property names.
 
def __deepcopy__ (self, memo)
 Copies the setting instance and all its properties and state. More...
 
bool __eq__ (self, Any other)
 
bool __ne__ (self, Any other)
 
Any __getattr__ (self, str name)
 
def setProperty (self, str name, Any value, ContainerInterface container=None)
 
def updateProperty (self, str name, Optional[ContainerInterface] container=None)
 
SettingDefinition definition (self)
 The SettingDefinition this instance maintains state for. More...
 
ContainerInterface container (self)
 The container of this instance. More...
 
def validationState (self)
 Get the state of validation of this instance. More...
 
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. More...
 

Detailed Description

Encapsulates all state of a setting.

The SettingInstance class contains all state related to a setting.

Constructor & Destructor Documentation

◆ __init__()

None UM.Settings.SettingInstance.SettingInstance.__init__ (   self,
SettingDefinition  definition,
ContainerInterface  container,
*Any  args,
**Any  kwargs 
)

Constructor.

Parameters
definitionThe SettingDefinition object this is an instance of.
containerThe container of this instance. Needed for relation handling.

Member Function Documentation

◆ __deepcopy__()

def 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.

◆ container()

ContainerInterface UM.Settings.SettingInstance.SettingInstance.container (   self)

The container of this instance.

◆ definition()

SettingDefinition UM.Settings.SettingInstance.SettingInstance.definition (   self)

The SettingDefinition this instance maintains state for.

◆ validationState()

def UM.Settings.SettingInstance.SettingInstance.validationState (   self)

Get the state of validation of this instance.

Member Data Documentation

◆ propertyChanged

UM.Settings.SettingInstance.SettingInstance.propertyChanged = Signal()
static

Emitted whenever a property of this instance changes.

Parameters
instanceThe instance that reported the property change (usually self).
propertyThe name of the property that changed.

The documentation for this class was generated from the following file: