QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
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. | |
QgsCodedFieldDomain (const QString &name, const QString &description, QMetaType::Type fieldType, const QList< QgsCodedValue > &values) | |
Constructor for QgsCodedFieldDomain, with the associated name, description and fieldType. | |
Q_DECL_DEPRECATED | QgsCodedFieldDomain (const QString &name, const QString &description, QVariant::Type fieldType, const QList< QgsCodedValue > &values) |
Constructor for QgsCodedFieldDomain, with the associated name, description and fieldType. | |
QgsCodedFieldDomain * | clone () const override |
Clones the field domain. | |
QgsCodedFieldDomain & | operator= (const QgsCodedFieldDomain &)=delete |
QgsCodedFieldDomain cannot be copied - use clone() instead. | |
void | setValues (const QList< QgsCodedValue > &values) |
Sets the enumeration as QgsCodedValue values. | |
Qgis::FieldDomainType | type () const override |
Returns the type of field domain. | |
QString | typeName () const override |
Returns a translated name of the field domain type. | |
QList< QgsCodedValue > | values () const |
Returns the enumeration as QgsCodedValue values. | |
Public Member Functions inherited from QgsFieldDomain | |
QgsFieldDomain (const QString &name, const QString &description, QMetaType::Type fieldType) | |
Constructor for QgsFieldDomain, with the specified name, description and fieldType. | |
Q_DECL_DEPRECATED | QgsFieldDomain (const QString &name, const QString &description, QVariant::Type fieldType) |
Constructor for QgsFieldDomain, with the specified name, description and fieldType. | |
virtual | ~QgsFieldDomain () |
QString | description () const |
Returns the description of the field domain. | |
QMetaType::Type | fieldType () const |
Returns the associated field type. | |
Qgis::FieldDomainMergePolicy | mergePolicy () const |
Returns the merge policy. | |
QString | name () const |
Returns the name of the field domain. | |
void | setDescription (const QString &description) |
Sets the description of the field domain. | |
void | setFieldType (QMetaType::Type type) |
Sets the associated field type. | |
Q_DECL_DEPRECATED void | setFieldType (QVariant::Type type) |
Sets the associated field type. | |
void | setMergePolicy (Qgis::FieldDomainMergePolicy policy) |
Sets the merge policy. | |
void | setName (const QString &name) |
Sets the name of the field domain. | |
void | setSplitPolicy (Qgis::FieldDomainSplitPolicy policy) |
Sets the split policy. | |
Qgis::FieldDomainSplitPolicy | splitPolicy () const |
Returns the split policy. | |
Additional Inherited Members | |
Protected Attributes inherited from QgsFieldDomain | |
QString | mDescription |
QMetaType::Type | mFieldType = QMetaType::Type::QString |
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 241 of file qgsfielddomain.h.
QgsCodedFieldDomain::QgsCodedFieldDomain | ( | const QString & | name, |
const QString & | description, | ||
QMetaType::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 63 of file qgsfielddomain.cpp.
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 70 of file qgsfielddomain.cpp.
|
delete |
QgsCodedFieldDomain cannot be copied - use clone() instead.
|
overridevirtual |
Clones the field domain.
Implements QgsFieldDomain.
Definition at line 86 of file qgsfielddomain.cpp.
|
delete |
QgsCodedFieldDomain cannot be copied - use clone() instead.
|
inline |
Sets the enumeration as QgsCodedValue values.
Definition at line 292 of file qgsfielddomain.h.
|
overridevirtual |
Returns the type of field domain.
Implements QgsFieldDomain.
Definition at line 76 of file qgsfielddomain.cpp.
|
overridevirtual |
Returns a translated name of the field domain type.
Implements QgsFieldDomain.
Definition at line 81 of file qgsfielddomain.cpp.
|
inline |
Returns the enumeration as QgsCodedValue values.
Definition at line 285 of file qgsfielddomain.h.