A list model that stores a list of building filters. More...
| Header | #include <Building |
| Since | Esri |
| Inherits | QAbstract |
Public Types
| enum | Building |
Public Functions
| virtual | ~ |
| void | append( |
| void | clear() |
| bool | contains( |
| Esri | first() const |
| int | index |
| void | insert(int index, Esri |
| bool | is |
| Esri | last() const |
| void | move(int from, int to) |
| void | remove |
| void | remove |
Reimplemented Public Functions
| virtual Esri | at(int index) const override |
| virtual QVariant | data(const QModel |
| virtual int | size() const override |
Signals
| void | error |
| void | item |
| void | item |
Detailed Description
Modifying this model (adding, removing, or moving) will update the filters in a BuildingSceneLayer.
The model returns data for the following roles:
| Role | Type | Description | BuildingFilterRoles |
|---|---|---|---|
| description | QString | The building filter's description. | Building |
| filter | Building | The building filter's filter blocks. | Building |
| filter | QString | The building filter's filter I | Building |
| name | QString | The building filter's name. | Building |
Member Type Documentation
enum BuildingFilterListModel::BuildingFilterRoles
This enum specifies the custom roles which can be used with BuildingFilterListModel::data.
| Constant | Value | Description |
|---|---|---|
Esri | Qt | The building filter's description. |
Esri | Qt | The building filter's filter blocks. |
Esri | Qt | The building filter's filter I |
Esri | Qt | The building filter's name. |
Member Function Documentation
[override virtual noexcept] BuildingFilterListModel::~BuildingFilterListModel ()
Destructor.
void BuildingFilterListModel::append(Esri::ArcGISRuntime::BuildingFilter *buildingFilter )
Appends a buildingFilter to the list model.
[override virtual] Esri::ArcGISRuntime::BuildingFilter *BuildingFilterListModel::at(int index) const
Returns the building filter at the specified index.
void BuildingFilterListModel::clear()
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 BuildingFilterListModel::contains(Esri::ArcGISRuntime::BuildingFilter *buildingFilter ) const
Returns whether this list model contains the specified buildingFilter.
[override virtual] QVariant BuildingFilterListModel::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 building filter 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 BuildingFilterListModel::errorOccurred (Esri::ArcGISRuntime::Error error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::BuildingFilter *BuildingFilterListModel::first() const
Returns the first building filter in the list model.
int BuildingFilterListModel::indexOf (Esri::ArcGISRuntime::BuildingFilter *buildingFilter ) const
Returns the index of the specified buildingFilter.
void BuildingFilterListModel::insert(int index, Esri::ArcGISRuntime::BuildingFilter *buildingFilter )
Inserts a buildingFilter at the 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 BuildingFilterListModel::isEmpty () const
Returns true if the list model contains no building filters.
[signal] void BuildingFilterListModel::itemAdded (int index)
Signal emitted when a building filter is added to the list model.
- index - The index of the added building filter.
[signal] void BuildingFilterListModel::itemRemoved (int index)
Signal emitted when a building filter is removed from the list model.
- index - The index of the removed building filter.
Esri::ArcGISRuntime::BuildingFilter *BuildingFilterListModel::last() const
Returns the last building filter in the list model.
void BuildingFilterListModel::move(int from, int to)
Moves one building filter from an index in the list model to a different index.
void BuildingFilterListModel::removeAt (int index)
Removes a building filter 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 BuildingFilterListModel::removeOne (Esri::ArcGISRuntime::BuildingFilter *buildingFilter )
Removes a specific building filter (buildingFilter) 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 BuildingFilterListModel::size() const
Returns the number of building filters in the list model.