Skip To Content ArcGIS for Developers Sign In Dashboard

SymbolStyleSearchResultListModel QML Type

A list model storing a list of SymbolStyleSearchResult. More...

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

Properties

Signals

Methods

  • void forEach(callback )
  • SymbolStyleSearchResult get(int index)

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:

RoleTypeDescription
categorystringThe category of the search result.
keystringThe key of the search result.
namestringThe name of the search result.
symbolClassstringThe symbol class of the search result.
tagsstring listThe tags of the search result.
symbolUrlurlThe 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

count : int

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


error : Error

Returns the error object (read-only).


Signal Documentation

errorChanged()

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


Method Documentation

void forEach(callback )

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:

Returns undefined if no error occurred, and an error message otherwise.

var 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.



Feedback on this topic?