Skip To Content ArcGIS for Developers Sign In Dashboard

DistanceSymbolRangeListModel Class


A list model of DistanceSymbolRange objects. More...

Header: #include <DistanceSymbolRangeListModel>
Since: Esri::ArcGISRuntime 100.0
Inherits: QAbstractListModel and Iterable<DistanceSymbolRange *>

Public Types

enum DistanceSymbolRangeRoles { DistanceSymbolRangeMaxDistanceRole, DistanceSymbolRangeMinDistanceRole, DistanceSymbolRangeSymbolRole }

Public Functions

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

Reimplemented Public Functions

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


void distanceSymbolRangeAdded(int index)
void distanceSymbolRangeRemoved(int index)
void errorOccurred(Esri::ArcGISRuntime::Error error)

Additional Inherited Members

Detailed Description

A list model of DistanceSymbolRange objects.

DistanceSymbolRangeListModel is used closely with DistanceCompositeSceneSymbol and DistanceSymbolRange to manage dynamic symbols based on distance from the Camera.

In the context of its use as a member object of DistanceCompositeSceneSymbol, modifying this model (adding, removing, or reordering items) will update the distance symbol ranges available in the distance composite scene symbol.

The model returns data for the following roles:

maxDistancedoubleThe maximum distance range value.DistanceSymbolRangeMaxDistanceRole
minDistancedoubleThe minimum distance range value.DistanceSymbolRangeMinDistanceRole
symbolSymbolThe symbol for the distance symbol range.DistanceSymbolRangeSymbolRole

Member Type Documentation

enum DistanceSymbolRangeListModel::DistanceSymbolRangeRoles

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

Esri::ArcGISRuntime::DistanceSymbolRangeListModel::DistanceSymbolRangeMaxDistanceRoleQt::UserRole + 1The maximum distance range value.
Esri::ArcGISRuntime::DistanceSymbolRangeListModel::DistanceSymbolRangeMinDistanceRoleQt::UserRole + 2The minimum distance range value.
Esri::ArcGISRuntime::DistanceSymbolRangeListModel::DistanceSymbolRangeSymbolRoleQt::UserRole + 3The symbol for the distance symbol range.

Member Function Documentation



void DistanceSymbolRangeListModel::append(DistanceSymbolRange *distanceSymbolRange)

Appends a distanceSymbolRange object to the DistanceSymbolRangeListModel

DistanceSymbolRange *DistanceSymbolRangeListModel::at(int index) const

Returns the distanceSymbolRange at the specified index.

void DistanceSymbolRangeListModel::clear()

Removes all distance symbol ranges from the list model.

bool DistanceSymbolRangeListModel::contains(DistanceSymbolRange *distanceSymbolRange) const

Returns true if the list model contains the specified distanceSymbolRange.

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

Reimplemented from QAbstractItemModel::data().

Returns the data stored under the given role for the symbol range 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 DistanceSymbolRangeListModel::distanceSymbolRangeAdded(int index)

Signal emitted when a distanceSymbolRange is added to the list model.

  • index - The index of the added distanceSymbolRange.

[signal] void DistanceSymbolRangeListModel::distanceSymbolRangeRemoved(int index)

Signal emitted when a distanceSymbolRange is removed from the list model.

  • index -The index of the removed distanceSymbolRange.

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

Signal emitted when an error occurs.

  • error - Details about the error.

DistanceSymbolRange *DistanceSymbolRangeListModel::first() const

Returns the first distanceSymbolRange in the list model.

int DistanceSymbolRangeListModel::indexOf(DistanceSymbolRange *distanceSymbolRange) const

Returns the index of the distanceSymbolRange specified.

void DistanceSymbolRangeListModel::insert(int index, DistanceSymbolRange *distanceSymbolRange)

Inserts a distanceSymbolRange at a specified index in the list model.

This method will append to the list model if the index is greater than the current size of the list.

bool DistanceSymbolRangeListModel::isEmpty() const

Returns whether this DistanceSymbolRangeListModel is empty.

DistanceSymbolRange *DistanceSymbolRangeListModel::last() const

Returns the last distanceSymbolRange in the list model.

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

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

void DistanceSymbolRangeListModel::removeAt(int index)

Removes a distanceSymbolRange at the specified index.

void DistanceSymbolRangeListModel::removeOne(DistanceSymbolRange *distanceSymbolRange)

Removes the specified distanceSymbolRange from the list model.

int DistanceSymbolRangeListModel::size() const

Returns the number or rows in the list model.

Feedback on this topic?