Class: QgsValueMapFieldFormatter¶
Field formatter for a ValueMap field.
A value relation field formatter looks up the values a map.
The map is defined in the configuration as dictionary under the key “map”:
{ "map": { 1: "one", 2: "two", 3: "three" } }
Values that are not on the map will be wrapped in parentheses. So with the above configuration:
3 => “three”
5 => “(5)”
Class Hierarchy¶
Base classes¶
A field formatter helps to handle and display values for a field. |
Attributes
Will be saved in the configuration when a value is NULL. |
- class qgis.core.QgsValueMapFieldFormatter[source]¶
Bases:
QgsFieldFormatter
- __init__()
Default constructor of field formatter for a value map field.
- __init__(a0: QgsValueMapFieldFormatter)
- Parameters:
- NULL_VALUE: str = '{2839923C-8B7D-419E-B84B-CA2FE9B80EC7}'¶
Will be saved in the configuration when a value is NULL. It’s the magic UUID {2839923C-8B7D-419E-B84B-CA2FE9B80EC7}