QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | List of all members
QgsCodedFieldDomain Class Reference

Definition of a coded / enumerated field domain. More...

#include <qgsfielddomain.h>

Inheritance diagram for QgsCodedFieldDomain:
Inheritance graph
[legend]

Public Member Functions

 QgsCodedFieldDomain (const QgsCodedFieldDomain &)=delete
 QgsCodedFieldDomain cannot be copied - use clone() instead. More...
 
 QgsCodedFieldDomain (const QString &name, const QString &description, QVariant::Type fieldType, const QList< QgsCodedValue > &values)
 Constructor for QgsCodedFieldDomain, with the associated name, description and fieldType. More...
 
QgsCodedFieldDomainclone () const override
 Clones the field domain. More...
 
QgsCodedFieldDomainoperator= (const QgsCodedFieldDomain &)=delete
 QgsCodedFieldDomain cannot be copied - use clone() instead. More...
 
void setValues (const QList< QgsCodedValue > &values)
 Sets the enumeration as QgsCodedValue values. More...
 
Qgis::FieldDomainType type () const override
 Returns the type of field domain. More...
 
QString typeName () const override
 Returns a translated name of the field domain type. More...
 
QList< QgsCodedValuevalues () const
 Returns the enumeration as QgsCodedValue values. More...
 
- Public Member Functions inherited from QgsFieldDomain
 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...
 

Additional Inherited Members

- Protected Attributes inherited from QgsFieldDomain
QString mDescription
 
QVariant::Type mFieldType = QVariant::Type::String
 
Qgis::FieldDomainMergePolicy mMergePolicy = Qgis::FieldDomainMergePolicy::DefaultValue
 
QString mName
 
Qgis::FieldDomainSplitPolicy mSplitPolicy = Qgis::FieldDomainSplitPolicy::DefaultValue
 

Detailed Description

Definition of a coded / enumerated field domain.

A code field domain is a domain for which only a limited set of codes, associated with their expanded value, are allowed. The type of the code should be the one of the field domain.

Since
QGIS 3.26

Definition at line 225 of file qgsfielddomain.h.

Constructor & Destructor Documentation

◆ QgsCodedFieldDomain() [1/2]

QgsCodedFieldDomain::QgsCodedFieldDomain ( const QString &  name,
const QString &  description,
QVariant::Type  fieldType,
const QList< QgsCodedValue > &  values 
)

Constructor for QgsCodedFieldDomain, with the associated name, description and fieldType.

The values list details the coded field values as QgsCodedValue objects. Each code should appear only once, but it is the responsibility of the user to check this.

Definition at line 50 of file qgsfielddomain.cpp.

◆ QgsCodedFieldDomain() [2/2]

QgsCodedFieldDomain::QgsCodedFieldDomain ( const QgsCodedFieldDomain )
delete

QgsCodedFieldDomain cannot be copied - use clone() instead.

Member Function Documentation

◆ clone()

QgsCodedFieldDomain * QgsCodedFieldDomain::clone ( ) const
overridevirtual

Clones the field domain.

Implements QgsFieldDomain.

Definition at line 67 of file qgsfielddomain.cpp.

◆ operator=()

QgsCodedFieldDomain & QgsCodedFieldDomain::operator= ( const QgsCodedFieldDomain )
delete

QgsCodedFieldDomain cannot be copied - use clone() instead.

◆ setValues()

void QgsCodedFieldDomain::setValues ( const QList< QgsCodedValue > &  values)
inline

Sets the enumeration as QgsCodedValue values.

See also
values()

Definition at line 264 of file qgsfielddomain.h.

◆ type()

Qgis::FieldDomainType QgsCodedFieldDomain::type ( ) const
overridevirtual

Returns the type of field domain.

Implements QgsFieldDomain.

Definition at line 57 of file qgsfielddomain.cpp.

◆ typeName()

QString QgsCodedFieldDomain::typeName ( ) const
overridevirtual

Returns a translated name of the field domain type.

Implements QgsFieldDomain.

Definition at line 62 of file qgsfielddomain.cpp.

◆ values()

QList< QgsCodedValue > QgsCodedFieldDomain::values ( ) const
inline

Returns the enumeration as QgsCodedValue values.

See also
setValues()

Definition at line 257 of file qgsfielddomain.h.


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