A list model storing a list of SymbolStyleSearchResult. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Properties
Signals
Methods
Detailed Description
This list model is commonly used to create a symbol gallery viewing application. This is achieved by applying the list model to a list view or grid view, and displaying the symbol swatch and some relevant information along side it in the view's delegate.
Note: You cannot declare or create a component of this type in QML code.
This class is a subclass of QAbstractListModel.
The model returns data for the following roles:
Role | Type | Description |
---|---|---|
category | string | The category of the search result. |
key | string | The key of the search result. |
name | string | The name of the search result. |
symbolClass | string | The symbol class of the search result. |
tags | string list | The tags of the search result. |
symbolUrl | url | The file path of the results' symbol swatch. |
The symbolUrl role automatically fetches the symbol swatch for the model. You don't need to call createSwatch manually for this to work.
See also SymbolStyleSearchResult.
Property Documentation
error : Error |
Returns the error object (read-only).
Signal Documentation
Emitted when the error property changes, which can indicate that an error occurred.
Note: The corresponding handler is onErrorChanged
.
Method Documentation
Receives a callback function to execute for each SymbolStyleSearchResult info in the model.
The callback function can take 0 to 3 optional arguments, in order:
- element Current SymbolStyleSearchResult.
- index Current index in array.
- array Reference to SymbolStyleSearchResultListModel.
Returns undefined if no error occurred, and an error message otherwise.
const error = SymbolStyleSearchResultListModel.forEach(function(element, index, array) { ... }); if (error) { console.error(error.message); }
SymbolStyleSearchResult get(int index) |
Returns the SymbolStyleSearchResult info at the specified index.