QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | Protected Attributes | List of all members
QgsFieldDomain Class Referenceabstract

Base class for field domains. More...

#include <qgsfielddomain.h>

Inheritance diagram for QgsFieldDomain:
Inheritance graph
[legend]

Public Member Functions

 QgsFieldDomain (const QString &name, const QString &description, QVariant::Type fieldType)
 Constructor for QgsFieldDomain, with the specified name, description and fieldType. More...
 
virtual ~QgsFieldDomain ()
 
virtual QgsFieldDomainclone () const =0
 Clones the field domain. More...
 
QString description () const
 Returns the description of the field domain. More...
 
QVariant::Type fieldType () const
 Returns the associated field type. More...
 
Qgis::FieldDomainMergePolicy mergePolicy () const
 Returns the merge policy. More...
 
QString name () const
 Returns the name of the field domain. More...
 
void setDescription (const QString &description)
 Sets the description of the field domain. More...
 
void setFieldType (QVariant::Type type)
 Sets the associated field type. More...
 
void setMergePolicy (Qgis::FieldDomainMergePolicy policy)
 Sets the merge policy. More...
 
void setName (const QString &name)
 Sets the name of the field domain. More...
 
void setSplitPolicy (Qgis::FieldDomainSplitPolicy policy)
 Sets the split policy. More...
 
Qgis::FieldDomainSplitPolicy splitPolicy () const
 Returns the split policy. More...
 
virtual Qgis::FieldDomainType type () const =0
 Returns the type of field domain. More...
 
virtual QString typeName () const =0
 Returns a translated name of the field domain type. More...
 

Protected Attributes

QString mDescription
 
QVariant::Type mFieldType = QVariant::Type::String
 
Qgis::FieldDomainMergePolicy mMergePolicy = Qgis::FieldDomainMergePolicy::DefaultValue
 
QString mName
 
Qgis::FieldDomainSplitPolicy mSplitPolicy = Qgis::FieldDomainSplitPolicy::DefaultValue
 

Detailed Description

Base class for field domains.

A field domain is a set of constraints that apply to one or several fields.

Since
QGIS 3.26

Definition at line 33 of file qgsfielddomain.h.

Constructor & Destructor Documentation

◆ QgsFieldDomain()

QgsFieldDomain::QgsFieldDomain ( const QString &  name,
const QString &  description,
QVariant::Type  fieldType 
)

Constructor for QgsFieldDomain, with the specified name, description and fieldType.

Definition at line 23 of file qgsfielddomain.cpp.

◆ ~QgsFieldDomain()

QgsFieldDomain::~QgsFieldDomain ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual QgsFieldDomain * QgsFieldDomain::clone ( ) const
pure virtual

Clones the field domain.

Implemented in QgsCodedFieldDomain, QgsRangeFieldDomain, and QgsGlobFieldDomain.

◆ description()

QString QgsFieldDomain::description ( ) const
inline

Returns the description of the field domain.

See also
setDescription()

Definition at line 102 of file qgsfielddomain.h.

◆ fieldType()

QVariant::Type QgsFieldDomain::fieldType ( ) const
inline

Returns the associated field type.

See also
setFieldType()

Definition at line 116 of file qgsfielddomain.h.

◆ mergePolicy()

Qgis::FieldDomainMergePolicy QgsFieldDomain::mergePolicy ( ) const
inline

Returns the merge policy.

See also
setMergePolicy()

Definition at line 144 of file qgsfielddomain.h.

◆ name()

QString QgsFieldDomain::name ( ) const
inline

Returns the name of the field domain.

See also
setName()

Definition at line 88 of file qgsfielddomain.h.

◆ setDescription()

void QgsFieldDomain::setDescription ( const QString &  description)
inline

Sets the description of the field domain.

See also
description()

Definition at line 109 of file qgsfielddomain.h.

◆ setFieldType()

void QgsFieldDomain::setFieldType ( QVariant::Type  type)
inline

Sets the associated field type.

See also
fieldType()

Definition at line 123 of file qgsfielddomain.h.

◆ setMergePolicy()

void QgsFieldDomain::setMergePolicy ( Qgis::FieldDomainMergePolicy  policy)
inline

Sets the merge policy.

See also
mergePolicy()

Definition at line 151 of file qgsfielddomain.h.

◆ setName()

void QgsFieldDomain::setName ( const QString &  name)
inline

Sets the name of the field domain.

See also
name()

Definition at line 95 of file qgsfielddomain.h.

◆ setSplitPolicy()

void QgsFieldDomain::setSplitPolicy ( Qgis::FieldDomainSplitPolicy  policy)
inline

Sets the split policy.

See also
splitPolicy()

Definition at line 137 of file qgsfielddomain.h.

◆ splitPolicy()

Qgis::FieldDomainSplitPolicy QgsFieldDomain::splitPolicy ( ) const
inline

Returns the split policy.

See also
setSplitPolicy()

Definition at line 130 of file qgsfielddomain.h.

◆ type()

virtual Qgis::FieldDomainType QgsFieldDomain::type ( ) const
pure virtual

Returns the type of field domain.

Implemented in QgsCodedFieldDomain, QgsRangeFieldDomain, and QgsGlobFieldDomain.

◆ typeName()

virtual QString QgsFieldDomain::typeName ( ) const
pure virtual

Returns a translated name of the field domain type.

Implemented in QgsCodedFieldDomain, QgsRangeFieldDomain, and QgsGlobFieldDomain.

Member Data Documentation

◆ mDescription

QString QgsFieldDomain::mDescription
protected

Definition at line 156 of file qgsfielddomain.h.

◆ mFieldType

QVariant::Type QgsFieldDomain::mFieldType = QVariant::Type::String
protected

Definition at line 158 of file qgsfielddomain.h.

◆ mMergePolicy

Definition at line 160 of file qgsfielddomain.h.

◆ mName

QString QgsFieldDomain::mName
protected

Definition at line 155 of file qgsfielddomain.h.

◆ mSplitPolicy

Definition at line 159 of file qgsfielddomain.h.


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