Skip To Content ArcGIS for Developers Sign In Dashboard

FeatureTableListModel Class

(Esri::ArcGISRuntime::FeatureTableListModel)

A list model that stores a list of feature tables. More...

Header: #include <FeatureTableListModel>
Since: Esri::ArcGISRuntime 100.1
Inherits: QAbstractListModel and Iterable<FeatureTable *>

Public Types

enum FeatureTableRoles { NameRole, GeometryTypeRole, HasGeometryRole, EditableRole, ..., LoadStatusRole }

Public Functions

~FeatureTableListModel()
void append(FeatureTable *featureTable)
FeatureTable *at(int index) const
void clear()
bool contains(FeatureTable *featureTable) const
FeatureTable *first() const
int indexOf(FeatureTable *featureTable) const
void insert(int index, FeatureTable *featureTable)
bool isEmpty() const
FeatureTable *last() const
void move(int from, int to)
void removeAt(int index)
void removeOne(FeatureTable *featureTable)
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 featureTableAdded(int index)
void featureTableRemoved(int index)

Additional Inherited Members

Detailed Description

A list model that stores a list of feature tables.

Modifying this model (adding, removing, or moving) will update the feature tables available in the Map.

The model returns data for the following roles:

RoleTypeDescriptionFeatureTableRoles
namestringThe table's name.NameRole
geometryTypeGeometryTypeThe tables's geometry type.GeometryTypeRole
hasGeometryboolWhether the table contains features with geometry.HasGeometryRole
editableboolWhether the table is editable.EditableRole
numberOfFeaturesqint64The number of features within the table.NumberOfFeaturesRole
loadErrorintThe table's load error code.LoadErrorRole
loadStatusLoadStatusThe table's load status.LoadStatusRole

Member Type Documentation

enum FeatureTableListModel::FeatureTableRoles

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

ConstantValueDescription
Esri::ArcGISRuntime::FeatureTableListModel::NameRoleQt::UserRole + 1The table's name.
Esri::ArcGISRuntime::FeatureTableListModel::GeometryTypeRoleQt::UserRole + 2The tables's geometry type.
Esri::ArcGISRuntime::FeatureTableListModel::HasGeometryRoleQt::UserRole + 3Whether the table contains features with geometry.
Esri::ArcGISRuntime::FeatureTableListModel::EditableRoleQt::UserRole + 4Whether the table is editable.
Esri::ArcGISRuntime::FeatureTableListModel::NumberOfFeaturesRoleQt::UserRole + 5The number of features within the table.
Esri::ArcGISRuntime::FeatureTableListModel::LoadErrorRoleQt::UserRole + 6The table's load error code.
Esri::ArcGISRuntime::FeatureTableListModel::LoadStatusRoleQt::UserRole + 7The table's load status.

Member Function Documentation

FeatureTableListModel::~FeatureTableListModel()

Destructor.

void FeatureTableListModel::append(FeatureTable *featureTable)

Appends a feature table (featureTable) to the feature table list model.

FeatureTable *FeatureTableListModel::at(int index) const

Returns the feature table at the specified index.

void FeatureTableListModel::clear()

Removes all feature tables from the list model.

bool FeatureTableListModel::contains(FeatureTable *featureTable) const

Returns true if the list model contains the specific feature table featureTable.

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

Reimplemented from QAbstractItemModel::data().

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

Signal emitted when an error occurs.

  • error - Details about the error.

[signal] void FeatureTableListModel::featureTableAdded(int index)

Signal emitted when a feature table is added to the list model.

  • index - The index of the added feature table.

[signal] void FeatureTableListModel::featureTableRemoved(int index)

Signal emitted when a feature table is removed from the list model.

  • index - The index of the removed feature table.

FeatureTable *FeatureTableListModel::first() const

Returns the first feature table in the list model.

int FeatureTableListModel::indexOf(FeatureTable *featureTable) const

Returns the index of the specific feature table featureTable.

void FeatureTableListModel::insert(int index, FeatureTable *featureTable)

Inserts a feature table (featureTable) 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 FeatureTableListModel::isEmpty() const

Returns true if the list model contains no feature tables.

FeatureTable *FeatureTableListModel::last() const

Returns the last feature table in the list model.

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

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

void FeatureTableListModel::removeAt(int index)

Removes a feature table at the specified index.

void FeatureTableListModel::removeOne(FeatureTable *featureTable)

Removes a specific feature table (featureTable) from the list model.

int FeatureTableListModel::size() const

Returns the number of feature tables contained in the list model.


Feedback on this topic?