|
Uranium
Application Framework
|
Public Member Functions | |
| def | __init__ |
| def | __getattr__ |
| def | __setattr__ |
| def | __hash__ (self) |
| def | __getstate__ (self) |
| def | __setstate__ (self, state) |
| def | key (self) |
| def | container (self) |
| def | parent (self) |
| def | children (self) |
| def | relations (self) |
| def | serialize (self) |
| def | getAllKeys (self) |
| def | serialize_to_dict (self) |
| def | deserialize |
| def | getChild |
| def | matchesFilter |
| def | findDefinitions |
| def | isAncestor |
| def | isDescendant |
| def | getAncestors (self) |
| def | __repr__ (self) |
| def | __eq__ |
| def | addSupportedProperty |
| def | getPropertyNames |
| def | hasProperty |
| def | getPropertyType |
| def | isRequiredProperty |
| def | isReadOnlyProperty |
| def | dependsOnProperty |
| def | addSettingType |
| def | settingValueFromString |
| def | settingValueToString |
| def | getValidatorForType |
Defines a single Setting with its properties. This class defines a single Setting with all its properties. This class is considered immutable, the only way to change it is using deserialize(). Should any state need to be stored for a definition, create a SettingInstance pointing to the definition, then store the value in that instance. == Supported Properties The SettingDefinition class contains a concept of "supported properties". These are properties that are supported when serializing or deserializing a setting. These properties are defined through the addSupportedProperty() method. Each property needs a name and a type. In addition, there are two optional boolean value to indicate whether the property is "required" and whether it is "read only". Currently, four types of supported properties are defined. Please DefinitionPropertyType for a description of these types. Required properties are properties that should be present when deserializing a setting. If the property is not present, an error will be raised. Read-only properties are properties that should never change after creating a SettingDefinition. This means they cannot be stored in a SettingInstance object.
| def UM.Settings.SettingDefinition.SettingDefinition.__getstate__ | ( | self | ) |
For Pickle support. This should be identical to Pickle's default behaviour but the default behaviour doesn't combine well with a non-default __getattr__.
| def UM.Settings.SettingDefinition.SettingDefinition.__hash__ | ( | self | ) |
Ensure that the SettingDefinition is hashable, so it can be used in a set.
| def UM.Settings.SettingDefinition.SettingDefinition.__setstate__ | ( | self, | |
| state | |||
| ) |
For Pickle support. This should be identical to Pickle's default behaviour but the default behaviour doesn't combine well with a non-default __getattr__.
| def UM.Settings.SettingDefinition.SettingDefinition.children | ( | self, | |
| List, | |||
| SettingDefinition | |||
| ) |
A list of children of this setting.
:return: :type{list<SettingDefinition>}
| def UM.Settings.SettingDefinition.SettingDefinition.container | ( | self, | |
| Optional, | |||
| DefinitionContainerInterface | |||
| ) |
The container of this setting. :return:
| def UM.Settings.SettingDefinition.SettingDefinition.getAllKeys | ( | self, | |
| Set, | |||
| str | |||
| ) |
Gets the key of this setting definition and of all its descendants. :return: A set of the key in this definition and all its descendants.
| def UM.Settings.SettingDefinition.SettingDefinition.getAncestors | ( | self, | |
| Set, | |||
| str | |||
| ) |
Get a set of keys representing the setting's ancestors.
| def UM.Settings.SettingDefinition.SettingDefinition.key | ( | self, | |
| str | |||
| ) |
The key of this setting.
:return: :type{string}
| def UM.Settings.SettingDefinition.SettingDefinition.parent | ( | self, | |
| Optional, | |||
| SettingDefinition | |||
| ) |
The parent of this setting.
:return: :type{SettingDefinition}
| def UM.Settings.SettingDefinition.SettingDefinition.relations | ( | self, | |
| List, | |||
| SettingRelation | |||
| ) |
A list of SettingRelation objects of this setting.
:return: :type{list<SettingRelation>}
| def UM.Settings.SettingDefinition.SettingDefinition.serialize | ( | self, | |
| str | |||
| ) |
Serialize this setting to a string.
:return: :type{string} A serialized representation of this setting.
| def UM.Settings.SettingDefinition.SettingDefinition.serialize_to_dict | ( | self, | |
| Dict, | |||
| str, | |||
| Any | |||
| ) |
Serialize this setting to a dict.
:return: :type{dict} A representation of this setting definition.