ElevationSourceListModel Class

  • ElevationSourceListModel
  • class Esri::ArcGISRuntime::ElevationSourceListModel

    A list model storing a list of elevation sources available in a Scene. More...

    Header: #include <ElevationSourceListModel>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Types

    enum ElevationSourceRoles { ElevationSourceNameRole, ElevationSourceEnabledRole, ElevationSourceTypeRole }

    Public Functions

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

    Reimplemented Public Functions

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


    void elevationSourceAdded(int index)
    void elevationSourceRemoved(int index)
    void errorOccurred(Esri::ArcGISRuntime::Error error)

    Detailed Description

    Modifying this model (adding, removing, moving) will update the elevation sources available in the Scene.

    The model returns data for the following roles:

    nameQStringThe elevation source's name.ElevationSourceNameRole
    elevationSourceEnabledboolWhether the elevation source is enabled.ElevationSourceEnabledRole
    elevationSourceTypeElevationSourceTypeThe type of elevation source.ElevationSourceTypeRole

    Member Type Documentation

    enum ElevationSourceListModel::ElevationSourceRoles

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

    Esri::ArcGISRuntime::ElevationSourceListModel::ElevationSourceNameRoleQt::UserRole + 1The elevation source's name.
    Esri::ArcGISRuntime::ElevationSourceListModel::ElevationSourceEnabledRoleQt::UserRole + 2Whether the elevation source is enabled.
    Esri::ArcGISRuntime::ElevationSourceListModel::ElevationSourceTypeRoleQt::UserRole + 3The type of elevation source.

    Member Function Documentation

    [signal] void ElevationSourceListModel::elevationSourceAdded(int index)

    Signal emitted when an elevation source is added to the list model.

    • index - The index of the added elevation source.

    [signal] void ElevationSourceListModel::elevationSourceRemoved(int index)

    Signal emitted when an elevation source is removed from the list model.

    • index - The index of the removed elevation source.

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

    Signal emitted when an error occurs.

    • error - Details about the error.

    [override virtual] ElevationSourceListModel::~ElevationSourceListModel()


    void ElevationSourceListModel::append(Esri::ArcGISRuntime::ElevationSource *elevationSource)

    Appends an elevationSource to the elevation source list model.

    [override virtual] Esri::ArcGISRuntime::ElevationSource *ElevationSourceListModel::at(int index) const

    Returns the elevation source at the specified index.

    void ElevationSourceListModel::clear()

    Removes all elevation sources from the list model.

    bool ElevationSourceListModel::contains(Esri::ArcGISRuntime::ElevationSource *elevationSource) const

    Returns true if the list model contains the specified elevationSource.

    [override virtual] QVariant ElevationSourceListModel::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 elevation source referred to by the index.

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

    Esri::ArcGISRuntime::ElevationSource *ElevationSourceListModel::first() const

    Returns the first elevation source in the list model.

    int ElevationSourceListModel::indexOf(Esri::ArcGISRuntime::ElevationSource *elevationSource) const

    Returns the index of the elevationSource specified.

    void ElevationSourceListModel::insert(int index, Esri::ArcGISRuntime::ElevationSource *elevationSource)

    Inserts an elevationSource 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 ElevationSourceListModel::isEmpty() const

    Returns true if the list model contains no elevation sources.

    Esri::ArcGISRuntime::ElevationSource *ElevationSourceListModel::last() const

    Returns the last elevation source in the list model.

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

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

    void ElevationSourceListModel::removeAt(int index)

    Removes an elevation source at the specified index.

    void ElevationSourceListModel::removeOne(Esri::ArcGISRuntime::ElevationSource *elevationSource)

    Removes the specified elevationSource from the list model.

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

    Returns the number of elevation sources 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.