SymbolStyleSearchResultListModel QML Type

SymbolStyleSearchResult."> SymbolStyleSearchResultListModel QML Type | ArcGISQtQml
  • Esri.ArcGISRuntime
  • SymbolStyleSearchResultListModel
  • A list model storing a list of SymbolStyleSearchResult. More...

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

    Properties

    Signals

    Methods

    • error 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

    [read-only] count : int

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


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

    Note: The corresponding handler is onErrorChanged.


    Method Documentation

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

    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.


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