Subgroup: Value
Class: QgsValueRelationFieldFormatter¶
-
class
qgis.core.
QgsValueRelationFieldFormatter
¶ Bases:
qgis._core.QgsFieldFormatter
Field formatter for a value relation field. A value relation field formatter looks up the values from features on another layer.
New in version 3.0: Methods
alignmentFlag
Return the alignment for a particular field. createCache
createCache(config: Dict[str, Any]) -> object id
representValue
sortValue
Attributes
-
class
ValueRelationItem
(key: Any, value: str)¶ Bases:
sip.wrapper
Constructor for ValueRelationItem
QgsValueRelationFieldFormatter.ValueRelationItem() Constructor for ValueRelationItem
QgsValueRelationFieldFormatter.ValueRelationItem(QgsValueRelationFieldFormatter.ValueRelationItem)
-
key
¶
-
value
¶
-
-
createCache
(self, layer: QgsVectorLayer, fieldIndex: int, config: Dict[str, Any]) → Any¶ createCache(config: Dict[str, Any]) -> object Create a cache for a value relation field. This can be used to keep the value map in the local memory if doing multiple lookups in a loop.
New in version 3.0.
-
id
(self) → str¶
-
representValue
(self, layer: QgsVectorLayer, fieldIndex: int, config: Dict[str, Any], cache: Any, value: Any) → str¶
-
sortValue
(self, layer: QgsVectorLayer, fieldIndex: int, config: Dict[str, Any], cache: Any, value: Any) → Any¶
-
class