Class: QgsFieldDomain¶
- class qgis.core.QgsFieldDomain¶
Bases:
sip.wrapper
Base class for field domains.
A field domain is a set of constraints that apply to one or several fields.
Added in version 3.26.
QgsFieldDomain(name: Optional[str], description: Optional[str], fieldType: QMetaType.Type) Constructor for
QgsFieldDomain
, with the specifiedname
,description
andfieldType
.QgsFieldDomain(name: Optional[str], description: Optional[str], fieldType: QVariant.Type) Constructor for
QgsFieldDomain
, with the specifiedname
,description
andfieldType
.Deprecated since version QGIS: 3.38 use the method with a QMetaType.Type argument instead
QgsFieldDomain(a0:
QgsFieldDomain
)Methods
Clones the field domain.
Returns the description of the field domain.
Returns the associated field type.
Returns the merge policy.
Returns the name of the field domain.
Sets the
description
of the field domain.Sets the associated field
type
.Sets the merge
policy
.Sets the
name
of the field domain.Sets the split
policy
.Returns the split policy.
Returns the type of field domain.
Returns a translated name of the field domain type.
- clone(self) QgsFieldDomain | None ¶
Clones the field domain.
- Return type:
Optional[QgsFieldDomain]
- description(self) str ¶
Returns the description of the field domain.
See also
- Return type:
str
- fieldType(self) QMetaType.Type ¶
Returns the associated field type.
See also
- Return type:
QMetaType.Type
- mergePolicy(self) Qgis.FieldDomainMergePolicy ¶
Returns the merge policy.
See also
- Return type:
- setDescription(self, description: str | None)¶
Sets the
description
of the field domain.See also
- Parameters:
description (Optional[str])
- setFieldType(self, type: QMetaType.Type)¶
Sets the associated field
type
.See also
setFieldType(self, type: QVariant.Type) Sets the associated field
type
.See also
Deprecated since version QGIS: 3.38 use the method with a QMetaType.Type argument instead
- Parameters:
type (QMetaType.Type)
- setMergePolicy(self, policy: Qgis.FieldDomainMergePolicy)¶
Sets the merge
policy
.See also
- Parameters:
policy (Qgis.FieldDomainMergePolicy)
- setName(self, name: str | None)¶
Sets the
name
of the field domain.See also
- Parameters:
name (Optional[str])
- setSplitPolicy(self, policy: Qgis.FieldDomainSplitPolicy)¶
Sets the split
policy
.See also
- Parameters:
policy (Qgis.FieldDomainSplitPolicy)
- splitPolicy(self) Qgis.FieldDomainSplitPolicy ¶
Returns the split policy.
See also
- Return type:
- type(self) Qgis.FieldDomainType ¶
Returns the type of field domain.
- Return type:
- typeName(self) str ¶
Returns a translated name of the field domain type.
- Return type:
str