A list model storing a list of geometric effects. More...
Header: | #include <GeometricEffectListModel.h> |
Since: | Esri::ArcGISRuntime 100.5 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
Public Types
enum | GeometricEffectRoles { GeometricEffectTypeRole } |
Public Functions
virtual | ~GeometricEffectListModel() override |
void | append(Esri::ArcGISRuntime::GeometricEffect *geometricEffect) |
void | clear() |
bool | contains(Esri::ArcGISRuntime::GeometricEffect *geometricEffect) const |
Esri::ArcGISRuntime::GeometricEffect * | first() const |
int | indexOf(Esri::ArcGISRuntime::GeometricEffect *geometricEffect) const |
void | insert(int index, Esri::ArcGISRuntime::GeometricEffect *geometricEffect) |
bool | isEmpty() const |
Esri::ArcGISRuntime::GeometricEffect * | last() const |
void | move(int from, int to) |
void | removeAt(int index) |
void | removeOne(Esri::ArcGISRuntime::GeometricEffect *geometricEffect) |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::GeometricEffect * | 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, moving) will update the SolidStrokeSymbolLayer.
The model returns data for the following roles:
Role | Type | Description | GeometricEffectRoles |
---|---|---|---|
geometricEffectType | Esri::ArcGISRuntime::GeometricEffectTypeRoles | The GeometricEffectType enum. | GeometricEffectTypeRole |
Member Type Documentation
enum GeometricEffectListModel::GeometricEffectRoles
This enum specifies the custom roles which can be used with GeometricEffectListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::GeometricEffectListModel::GeometricEffectTypeRole | Qt::UserRole + 1 | The geometric effect |
Member Function Documentation
[override virtual]
GeometricEffectListModel::~GeometricEffectListModel ()
Destructor.
void GeometricEffectListModel::append(Esri::ArcGISRuntime::GeometricEffect *geometricEffect )
Appends a geometricEffect to the geometric effect list model.
[override virtual]
Esri::ArcGISRuntime::GeometricEffect *GeometricEffectListModel::at(int index) const
Returns the GeometricEffect
at the specified index.
void GeometricEffectListModel::clear()
Removes all geometric effects 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 GeometricEffectListModel::contains(Esri::ArcGISRuntime::GeometricEffect *geometricEffect ) const
Returns true
if the list model contains the specified geometricEffect.
[override virtual]
QVariant GeometricEffectListModel::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 geometric effect 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 GeometricEffectListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::GeometricEffect *GeometricEffectListModel::first() const
Returns the first geometric effect in the list model.
int GeometricEffectListModel::indexOf (Esri::ArcGISRuntime::GeometricEffect *geometricEffect ) const
Returns the index of the geometricEffect specified.
void GeometricEffectListModel::insert(int index, Esri::ArcGISRuntime::GeometricEffect *geometricEffect )
Inserts a geometricEffect 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 GeometricEffectListModel::isEmpty () const
Returns true
if the list model contains no geometric effects.
[signal, since Esri::ArcGISRuntime 100.15]
void GeometricEffectListModel::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 GeometricEffectListModel::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::GeometricEffect *GeometricEffectListModel::last() const
Returns the last geometric effect in the list model.
void GeometricEffectListModel::move(int from, int to)
Moves one geometric effect from an index in the list model to a different index.
void GeometricEffectListModel::removeAt (int index)
Removes a geometric effect 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 GeometricEffectListModel::removeOne (Esri::ArcGISRuntime::GeometricEffect *geometricEffect )
Removes the specified geometricEffect 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 GeometricEffectListModel::size() const
Returns the number of geometric effects contained in the list model.