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 | isReadOnly (self) |
Get whether the container item is stored on a read only location in the filesystem. 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 (self) |
Serialize this container to a string. More... | |
def | deserialize |
Deserialize the container 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 represenation.
serialized | A serialized string containing a container that should be deserialized. |
def UM.Settings.Interfaces.ContainerInterface.getConfigurationTypeFromSerialized | ( | self, | |
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 | string 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 | string The key of the item to retrieve a property from. |
name | string The name of the property to retrieve. |
def UM.Settings.Interfaces.ContainerInterface.getVersionFromSerialized | ( | self, | |
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.isReadOnly | ( | self, | |
bool | |||
) |
Get whether the container item is stored on a read only location in the filesystem.
def UM.Settings.Interfaces.ContainerInterface.serialize | ( | self, | |
str | |||
) |
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.