Skip To Content ArcGIS for Developers Sign In Dashboard

UniqueValue Class

(Esri::ArcGISRuntime::UniqueValue)

A unique value definition for use with a unique value renderer. More...

Header: #include <UniqueValue>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object and JsonSerializable

Public Functions

UniqueValue(QObject *parent = nullptr)
UniqueValue(const QString &label, const QString &description, const QVariantList &values, Symbol *symbol, QObject *parent = nullptr)
~UniqueValue()
UniqueValue *clone(QObject *parent = nullptr) const
QString description() const
QString label() const
void setDescription(const QString &description)
void setLabel(const QString &label)
void setSymbol(Symbol *symbol)
void setValues(const QVariantList &values)
Symbol *symbol() const
QVariantList values() const
bool operator==(const UniqueValue *other) const

Reimplemented Public Functions

virtual QString toJson() const
virtual QJsonObject unknownJson() const
virtual QJsonObject unsupportedJson() const

Static Public Members

UniqueValue *fromJson(const QString &json, QObject *parent = nullptr)
  • 10 static public members inherited from QObject

Additional Inherited Members

Detailed Description

A unique value definition for use with a unique value renderer.

A unique value corresponds to a specific value for an attribute field. A list of unique value instances are maintained in the UniqueValueListModel. When the unique value renderer is used to display a layer, the symbol used for a feature is determined by the value in a selected attribute. When the value matches the unique value, the corresponding symbol and label display.

Unique values contain a value and description, as well as the label and symbol to display for features that contain attribute values that match the unique value.

See also UniqueValueRenderer.

Member Function Documentation

UniqueValue::UniqueValue(QObject *parent = nullptr)

Default constructor with an optional parent.

UniqueValue::UniqueValue(const QString &label, const QString &description, const QVariantList &values, Symbol *symbol, QObject *parent = nullptr)

Constructor that takes a label, description, list of values, and symbol, with an optional parent.

UniqueValue::~UniqueValue()

Destructor.

UniqueValue *UniqueValue::clone(QObject *parent = nullptr) const

Clones the unique value to a new instance with an optional parent.

Returns a new instance of the unique value.

QString UniqueValue::description() const

Returns the description of this unique value.

See also setDescription().

[static] UniqueValue *UniqueValue::fromJson(const QString &json, QObject *parent = nullptr)

Creates and returns a new unique value from the provided json, with an optional parent.

See also JsonSerializable.

QString UniqueValue::label() const

Returns the label used to display this unique value.

See also setLabel().

void UniqueValue::setDescription(const QString &description)

Sets the description of this unique value.

See also description().

void UniqueValue::setLabel(const QString &label)

Sets the label used to display this unique value.

See also label().

void UniqueValue::setSymbol(Symbol *symbol)

Sets the symbol used to display this unique value.

See also symbol().

void UniqueValue::setValues(const QVariantList &values)

Sets the attribute value or list of values that comprise this unique value.

See also values().

Symbol *UniqueValue::symbol() const

Returns the symbol used to display this unique value.

See also setSymbol().

[virtual] QString UniqueValue::toJson() const

Reimplemented from JsonSerializable::toJson().

Returns this unique value as a JSON representation.

See also JsonSerializable.

[virtual] QJsonObject UniqueValue::unknownJson() const

Reimplemented from JsonSerializable::unknownJson().

Gets the unknown JSON of this object.

See also JsonSerializable.

[virtual] QJsonObject UniqueValue::unsupportedJson() const

Reimplemented from JsonSerializable::unsupportedJson().

Gets the unsupported JSON of this object.

See also JsonSerializable.

QVariantList UniqueValue::values() const

Returns the attribute value or list of values that comprise this unique value.

See also setValues().

bool UniqueValue::operator==(const UniqueValue *other) const

Equivalency operator

Returns true if this object and other are equal.


Feedback on this topic?