Skip To Content ArcGIS for Developers Sign In Dashboard

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 Iterable<ElevationSource *>

Public Types

enum ElevationSourceRoles { ElevationSourceNameRole, ElevationSourceEnabledRole, ElevationSourceTypeRole }

Public Functions

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

Reimplemented Public Functions

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

Signals

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

Additional Inherited Members

Detailed Description

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

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

The model returns data for the following roles:

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

ConstantValueDescription
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

ElevationSourceListModel::~ElevationSourceListModel()

Destructor.

void ElevationSourceListModel::append(ElevationSource *elevationSource)

Appends an elevationSource to the elevation source list model.

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(ElevationSource *elevationSource) const

Returns true if the list model contains the specified elevationSource.

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

Reimplemented from QAbstractItemModel::data().

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.

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

ElevationSource *ElevationSourceListModel::first() const

Returns the first elevation source in the list model.

int ElevationSourceListModel::indexOf(ElevationSource *elevationSource) const

Returns the index of the elevationSource specified.

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

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(ElevationSource *elevationSource)

Removes the specified elevationSource from the list model.

int ElevationSourceListModel::size() const

Returns the number of elevation sources contained in the list model.


Feedback on this topic?