Uranium
Application Framework
UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider Class Reference

This class provides the value and change notifications for the properties of a single setting. More...

Inherits QObject.

Public Member Functions

def __init__ (self, parent=None, *args, **kwargs)
 
def setContainerStack (self, stack)
 
def setContainerStackId (self, stack_id)
 Set the containerStackId property. More...
 
def containerStackId (self)
 
def containerStack (self)
 
def setRemoveUnusedValue (self, remove_unused_value)
 
def removeUnusedValue (self)
 
def setWatchedProperties (self, properties)
 Set the watchedProperties property. More...
 
def watchedProperties (self)
 
def setKey (self, key)
 Set the key property. More...
 
def key (self)
 
def properties (self)
 
def forcePropertiesChanged (self)
 
def setStoreIndex (self, index)
 
def storeIndex (self)
 
def stackLevels (self)
 
def setPropertyValue (self, property_name, property_value)
 Set the value of a property. More...
 
def getPropertyValue (self, property_name, stack_level)
 
def removeFromContainer (self, index)
 
def isValueUsed (self)
 

Static Public Attributes

 containerStackIdChanged = pyqtSignal()
 Emitted when the containerStackId property changes. More...
 
 str
 The ID of the container stack we should query for property values. More...
 
 fset
 A list of property names that should be watched for changes. More...
 
 setContainerStackId
 
 notify
 At what levels in the stack does the value(s) for this setting occur?
 
 containerStackChanged = pyqtSignal()
 
 QObject
 
 setContainerStack
 
 removeUnusedValueChanged = pyqtSignal()
 
 bool
 
 setRemoveUnusedValue
 
 watchedPropertiesChanged = pyqtSignal()
 Emitted when the watchedProperties property changes. More...
 
 setWatchedProperties
 
 keyChanged = pyqtSignal()
 Emitted when the key property changes. More...
 
 setKey
 
 propertiesChanged = pyqtSignal()
 
 QQmlPropertyMap
 
 storeIndexChanged = pyqtSignal()
 
 int
 
 setStoreIndex
 
 stackLevelChanged = pyqtSignal()
 
 result
 
 isValueUsedChanged = pyqtSignal()
 

Detailed Description

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.

Member Function Documentation

◆ setContainerStackId()

def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setContainerStackId (   self,
  stack_id 
)

Set the containerStackId property.

◆ setKey()

def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setKey (   self,
  key 
)

Set the key property.

◆ setPropertyValue()

def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setPropertyValue (   self,
  property_name,
  property_value 
)

Set the value of a property.

Parameters
stack_indexAt which level in the stack should this property be set?
property_nameThe name of the property to set.
property_valueThe value of the property to set.

◆ setWatchedProperties()

def UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.setWatchedProperties (   self,
  properties 
)

Set the watchedProperties property.

Member Data Documentation

◆ containerStackIdChanged

UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.containerStackIdChanged = pyqtSignal()
static

Emitted when the containerStackId property changes.

◆ fset

UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.fset
static

A list of property names that should be watched for changes.

◆ keyChanged

UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.keyChanged = pyqtSignal()
static

Emitted when the key property changes.

◆ str

UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.str
static

The ID of the container stack we should query for property values.

Manually request the value of a property.

The key of the setting that we should provide property values for.

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)

Parameters
property_nameThe name of the property to get the value from.
stack_levelthe index of the container to get the value from.

◆ watchedPropertiesChanged

UM.Settings.Models.SettingPropertyProvider.SettingPropertyProvider.watchedPropertiesChanged = pyqtSignal()
static

Emitted when the watchedProperties property changes.


The documentation for this class was generated from the following file: