FeatureTableListModel Class
A list model that stores a list of feature tables. More...
Header: | #include <FeatureTableListModel> |
Since: | Esri::ArcGISRuntime 100.1 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
This class was introduced in Esri::ArcGISRuntime 100.1.
Public Types
enum | FeatureTableRoles { NameRole, GeometryTypeRole, HasGeometryRole, EditableRole, NumberOfFeaturesRole, …, LoadStatusRole } |
Public Functions
virtual | ~FeatureTableListModel() override |
void | append(Esri::ArcGISRuntime::FeatureTable *featureTable) |
void | clear() |
bool | contains(Esri::ArcGISRuntime::FeatureTable *featureTable) const |
Esri::ArcGISRuntime::FeatureTable * | first() const |
int | indexOf(Esri::ArcGISRuntime::FeatureTable *featureTable) const |
void | insert(int index, Esri::ArcGISRuntime::FeatureTable *featureTable) |
bool | isEmpty() const |
Esri::ArcGISRuntime::FeatureTable * | last() const |
void | move(int from, int to) |
void | removeAt(int index) |
void | removeOne(Esri::ArcGISRuntime::FeatureTable *featureTable) |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::FeatureTable * | at(int index) const override |
virtual QVariant | data(const QModelIndex &index, int role = Qt::DisplayRole) const override |
virtual int | size() const override |
Signals
void | errorOccurred(Esri::ArcGISRuntime::Error error) |
void | featureTableAdded(int index) |
void | featureTableRemoved(int index) |
Detailed Description
Modifying this model (adding, removing, or moving) will update the feature tables available in the Map.
The model returns data for the following roles:
Role | Type | Description | FeatureTableRoles |
---|---|---|---|
name | string | The table's name. | NameRole |
geometryType | GeometryType | The tables's geometry type. | GeometryTypeRole |
hasGeometry | bool | Whether the table contains features with geometry. | HasGeometryRole |
editable | bool | Whether the table is editable. | EditableRole |
numberOfFeatures | qint64 | The number of features within the table. | NumberOfFeaturesRole |
loadError | int | The table's load error code. | LoadErrorRole |
loadStatus | LoadStatus | The table's load status. | LoadStatusRole |
Member Type Documentation
enum FeatureTableListModel::FeatureTableRoles
This enum specifies the custom roles which can be used with FeatureTableListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::FeatureTableListModel::NameRole | Qt::UserRole + 1 | The table's name. |
Esri::ArcGISRuntime::FeatureTableListModel::GeometryTypeRole | Qt::UserRole + 2 | The tables's geometry type. |
Esri::ArcGISRuntime::FeatureTableListModel::HasGeometryRole | Qt::UserRole + 3 | Whether the table contains features with geometry. |
Esri::ArcGISRuntime::FeatureTableListModel::EditableRole | Qt::UserRole + 4 | Whether the table is editable. |
Esri::ArcGISRuntime::FeatureTableListModel::NumberOfFeaturesRole | Qt::UserRole + 5 | The number of features within the table. |
Esri::ArcGISRuntime::FeatureTableListModel::LoadErrorRole | Qt::UserRole + 6 | The table's load error code. |
Esri::ArcGISRuntime::FeatureTableListModel::LoadStatusRole | Qt::UserRole + 7 | The table's load status. |
Member Function Documentation
[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.
[override virtual]
FeatureTableListModel::~FeatureTableListModel()
Destructor.
void FeatureTableListModel::append(Esri::ArcGISRuntime::FeatureTable *featureTable)
Appends a feature table (featureTable) to the feature table list model.
[override virtual]
Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::FeatureTable *featureTable) const
Returns true
if the list model contains the specific feature table featureTable.
[override virtual]
QVariant FeatureTableListModel::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 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.
Esri::ArcGISRuntime::FeatureTable *FeatureTableListModel::first() const
Returns the first feature table in the list model.
int FeatureTableListModel::indexOf(Esri::ArcGISRuntime::FeatureTable *featureTable) const
Returns the index of the specific feature table featureTable.
void FeatureTableListModel::insert(int index, Esri::ArcGISRuntime::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.
Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::FeatureTable *featureTable)
Removes a specific feature table (featureTable) from the list model.
[override virtual]
int FeatureTableListModel::size() const
Returns the number of feature tables contained in the list model.