;

UniqueValue Class

  • 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: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::JsonSerializable

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

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

    Reimplemented Public Functions

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

    Static Public Members

    Esri::ArcGISRuntime::UniqueValue *fromJson(const QString &json, QObject *parent = nullptr)

    Detailed Description

    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(const QString &label, const QString &description, const QVariantList &values, Esri::ArcGISRuntime::Symbol *symbol, QObject *parent = nullptr)

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

    UniqueValue::UniqueValue(QObject *parent = nullptr)

    Default constructor with an optional parent.

    [override virtual] UniqueValue::~UniqueValue()

    Destructor.

    Esri::ArcGISRuntime::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 the unique value.

    "Parcels zoned for residential use", for example.

    See also setDescription().

    [static] Esri::ArcGISRuntime::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 for the unique value.

    "Residential", for example.

    See also setLabel().

    void UniqueValue::setDescription(const QString &description)

    Sets the description of the unique value.

    "Parcels zoned for residential use", for example.

    See also description().

    void UniqueValue::setLabel(const QString &label)

    Sets the label for the unique value.

    "Residential", for example.

    See also label().

    void UniqueValue::setSymbol(Esri::ArcGISRuntime::Symbol *symbol)

    Sets the symbol used to represent elements with 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().

    Esri::ArcGISRuntime::Symbol *UniqueValue::symbol() const

    Returns the symbol used to represent elements with this unique value.

    See also setSymbol().

    [override virtual] QString UniqueValue::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Returns this unique value as a JSON representation.

    See also JsonSerializable.

    [override virtual] QJsonObject UniqueValue::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Gets the unknown JSON of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject UniqueValue::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    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 Esri::ArcGISRuntime::UniqueValue *other) const

    Equivalency operator

    Returns true if this object and other are equal.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.