A list model storing a list of elevation sources available in a Scene. More...
|  Header |  #include <Elevation | 
|  Since |  Esri | 
|  Inherits |  QAbstract | 
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Types
| enum | Elevation | 
Public Functions
| virtual | ~ | 
| void | append( | 
| void | clear() | 
| bool | contains( | 
|  Esri | first() const | 
| int | index | 
| void | insert(int index, Esri | 
| bool | is | 
|  Esri | last() const | 
| void | move(int from, int to) | 
| void | remove | 
| void | remove | 
Reimplemented Public Functions
|  virtual Esri | at(int index) const override | 
| virtual QVariant | data(const QModel | 
| virtual int | size() const override | 
Signals
| void | error | 
| void | item | 
| void | item | 
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:
| Role | Type | Description | ElevationSourceRoles | 
|---|---|---|---|
| name | QString | The elevation source's name. | Elevation | 
| elevation | bool | Whether the elevation source is enabled. | Elevation | 
| elevation | Elevation | The type of elevation source. | Elevation | 
Member Type Documentation
enum ElevationSourceListModel::ElevationSourceRoles      
This enum specifies the custom roles which can be used with ElevationSourceListModel::data.
| Constant | Value | Description | 
|---|---|---|
Esri | Qt | The elevation source's name. | 
Esri | Qt | Whether the elevation source is enabled. | 
Esri | Qt | The type of elevation source. | 
Member Function Documentation
[signal] void ElevationSourceListModel::errorOccurred (Esri::ArcGISRuntime::Error    error)    
Signal emitted when an error occurs.
- error - Details about the error.
 
[signal] void ElevationSourceListModel::itemAdded (int index)    
Signal emitted when an elevation source is added to the list model.
- index - The index of the added elevation source.
 
This function was introduced in Esri::ArcGISRuntime 100.15.
[signal] void ElevationSourceListModel::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] ElevationSourceListModel::~ElevationSourceListModel    ()    
Destructor.
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.
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 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.
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 ElevationSourceListModel::removeOne (Esri::ArcGISRuntime::ElevationSource     *elevationSource )    
Removes the specified elevationSource 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 ElevationSourceListModel::size() const    
Returns the number of elevation sources contained in the list model.