A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-legendinfolistmodel.html below:

LegendInfoListModel Class | ArcGIS Maps SDK for Qt

Detailed Description

By default, legend information will be fetched recursively (from base layer type to sublayer types) and added to the list model. This automatic fetching of legend information can be changed by calling the setAutoFetchLegendInfos method on LayerContent or Map, whichever was the source for the model. This list model contains roles for accessing particular legend information.

This class is a subclass of QAbstractListModel.

The model returns data for the following roles:

Role Type Description name QString The name of the legend info value. symbolUrl QUrl A temporary file path to a symbol image contained in the legend info. This temporary file is deleted when the list model is destroyed. symbolWidth float The width of the symbol image. symbolHeight float The height of the symbol image. layerName QString The name of the layer that the legend information belongs to. layerMinScale double The minimum scale of the layer that the legend information belongs to. layerMaxScale double The maximum scale of the layer that the legend information belongs to.

Relevant samples:

Member Function Documentation [override virtual noexcept] LegendInfoListModel::~LegendInfoListModel()

Destructor.

[override virtual] Esri::ArcGISRuntime::LegendInfo *LegendInfoListModel::at(int index) const

Returns the legend info at the specified index.

void LegendInfoListModel::clear()

Removes all legend infos from the list model.

After clearing the list model, you can repopulate the model by calling fetchLegendInfosAsync.

List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

[override virtual] QVariant LegendInfoListModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const

Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

Returns the data stored under the given role for the legend info referred to by the index.

[signal] void LegendInfoListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

Signal emitted when an error occurs.

[since Esri::ArcGISRuntime 200.2] QFuture<void> LegendInfoListModel::fetchLegendInfosAsync(bool recursive = true)

Fetches legend information from its source layer or map and adds to the list model.

To fetch legend information recursively through the source layer and its sublayers, pass in true (the default) for the recursive parameter.

If the model's source LayerContent type or Map is configured to automatically fetch legend infos, this method does not need to be called.

This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

See Working with QFuture for further details.

This function was introduced in Esri::ArcGISRuntime 200.2.

bool LegendInfoListModel::isEmpty() const

Returns true if the list model contains no legend infos.

[override virtual] int LegendInfoListModel::size() const

Returns the number of legend infos contained in the list model.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4