The description of the CodedValue to be created. More...
Header: | #include <CodedValueDescription> |
Since: | Esri::ArcGISRuntime 100.14 |
Inherits: | Esri::ArcGISRuntime::Object |
Public Functions
CodedValueDescription(const QString &name, const QVariant &value, QObject *parent = nullptr) | |
virtual | ~CodedValueDescription() override |
QString | name() const |
void | setName(const QString &name) |
void | setValue(const QVariant &value) |
QVariant | value() const |
Detailed Description
Each CodedValueDescription consists of a value and a name. For example, for roads data the values 1, 2, and 3 might correspond to three types of road surface such as gravel, asphalt, and concrete. Coded value domains are typically created and assigned to your datasets using ArcGIS Pro, ArcGIS Online, or ArcGIS Enterprise.
If your mobile geodatabase was created in ArcGIS Pro or using Geodatabase::createAsync(const QString&, QObject*), you can create a CodedValueDomain. First, you must create a CodedValueDomainDescription with a collection of CodedValueDescription, by using CodedValueDomainDescription::CodedValueDomainDescription(const QString&, Esri::ArcGISRuntime::FieldType, const QList<Esri::ArcGISRuntime::CodedValueDescription*>&, QObject*). Next, you create the CodedValueDomain by calling Geodatabase::createDomainAsync(Esri::ArcGISRuntime::DomainDescription*) with the CodedValueDomainDescription.
Member Function Documentation
CodedValueDescription::CodedValueDescription (const QString &name, const QVariant &value, QObject *parent = nullptr)
Creates a new coded value description object with the specified name and value.
- name - The coded value's name.
- value - The coded value's value.
- parent - The optional parent QObject.
[override virtual]
CodedValueDescription::~CodedValueDescription ()
Destructor.
QString CodedValueDescription::name() const
Returns the coded value's name.
See also setName().
void CodedValueDescription::setName (const QString &name)
Sets the name to name.
See also name.
void CodedValueDescription::setValue (const QVariant &value)
Sets the value to value.
See also value.
QVariant CodedValueDescription::value() const
Returns the coded value's value.
For fields that utilize a coded value domain, the field type must match the type of the coded values.
See also setValue().