A container class storing a list of scale range display filters. More...
Header: | #include <ScaleRangeDisplayFilterListModel.h> |
Since: | Esri::ArcGISRuntime 100.13 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
Public Types
enum | ScaleRangeDisplayFilterRoles { ScaleRangeDisplayFilterNameRole, ScaleRangeDisplayFilterWhereClauseRole, ScaleRangeDisplayFilterIdRole, ScaleRangeDisplayFilterMinScaleRole, ScaleRangeDisplayFilterMaxScaleRole } |
Public Functions
virtual | ~ScaleRangeDisplayFilterListModel() override |
void | append(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) |
void | clear() |
bool | contains(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) const |
Esri::ArcGISRuntime::ScaleRangeDisplayFilter * | first() const |
int | indexOf(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) const |
void | insert(int index, Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) |
bool | isEmpty() const |
Esri::ArcGISRuntime::ScaleRangeDisplayFilter * | last() const |
void | move(int from, int to) |
void | removeAt(int index) |
void | removeOne(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter) |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::ScaleRangeDisplayFilter * | 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
The model returns data for the following roles:
Role | Type | Description | ScaleRangeDisplayFilterRoles |
---|---|---|---|
name | QString | The name of the scale range display filter. | ScaleRangeDisplayFilterNameRole |
whereClause | QString | SQL expression that defines which features are rendered. | ScaleRangeDisplayFilterWhereClauseRole |
filterId | QString | The identifier for the scale range display filter (read only). | ScaleRangeDisplayFilterIdRole |
minScale | double | The minimum scale at which this scale range display filter is applied. | ScaleRangeDisplayFilterMinScaleRole |
maxScale | double | The maximum scale at which this scale range display filter is applied. | ScaleRangeDisplayFilterMaxScaleRole |
See also ScaleRangeDisplayFilter.
Member Type Documentation
enum ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterRoles
This enum specifies the custom roles that can be used with ScaleRangeDisplayFilterListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterNameRole | Qt::UserRole + 1 | The name of the scale range display filter. |
Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterWhereClauseRole | Qt::UserRole + 2 | SQL expression that defines which features are rendered. |
Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterIdRole | Qt::UserRole + 3 | The identifier for the scale range display filter (read only). |
Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterMinScaleRole | Qt::UserRole + 4 | The minimum scale at which this scale range display filter is applied. |
Esri::ArcGISRuntime::ScaleRangeDisplayFilterListModel::ScaleRangeDisplayFilterMaxScaleRole | Qt::UserRole + 5 | The maximum scale at which this scale range display filter is applied. |
Member Function Documentation
[override virtual]
ScaleRangeDisplayFilterListModel::~ScaleRangeDisplayFilterListModel ()
Destructor.
void ScaleRangeDisplayFilterListModel::append(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter )
Appends the scaleRangeDisplayFilter to the scale range display filter list model.
[override virtual]
Esri::ArcGISRuntime::ScaleRangeDisplayFilter *ScaleRangeDisplayFilterListModel::at(int index) const
Returns the scale range display filter at the specified index.
void ScaleRangeDisplayFilterListModel::clear()
Removes all scale range display filters 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 ScaleRangeDisplayFilterListModel::contains(Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter ) const
Returns true
if the provided scaleRangeDisplayFilter is in the list model.
[override virtual]
QVariant ScaleRangeDisplayFilterListModel::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 scale range display 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 ScaleRangeDisplayFilterListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::ScaleRangeDisplayFilter *ScaleRangeDisplayFilterListModel::first() const
Returns the first scale range display filter in the list model.
int ScaleRangeDisplayFilterListModel::indexOf (Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter ) const
Returns the index of the provided scaleRangeDisplayFilter in the list model.
void ScaleRangeDisplayFilterListModel::insert(int index, Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter )
Inserts a scaleRangeDisplayFilter at a specified index in the list model.
bool ScaleRangeDisplayFilterListModel::isEmpty () const
Returns true
if this list model is empty.
[signal, since Esri::ArcGISRuntime 100.15]
void ScaleRangeDisplayFilterListModel::itemAdded (int index)
Signal emitted when an item is added to the list model.
index is the index of the added item.
This function was introduced in Esri::ArcGISRuntime 100.15.
[signal, since Esri::ArcGISRuntime 100.15]
void ScaleRangeDisplayFilterListModel::itemRemoved (int index)
Signal emitted when an item is removed from the list model.
index is the index of the removed item.
This function was introduced in Esri::ArcGISRuntime 100.15.
Esri::ArcGISRuntime::ScaleRangeDisplayFilter *ScaleRangeDisplayFilterListModel::last() const
Returns the last scale range display filter in the list model.
void ScaleRangeDisplayFilterListModel::move(int from, int to)
Moves one scale range display filter from an index in the list model to a different index.
void ScaleRangeDisplayFilterListModel::removeAt (int index)
Removes a scale range display filter at the specified index in 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.
void ScaleRangeDisplayFilterListModel::removeOne (Esri::ArcGISRuntime::ScaleRangeDisplayFilter *scaleRangeDisplayFilter )
Removes the specified scaleRangeDisplayFilter 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 ScaleRangeDisplayFilterListModel::size() const
Returns the number of scale range display filters in the model.