Skip To Content ArcGIS for Developers Sign In Dashboard

KmlGeometryListModel Class

(Esri::ArcGISRuntime::KmlGeometryListModel)

A list model storing a list of type KmlGeometry. More...

Header: #include <KmlGeometryListModel>
Since: Esri::ArcGISRuntime 100.6
Inherits: QAbstractListModel and Iterable<KmlGeometry>

Public Types

enum KmlGeometryRoles { KmlGeometryGeometryRole, KmlGeometryTessellatedRole, KmlGeometryExtrudedRole, KmlGeometryKmlAltitudeModeRole, KmlGeometryKmlGeometryTypeRole, KmlGeometryGeometryJsonRole }

Public Functions

~KmlGeometryListModel()
void append(const KmlGeometry &geometry)
KmlGeometry at(int index) const
void clear()
bool contains(const KmlGeometry &geometry) const
KmlGeometry first() const
int indexOf(const KmlGeometry &geometry) const
void insert(int index, const KmlGeometry &geometry)
bool isEmpty() const
KmlGeometry last() const
void move(int from, int to)
void removeAt(int index)
void removeOne(const KmlGeometry &geometry)
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 kmlGeometryAdded(int index)
void kmlGeometryRemoved(int index)

Additional Inherited Members

Detailed Description

A list model storing a list of type KmlGeometry.

The model returns data for the following roles:

RoleTypeDescriptionKmlGeometryRoles
geometryGeometryThe KmlGeometry's geometry.KmlGeometryGeometryRole
tessellatedboolThe KmlGeometry's tessellated flag.KmlGeometryTessellatedRole
extrudedboolThe KmlGeometry's extruded flag.KmlGeometryExtrudedRole
altitudeModeKmlAltitudeModeThe KmlGeometry's altitude mode.KmlGeometryKmlAltitudeModeRole
kmlGeometryTypeKmlGeometryTypeThe KmlGeometry's geometry type.KmlGeometryKmlGeometryTypeRole
geometryJsonQStringJSON representation of the KmlGeometry's geometry.KmlGeometryGeometryJsonRole

Member Type Documentation

enum KmlGeometryListModel::KmlGeometryRoles

This enum specifies the custom roles that can be used with KmlGeometryListModel::data.

ConstantValueDescription
Esri::ArcGISRuntime::KmlGeometryListModel::KmlGeometryGeometryRoleQt::UserRole + 1The KmlGeometry's geometry.
Esri::ArcGISRuntime::KmlGeometryListModel::KmlGeometryTessellatedRole?Flag indicating if the KmlGeometry is tessellated.
Esri::ArcGISRuntime::KmlGeometryListModel::KmlGeometryExtrudedRole?Flag indicating if the KmlGeometry is extruded.
Esri::ArcGISRuntime::KmlGeometryListModel::KmlGeometryKmlAltitudeModeRole?Enum indicating altitude mode of the KmlGeometry.
Esri::ArcGISRuntime::KmlGeometryListModel::KmlGeometryKmlGeometryTypeRole?Enum indicating geometry type of the KmlGeometry.
Esri::ArcGISRuntime::KmlGeometryListModel::KmlGeometryGeometryJsonRole?Enum indicating geometry json of the KmlGeometry's geometry.

Member Function Documentation

KmlGeometryListModel::~KmlGeometryListModel()

Destructor.

void KmlGeometryListModel::append(const KmlGeometry &geometry)

Appends the KmlGeometry geometry to the list model.

KmlGeometry KmlGeometryListModel::at(int index) const

Returns the KmlGeometry at the specified index.

void KmlGeometryListModel::clear()

Removes all KmlGeometry elements from the list model.

bool KmlGeometryListModel::contains(const KmlGeometry &geometry) const

Returns true if the list model contains the KmlGeometry geometry.

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

Reimplemented from QAbstractItemModel::data().

Returns the data stored under the given role for the KmlGeometry referred to by the index.

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

An empty value is returned if the specified index is out of range.

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

Signal emitted when an error occurs.

  • error - Details about the error.

KmlGeometry KmlGeometryListModel::first() const

Returns the first KmlGeometry in the list model.

int KmlGeometryListModel::indexOf(const KmlGeometry &geometry) const

Returns the index of the KmlGeometry geometry in the list model.

Returns -1 if geometry is not in the list model.

void KmlGeometryListModel::insert(int index, const KmlGeometry &geometry)

Inserts the KmlGeometry geometry into the list model at a specified index.

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

bool KmlGeometryListModel::isEmpty() const

Returns true if the list model contains no KmlGeometry elements.

[signal] void KmlGeometryListModel::kmlGeometryAdded(int index)

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

[signal] void KmlGeometryListModel::kmlGeometryRemoved(int index)

Signal emitted when an KmlGeometry is removed from the list model.

KmlGeometry KmlGeometryListModel::last() const

Returns the last KmlGeometry in the list model.

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

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

Both indexes from and to must be at least 0 and less than size.

void KmlGeometryListModel::removeAt(int index)

Removes a KmlGeometry at the specified index.

No KmlGeometry will be removed if the specified index is out of range.

void KmlGeometryListModel::removeOne(const KmlGeometry &geometry)

Removes the KmlGeometry geometry from the list model.

int KmlGeometryListModel::size() const

Returns the number of KmlGeometry elements contained in the list model.


Feedback on this topic?