Skip To Content ArcGIS for Developers Sign In Dashboard

AttributeListModel QML Type

A list model storing a list of key-value pairs to be used as attributes for a Feature or Graphic. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0

Properties

Signals

Methods

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

Modifying this model (adding or removing) will update the attributes available in the feature or graphic.

The model returns data for the following roles:

RoleTypeDescription
attributeNamestringThe name/key for the attribute.
attributeValuevarThe value for the attribute.

Property Documentation

attributeNames : list<string>

A list of all the attribute names in the model (read-only).


attributesJson : jsobject

The attributes as a JSON representation.

Providing attributes as JSON will replace all attributes in the model with the specified JSON attributes.


count : int

Returns the number of attributes in the model (read-only).


error : Error

Returns the last error that occurred on the model (read-only).


Signal Documentation

attributeNamesChanged()

Emitted when the attributeNames property changes.

Note: The corresponding handler is onAttributeNamesChanged.


attributesJsonChanged()

Emitted when the attributesJson property changes.

Note: The corresponding handler is onAttributesJsonChanged.


countChanged()

Emitted when the count property changes.

Note: The corresponding handler is onCountChanged.


errorChanged()

Emitted when the error property changes, which can indicate that an error occurred.

Note: The corresponding handler is onErrorChanged.


Method Documentation

var attributeValue(attributeName)

Returns an attribute value by attributeName.


bool containsAttribute(attributeName)

Returns true if the model contains the provided attributeName.


bool equals(other)

Returns true if this AttributeListModel is equal to other.


void insertAttribute(attributeName, var attributeValue)

Inserts the value attributeValue of the attribute named attributeName.


void removeAllAttributes()

Removes all attributes from the model.


void removeAttribute(attributeName)

Removes the attribute named attributeName from the model.


void replaceAttribute(attributeName, var attributeValue)

Replaces the value attributeValue of the attribute named attributeName.



Feedback on this topic?