Skip To Content ArcGIS for Developers Sign In Dashboard

AnalysisListModel Class

(Esri::ArcGISRuntime::AnalysisListModel)

A list model storing a list of analyses available in an AnalysisOverlay. More...

Header: #include <AnalysisListModel>
Since: Esri::ArcGISRuntime 100.2
Inherits: QAbstractListModel and Iterable<Analysis *>

Public Types

enum AnalysisRoles { AnalysisVisibleRole, AnalysisTypeRole }

Public Functions

~AnalysisListModel()
void append(Analysis *analysis)
Analysis *at(int index) const
void clear()
bool contains(Analysis *analysis) const
Analysis *first() const
int indexOf(Analysis *analysis) const
void insert(int index, Analysis *analysis)
bool isEmpty() const
Analysis *last() const
void move(int from, int to)
void removeAt(int index)
void removeOne(Analysis *analysis)
int size() const

Reimplemented Public Functions

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

Signals

void analysisAdded(int index)
void analysisRemoved(int index)
void errorOccurred(Esri::ArcGISRuntime::Error error)

Additional Inherited Members

Detailed Description

A list model storing a list of analyses available in an AnalysisOverlay.

Modifying this model (adding, removing, moving) will update the analyses available in the AnalysisOverlay.

The model returns data for the following roles:

RoleTypeDescriptionAnalysisRoles
analysisVisibleboolThe analysis' visibility.AnalysisVisibleRole
analysisTypeAnalysisTypeThe analysis type.AnalysisTypeRole

Member Type Documentation

enum AnalysisListModel::AnalysisRoles

This enum specifies the custom roles which can be used with AnalysisListModel::data.

ConstantValueDescription
Esri::ArcGISRuntime::AnalysisListModel::AnalysisVisibleRoleQt::UserRole + 1The analysis' visibility.
Esri::ArcGISRuntime::AnalysisListModel::AnalysisTypeRole?The analysis type.

Member Function Documentation

AnalysisListModel::~AnalysisListModel()

Destructor.

[signal] void AnalysisListModel::analysisAdded(int index)

Signal emitted when an analysis is added to the list model.

  • index - The index of the added analysis.

[signal] void AnalysisListModel::analysisRemoved(int index)

Signal emitted when an analysis is removed from the list model.

  • index - The index of the removed analysis.

void AnalysisListModel::append(Analysis *analysis)

Appends an analysis to the analysis list model.

Analysis *AnalysisListModel::at(int index) const

Returns the analysis at the specified index.

void AnalysisListModel::clear()

Removes all analyses from the list model.

bool AnalysisListModel::contains(Analysis *analysis) const

Returns true if the list model contains the specified analysis.

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

Reimplemented from QAbstractItemModel::data().

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

  • index. The index in the model for which to return data.
  • role. The role for which to return data.

An empty value is returned if the specified index is out of range.

[signal] void AnalysisListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

Signal emitted when an error occurs.

  • error - Details about the error.

Analysis *AnalysisListModel::first() const

Returns the first analysis in the list model.

int AnalysisListModel::indexOf(Analysis *analysis) const

Returns the index of the analysis specified.

void AnalysisListModel::insert(int index, Analysis *analysis)

Inserts an analysis at a specified index in the list model.

This method will append to the list if the index is greater than the current size of the list model.

bool AnalysisListModel::isEmpty() const

Returns true if the list model contains no analyses.

Analysis *AnalysisListModel::last() const

Returns the last analysis in the list model.

void AnalysisListModel::move(int from, int to)

Moves one analysis from an index in the list model to a different index.

void AnalysisListModel::removeAt(int index)

Removes an analysis at the specified index.

No analysis will be removed if the specified index is out of range.

void AnalysisListModel::removeOne(Analysis *analysis)

Removes the specified analysis from the list model.

int AnalysisListModel::size() const

Returns the number of analyses contained in the list model.


Feedback on this topic?