Uranium
Application Framework
|
This class provides the value and change notifications for the properties of a single setting. More...
Inherits QObject.
Public Member Functions | |
def | __init__ |
def | setContainerStack |
def | setContainerStackId |
Set the containerStackId property. More... | |
def | containerStackId |
The ID of the container stack we should query for property values. More... | |
def | containerStack |
def | setRemoveUnusedValue |
def | removeUnusedValue |
def | setWatchedProperties |
Set the watchedProperties property. More... | |
def | watchedProperties |
A list of property names that should be watched for changes. More... | |
def | setKey |
Set the key property. More... | |
def | key |
The key of the setting that we should provide property values for. More... | |
def | properties |
def | forcePropertiesChanged |
def | setStoreIndex |
def | storeIndex |
def | stackLevels |
At what levels in the stack does the value(s) for this setting occur? | |
def | setPropertyValue |
Set the value of a property. More... | |
def | getPropertyValue |
Manually request the value of a property. More... | |
def | removeFromContainer |
def | isValueUsed |
Static Public Attributes | |
tuple | containerStackIdChanged = pyqtSignal() |
Emitted when the containerStackId property changes. More... | |
tuple | containerStackChanged = pyqtSignal() |
tuple | removeUnusedValueChanged = pyqtSignal() |
tuple | watchedPropertiesChanged = pyqtSignal() |
Emitted when the watchedProperties property changes. More... | |
tuple | keyChanged = pyqtSignal() |
Emitted when the key property changes. More... | |
tuple | propertiesChanged = pyqtSignal() |
tuple | storeIndexChanged = pyqtSignal() |
tuple | stackLevelChanged = pyqtSignal() |
tuple | isValueUsedChanged = pyqtSignal() |
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.
def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.containerStackId | ( | self | ) |
The ID of the container stack we should query for property values.
def 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. |
def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.key | ( | self | ) |
The key of the setting that we should provide property values for.
def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setContainerStackId | ( | self, | |
stack_id | |||
) |
Set the containerStackId property.
def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setKey | ( | self, | |
key | |||
) |
Set the key property.
def 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. |
def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setWatchedProperties | ( | self, | |
properties | |||
) |
Set the watchedProperties property.
def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.watchedProperties | ( | self | ) |
A list of property names that should be watched for changes.
|
static |
Emitted when the containerStackId property changes.
|
static |
Emitted when the key property changes.
|
static |
Emitted when the watchedProperties property changes.