Uranium
Application Framework
|
This class provides the value and change notifications for the properties of a single setting. More...
Inherits QObject.
Public Member Functions | |
__init__ (self, parent=None, *args, **kwargs) | |
setContainerStackId (self, stack_id) | |
Set the containerStackId property. | |
containerStackId (self) | |
The ID of the container stack we should query for property values. | |
setRemoveUnusedValue (self, remove_unused_value) | |
removeUnusedValue (self) | |
setWatchedProperties (self, properties) | |
Set the watchedProperties property. | |
watchedProperties (self) | |
A list of property names that should be watched for changes. | |
setKey (self, key) | |
Set the key property. | |
key (self) | |
The key of the setting that we should provide property values for. | |
properties (self) | |
forcePropertiesChanged (self) | |
setStoreIndex (self, index) | |
storeIndex (self) | |
stackLevels (self) | |
At what levels in the stack does the value(s) for this setting occur? | |
setPropertyValue (self, property_name, property_value) | |
Set the value of a property. | |
getPropertyValue (self, property_name, stack_level) | |
Manually request the value of a property. | |
getRawPropertyValue (self, property_name) | |
removeFromContainer (self, index) | |
isValueUsed (self) | |
Protected Member Functions | |
_onPropertiesChanged (self, key, property_names) | |
_update (self, container=None) | |
_updateStackLevels (self) | |
Updates the self._stack_levels field, which indicates at which levels in the stack the property is set. | |
_getPropertyValue (self, property_name) | |
Protected Attributes | |
_property_map | |
_stack_id | |
_stack | |
_key | |
_relations | |
_watched_properties | |
_store_index | |
_value_used | |
_stack_levels | |
_remove_unused_value | |
_validator | |
_update | |
_onPropertiesChanged | |
This class provides the value and change notifications for the properties of a single setting.
Since setting values and other properties are provided by a stack, we need some way to query the stack from QML to provide us with those values. This class takes care of that.
This class provides the property values through QObject dynamic properties so that they are available from QML.
UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.getPropertyValue | ( | self, | |
property_name, | |||
stack_level | |||
) |
Manually request the value of a property.
The most notable difference with the properties is that you have more control over at what point in the stack you want the setting to be retrieved (instead of always taking the top one)
property_name | The name of the property to get the value from. |
stack_level | the index of the container to get the value from. |
UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setPropertyValue | ( | self, | |
property_name, | |||
property_value | |||
) |
Set the value of a property.
stack_index | At which level in the stack should this property be set? |
property_name | The name of the property to set. |
property_value | The value of the property to set. |