AnalysisOverlayListModel Class

  • AnalysisOverlayListModel
  • class Esri::ArcGISRuntime::AnalysisOverlayListModel

    A list model storing a list of analysis overlays available in a scene view. More...

    Header: #include <AnalysisOverlayListModel.h>
    Since: Esri::ArcGISRuntime 100.2
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.2.

    Public Types

    enum AnalysisOverlayRoles { AnalysisOverlayVisibleRole }

    Public Functions

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

    Reimplemented Public Functions

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

    Signals

    void errorOccurred(Esri::ArcGISRuntime::Error error)
    void itemAdded(int index)
    void itemRemoved(int index)

    Detailed Description

    Modifying this model (adding, removing, moving) will update the analysis overlays available in the scene view.

    The model returns data for the following roles:

    RoleTypeDescriptionAnalysisOverlayRoles
    analysisOverlayVisibleboolThe analysis overlay's visibility.AnalysisOverlayVisibleRole

    Member Type Documentation

    enum AnalysisOverlayListModel::AnalysisOverlayRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::AnalysisOverlayListModel::AnalysisOverlayVisibleRoleQt::UserRole + 1The analysis overlay's visibility.

    Member Function Documentation

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

    Signal emitted when an error occurs.

    • error - Details about the error.

    [signal] void AnalysisOverlayListModel::itemAdded(int index)

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

    • index - The index of the added item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [signal] void AnalysisOverlayListModel::itemRemoved(int index)

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

    • index - The index of the removed item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [override virtual] AnalysisOverlayListModel::~AnalysisOverlayListModel()

    Destructor.

    void AnalysisOverlayListModel::append(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay)

    Appends an analysisOverlay to the analysis overlay list model.

    [override virtual] Esri::ArcGISRuntime::AnalysisOverlay *AnalysisOverlayListModel::at(int index) const

    Returns the analysis overlay at the specified index.

    void AnalysisOverlayListModel::clear()

    Removes all analysis overlays from the list model.

    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.

    bool AnalysisOverlayListModel::contains(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) const

    Returns true if the list model contains the specified analysisOverlay.

    [override virtual] QVariant AnalysisOverlayListModel::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 overlay 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::AnalysisOverlay *AnalysisOverlayListModel::first() const

    Returns the first analysis overlay in the list model.

    int AnalysisOverlayListModel::indexOf(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay) const

    Returns the index of the analysisOverlay specified.

    void AnalysisOverlayListModel::insert(int index, Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay)

    Inserts an analysisOverlay 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 AnalysisOverlayListModel::isEmpty() const

    Returns true if the list model contains no analysis overlays.

    Esri::ArcGISRuntime::AnalysisOverlay *AnalysisOverlayListModel::last() const

    Returns the last analysis overlay in the list model.

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

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

    void AnalysisOverlayListModel::removeAt(int index)

    Removes an analysis overlay at the specified index.

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

    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.

    void AnalysisOverlayListModel::removeOne(Esri::ArcGISRuntime::AnalysisOverlay *analysisOverlay)

    Removes the specified analysisOverlay from the list model.

    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] int AnalysisOverlayListModel::size() const

    Returns the number of analysis overlays 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.