AnalysisListModel Class

  • 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 Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.2.

    Public Types

    enum AnalysisRoles { AnalysisVisibleRole, AnalysisTypeRole }

    Public Functions

    virtual ~AnalysisListModel() override
    void append(Esri::ArcGISRuntime::Analysis *analysis)
    void clear()
    bool contains(Esri::ArcGISRuntime::Analysis *analysis) const
    Esri::ArcGISRuntime::Analysis *first() const
    int indexOf(Esri::ArcGISRuntime::Analysis *analysis) const
    void insert(int index, Esri::ArcGISRuntime::Analysis *analysis)
    bool isEmpty() const
    Esri::ArcGISRuntime::Analysis *last() const
    void move(int from, int to)
    void removeAt(int index)
    void removeOne(Esri::ArcGISRuntime::Analysis *analysis)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::Analysis *at(int index) const override
    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
    virtual int size() const override


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

    Detailed Description

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

    The model returns data for the following roles:

    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.

    Esri::ArcGISRuntime::AnalysisListModel::AnalysisVisibleRoleQt::UserRole + 1The analysis' visibility.
    Esri::ArcGISRuntime::AnalysisListModel::AnalysisTypeRole258The analysis type.

    Member Function Documentation

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

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

    Signal emitted when an error occurs.

    • error - Details about the error.

    [override virtual] AnalysisListModel::~AnalysisListModel()


    void AnalysisListModel::append(Esri::ArcGISRuntime::Analysis *analysis)

    Appends an analysis to the analysis list model.

    [override virtual] Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::Analysis *analysis) const

    Returns true if the list model contains the specified analysis.

    [override virtual] QVariant AnalysisListModel::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 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.

    Esri::ArcGISRuntime::Analysis *AnalysisListModel::first() const

    Returns the first analysis in the list model.

    int AnalysisListModel::indexOf(Esri::ArcGISRuntime::Analysis *analysis) const

    Returns the index of the analysis specified.

    void AnalysisListModel::insert(int index, Esri::ArcGISRuntime::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.

    Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::Analysis *analysis)

    Removes the specified analysis from the list model.

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

    Returns the number of analyses contained in the list model.

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