Uranium
Application Framework
|
Shared interface between setting container types. More...
Public Member Functions | |
def | getId (self) |
Get the ID of the container. More... | |
def | getName (self) |
Get the human-readable name of this container. More... | |
def | getMetaData (self) |
Get all metadata of this container. More... | |
def | getMetaDataEntry |
Get the value of a single metadata entry. More... | |
def | getProperty |
Get the value of a property of the container item. More... | |
def | hasProperty |
Get whether the container item has a specific property. More... | |
def | serialize |
Serialize this container to a string. More... | |
def | setProperty |
Change a property of a container item. More... | |
def | deserialize |
Deserialize the container from a string representation. More... | |
def | deserializeMetadata |
Deserialize just the metadata from a string representation. More... | |
def | getLoadingPriority (cls) |
def | getConfigurationTypeFromSerialized |
Gets the configuration type of the given serialized data. More... | |
def | getVersionFromSerialized |
Gets the version of the given serialized data. More... | |
def | getPath (self) |
Get the path used to create this InstanceContainer. More... | |
def | setPath |
Set the path used to create this InstanceContainer. | |
Static Public Attributes | |
propertyChanged = None | |
metaDataChanged = None | |
Shared interface between setting container types.
def UM.Settings.Interfaces.ContainerInterface.deserialize | ( | self, | |
serialized | |||
) |
Deserialize the container from a string representation.
This should replace the contents of this container with those in the serialized representation.
serialized | A serialized string containing a container that should be deserialized. |
def UM.Settings.Interfaces.ContainerInterface.deserializeMetadata | ( | cls, | |
serialized | |||
) |
Deserialize just the metadata from a string representation.
serialized | A string representing one or more containers that should be deserialized. |
container_id | The ID of the (base) container is already known and provided here. |
def UM.Settings.Interfaces.ContainerInterface.getConfigurationTypeFromSerialized | ( | cls, | |
serialized | |||
) |
Gets the configuration type of the given serialized data.
(used by __updateSerialized())
def UM.Settings.Interfaces.ContainerInterface.getId | ( | self, | |
str | |||
) |
Get the ID of the container.
The ID should be unique, machine readable and machine writable. It is intended to be used for example when referencing the container in configuration files or when writing a file to disk.
def UM.Settings.Interfaces.ContainerInterface.getMetaData | ( | self, | |
Dict, | |||
str, | |||
Any | |||
) |
Get all metadata of this container.
This returns a dictionary containing all the metadata for this container. How this metadata is used depends on the application.
def UM.Settings.Interfaces.ContainerInterface.getMetaDataEntry | ( | self, | |
entry | |||
) |
Get the value of a single metadata entry.
entry | The key of the metadata to retrieve. |
default | The default value to return if the entry cannot be found. |
name
, or default
when the entry could not be found. def UM.Settings.Interfaces.ContainerInterface.getName | ( | self, | |
str | |||
) |
Get the human-readable name of this container.
This should return a human-readable name for the container, that can be used in the interface.
def UM.Settings.Interfaces.ContainerInterface.getPath | ( | self, | |
str | |||
) |
Get the path used to create this InstanceContainer.
def UM.Settings.Interfaces.ContainerInterface.getProperty | ( | self, | |
key | |||
) |
Get the value of a property of the container item.
key | The key of the item to retrieve a property from. |
property_name | The name of the property to retrieve. |
def UM.Settings.Interfaces.ContainerInterface.getVersionFromSerialized | ( | cls, | |
serialized | |||
) |
Gets the version of the given serialized data.
(used by __updateSerialized())
def UM.Settings.Interfaces.ContainerInterface.hasProperty | ( | self, | |
key | |||
) |
Get whether the container item has a specific property.
key | The key of the item to check the property from. |
name | The name of the property to check for. |
def UM.Settings.Interfaces.ContainerInterface.serialize | ( | self, | |
ignored_metadata_keys | |||
) |
Serialize this container to a string.
The serialized representation of the container can be used to write the container to disk or send it over the network.
ignored_metadata_keys | A set of keys that should be ignored when it serializes the metadata. |
def UM.Settings.Interfaces.ContainerInterface.setProperty | ( | self, | |
key | |||
) |
Change a property of a container item.
key | The key of the item to change the property of. |
property_name | The name of the property to change. |
property_value | The new value of the property. |
container | The container to use for retrieving values when changing the property triggers property updates. Defaults to None, which means use the current container. |
set_from_cache | Flag to indicate that the property was set from cache. This triggers the behavior that the read_only and setDirty are ignored. |