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 |
Since: | Esri.ArcGISRuntime 100.0 |
Properties
- attributeNames : list<string>
- attributesJson : jsobject
- count : int
- error : Error
Signals
Methods
- var attributeValue(string attributeName)
- bool containsAttribute(string attributeName)
- bool equals(AttributeListModel other)
- void insertAttribute(string attributeName, var attributeValue)
- void removeAllAttributes()
- void removeAttribute(string attributeName)
- void replaceAttribute(string attributeName, var attributeValue)
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:
Role | Type | Description |
---|---|---|
attributeName | string | The name/key for the attribute. |
attributeValue | var | The 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(string attributeName) |
Returns an attribute value by attributeName.
bool containsAttribute(string attributeName) |
Returns true
if the model contains the provided attributeName.
bool equals(AttributeListModel other) |
Returns true
if this AttributeListModel is equal to other.
void insertAttribute(string attributeName, var attributeValue) |
Inserts the value attributeValue of the attribute named attributeName.
void removeAllAttributes() |
Removes all attributes from the model.
void removeAttribute(string attributeName) |
Removes the attribute named attributeName from the model.
void replaceAttribute(string attributeName, var attributeValue) |
Replaces the value attributeValue of the attribute named attributeName.