Skip To Content ArcGIS for Developers Sign In Dashboard

VectorMarkerSymbolElementListModel Class

(Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel)

A list model storing a list of vector marker symbol elements. More...

Header: #include <VectorMarkerSymbolElementListModel>
Since: Esri::ArcGISRuntime 100.5
Inherits: QAbstractListModel and Iterable<VectorMarkerSymbolElement *>

Public Types

enum VectorMarkerSymbolElementRoles { GeometryRole, SymbolRole, GeometryJsonRole }

Public Functions

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

Reimplemented Public Functions

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

Signals

void errorOccurred(Esri::ArcGISRuntime::Error error)
void vectorMarkerSymbolElementAdded(int index)
void vectorMarkerSymbolElementRemoved(int index)

Additional Inherited Members

Detailed Description

A list model storing a list of vector marker symbol elements.

Modifying this model (adding, removing, moving) will update the VectorMarkerSymbolLayer.

The model returns data for the following roles:

RoleTypeDescriptionVectorMarkerSymbolElementRoles
geometryEsri::ArcGISRuntime::GeometryThe geometry.GeometryRole
symbolEsri::ArcGISRuntime::SymbolThe symbol.SymbolRole
geometryJsonQStringJSON geometry representation (as a string). Can be passed instead of a Geometry object and a geometry will be serialized from JSON.GeometryJsonRole

See also Geometry::toJson.

Member Type Documentation

enum VectorMarkerSymbolElementListModel::VectorMarkerSymbolElementRoles

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

ConstantValueDescription
Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel::GeometryRoleQt::UserRole + 1The geometry of the VectorMarkerSymbolElement.
Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel::SymbolRoleQt::UserRole + 2The symbol of the VectorMarkerSymbolElement.
Esri::ArcGISRuntime::VectorMarkerSymbolElementListModel::GeometryJsonRoleQt::UserRole + 3The geometry json of the VectorMarkerSymbolElement's geometry.

Member Function Documentation

VectorMarkerSymbolElementListModel::~VectorMarkerSymbolElementListModel()

Destructor.

void VectorMarkerSymbolElementListModel::append(VectorMarkerSymbolElement *vectorMarkerSymbolElement)

Appends a vectorMarkerSymbolElement to the VectorMarkerSymbolElementListModel.

VectorMarkerSymbolElement *VectorMarkerSymbolElementListModel::at(int index) const

Returns the VectorMarkerSymbolElement at the specified index.

void VectorMarkerSymbolElementListModel::clear()

Removes all vector marker symbol elements from the list model.

bool VectorMarkerSymbolElementListModel::contains(VectorMarkerSymbolElement *vectorMarkerSymbolElement) const

Returns true if the list model contains the specified vectorMarkerSymbolElement.

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

Reimplemented from QAbstractItemModel::data().

Returns the data stored under the given role for the symbol 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 VectorMarkerSymbolElementListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

Signal emitted when an error occurs.

  • error - Details about the error.

VectorMarkerSymbolElement *VectorMarkerSymbolElementListModel::first() const

Returns the first vector marker symbol element in the list model.

int VectorMarkerSymbolElementListModel::indexOf(VectorMarkerSymbolElement *vectorMarkerSymbolElement) const

Returns the index of the vectorMarkerSymbolElement specified.

void VectorMarkerSymbolElementListModel::insert(int index, VectorMarkerSymbolElement *vectorMarkerSymbolElement)

Inserts a vectorMarkerSymbolElement 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 VectorMarkerSymbolElementListModel::isEmpty() const

Returns true if the list model contains no vector marker symbol elements.

VectorMarkerSymbolElement *VectorMarkerSymbolElementListModel::last() const

Returns the last vector marker symbol element in the list model.

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

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

void VectorMarkerSymbolElementListModel::removeAt(int index)

Removes a symbol at the specified index.

void VectorMarkerSymbolElementListModel::removeOne(VectorMarkerSymbolElement *vectorMarkerSymbolElement)

Removes the specified vectorMarkerSymbolElement from the list model.

int VectorMarkerSymbolElementListModel::size() const

Returns the number of vector marker symbol elements contained in the list model.

[signal] void VectorMarkerSymbolElementListModel::vectorMarkerSymbolElementAdded(int index)

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

index is the index of the added VectorMarkerSymbolElement.

[signal] void VectorMarkerSymbolElementListModel::vectorMarkerSymbolElementRemoved(int index)

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

index is the index of the removed VectorMarkerSymbolElement.


Feedback on this topic?