A list model that stores a list of feature collection tables in a feature collection. More...
Header: | #include <FeatureCollectionTableListModel.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
Public Types
enum | FeatureCollectionTableRoles { FeatureCollectionTableDisplayNameRole } |
Public Functions
virtual | ~FeatureCollectionTableListModel() override |
void | append(Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable) |
void | clear() |
bool | contains(Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable) const |
Esri::ArcGISRuntime::FeatureCollectionTable * | first() const |
int | indexOf(Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable) const |
void | insert(int index, Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable) |
bool | isEmpty() const |
Esri::ArcGISRuntime::FeatureCollectionTable * | last() const |
void | move(int from, int to) |
void | removeAt(int index) |
void | removeOne(Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable) |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::FeatureCollectionTable * | 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(const Esri::ArcGISRuntime::Error &error) |
void | itemAdded(int index) |
void | itemRemoved(int index) |
Detailed Description
Modifying this model (adding, removing, or moving) will update the feature collection tables available in the FeatureCollection.
The model returns data for the following roles:
Role | Type | Description | SublayerRoles |
---|---|---|---|
displayName | QString | The feature collection table's display name. | FeatureCollectionTableDisplayNameRole |
Member Type Documentation
enum FeatureCollectionTableListModel::FeatureCollectionTableRoles
This enum specifies the custom roles which can be used with FeatureCollectionTableListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::FeatureCollectionTableListModel::FeatureCollectionTableDisplayNameRole | Qt::UserRole + 2 | The feature collection table's display name. |
Member Function Documentation
[override virtual]
FeatureCollectionTableListModel::~FeatureCollectionTableListModel ()
Destructor.
void FeatureCollectionTableListModel::append(Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable )
Appends a feature collection table (featureCollectionTable) to the feature collection table list model.
[override virtual]
Esri::ArcGISRuntime::FeatureCollectionTable *FeatureCollectionTableListModel::at(int index) const
Returns the feature collection table at the specified index.
void FeatureCollectionTableListModel::clear()
Removes all feature collection tables from the list model.
List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.
bool FeatureCollectionTableListModel::contains(Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable ) const
Returns true
if the list model contains the specific feature collection table featureCollectionTable.
[override virtual]
QVariant FeatureCollectionTableListModel::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 collection 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 FeatureCollectionTableListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::FeatureCollectionTable *FeatureCollectionTableListModel::first() const
Returns the first feature collection table in the list model.
int FeatureCollectionTableListModel::indexOf (Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable ) const
Returns the index of the specific feature collection table featureCollectionTable.
void FeatureCollectionTableListModel::insert(int index, Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable )
Inserts a feature collection table (featureCollectionTable) 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 FeatureCollectionTableListModel::isEmpty () const
Returns true
if the list model contains no feature collection tables.
[signal, since Esri::ArcGISRuntime 100.15]
void FeatureCollectionTableListModel::itemAdded (int index)
Signal emitted when an item is added to the list model.
- index - The index of the added item.
This function was introduced in Esri::ArcGISRuntime 100.15.
[signal, since Esri::ArcGISRuntime 100.15]
void FeatureCollectionTableListModel::itemRemoved (int index)
Signal emitted when an item is removed from the list model.
- index - The index of the removed item.
This function was introduced in Esri::ArcGISRuntime 100.15.
Esri::ArcGISRuntime::FeatureCollectionTable *FeatureCollectionTableListModel::last() const
Returns the last feature collection table in the list model.
void FeatureCollectionTableListModel::move(int from, int to)
Moves one feature collection table from an index in the list model to a different index.
void FeatureCollectionTableListModel::removeAt (int index)
Removes a feature collection table at the specified index.
List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.
void FeatureCollectionTableListModel::removeOne (Esri::ArcGISRuntime::FeatureCollectionTable *featureCollectionTable )
Removes a specific feature collection table (featureCollectionTable) from the list model.
List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.
[override virtual]
int FeatureCollectionTableListModel::size() const
Returns the number of feature collection tables contained in the list model.