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.

New in version 3.26.

QgsFieldDomain(name: str, description: str, fieldType: QVariant.Type) Constructor for QgsFieldDomain, with the specified name, description and fieldType.

QgsFieldDomain(QgsFieldDomain)

Methods

clone

Clones the field domain.

description

Returns the description of the field domain.

fieldType

Returns the associated field type.

mergePolicy

Returns the merge policy.

name

Returns the name of the field domain.

setDescription

Sets the description of the field domain.

setFieldType

Sets the associated field type.

setMergePolicy

Sets the merge policy.

setName

Sets the name of the field domain.

setSplitPolicy

Sets the split policy.

splitPolicy

Returns the split policy.

type

Returns the type of field domain.

typeName

Returns a translated name of the field domain type.

clone(self) QgsFieldDomain

Clones the field domain.

Return type

QgsFieldDomain

description(self) str

Returns the description of the field domain.

See also

setDescription()

Return type

str

fieldType(self) QVariant.Type

Returns the associated field type.

See also

setFieldType()

Return type

QVariant.Type

mergePolicy(self) Qgis.FieldDomainMergePolicy

Returns the merge policy.

See also

setMergePolicy()

Return type

Qgis.FieldDomainMergePolicy

name(self) str

Returns the name of the field domain.

See also

setName()

Return type

str

setDescription(self, description: str)

Sets the description of the field domain.

See also

description()

Parameters

description (str) –

setFieldType(self, type: QVariant.Type)

Sets the associated field type.

See also

fieldType()

Parameters

type (QVariant.Type) –

setMergePolicy(self, policy: Qgis.FieldDomainMergePolicy)

Sets the merge policy.

See also

mergePolicy()

Parameters

policy (Qgis.FieldDomainMergePolicy) –

setName(self, name: str)

Sets the name of the field domain.

See also

name()

Parameters

name (str) –

setSplitPolicy(self, policy: Qgis.FieldDomainSplitPolicy)

Sets the split policy.

See also

splitPolicy()

Parameters

policy (Qgis.FieldDomainSplitPolicy) –

splitPolicy(self) Qgis.FieldDomainSplitPolicy

Returns the split policy.

See also

setSplitPolicy()

Return type

Qgis.FieldDomainSplitPolicy

type(self) Qgis.FieldDomainType

Returns the type of field domain.

Return type

Qgis.FieldDomainType

typeName(self) str

Returns a translated name of the field domain type.

Return type

str