QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
Definition of a coded / enumerated field domain. More...
#include <qgsfielddomain.h>
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... | |
QgsCodedFieldDomain * | clone () const override |
Clones the field domain. More... | |
QgsCodedFieldDomain & | operator= (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< QgsCodedValue > | values () 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 QgsFieldDomain * | clone () 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 |
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.
Definition at line 225 of file qgsfielddomain.h.
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.
|
delete |
QgsCodedFieldDomain cannot be copied - use clone() instead.
|
overridevirtual |
Clones the field domain.
Implements QgsFieldDomain.
Definition at line 67 of file qgsfielddomain.cpp.
|
delete |
QgsCodedFieldDomain cannot be copied - use clone() instead.
|
inline |
Sets the enumeration as QgsCodedValue values.
Definition at line 264 of file qgsfielddomain.h.
|
overridevirtual |
Returns the type of field domain.
Implements QgsFieldDomain.
Definition at line 57 of file qgsfielddomain.cpp.
|
overridevirtual |
Returns a translated name of the field domain type.
Implements QgsFieldDomain.
Definition at line 62 of file qgsfielddomain.cpp.
|
inline |
Returns the enumeration as QgsCodedValue values.
Definition at line 257 of file qgsfielddomain.h.