A list of Geotrigger conditions. More...
Header: | #include <GeotriggerListModel.h> |
Since: | Esri::ArcGISRuntime 100.14 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
Public Types
enum | GeotriggerRoles { GeotriggerNameRole, GeotriggerIdRole, GeotriggerTypeRole, GeotriggerRequestedActionsRole } |
Public Functions
virtual | ~GeotriggerListModel() override |
void | append(Esri::ArcGISRuntime::Geotrigger *geotrigger) |
void | clear() |
bool | contains(Esri::ArcGISRuntime::Geotrigger *geotrigger) const |
Esri::ArcGISRuntime::Geotrigger * | first() const |
int | indexOf(Esri::ArcGISRuntime::Geotrigger *geotrigger) const |
void | insert(int index, Esri::ArcGISRuntime::Geotrigger *geotrigger) |
bool | isEmpty() const |
Esri::ArcGISRuntime::Geotrigger * | last() const |
void | move(int from, int to) |
void | removeAt(int index) |
void | removeOne(Esri::ArcGISRuntime::Geotrigger *geotrigger) |
Reimplemented Public Functions
virtual Esri::ArcGISRuntime::Geotrigger * | 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 | GeotriggerRoles |
---|---|---|---|
geotriggerName | string | The geotrigger's name. | GeotriggerNameRole |
geotriggerId | string | The geotrigger's ID. | GeotriggerIdRole |
geotriggerType | GeotriggerType | The type of geotrigger. | GeotriggerTypeRole |
geotriggerRequestedActions | list<string> | The list of requested actions for the geotrigger. | GeotriggerRequestedActionsRole |
Member Type Documentation
enum GeotriggerListModel::GeotriggerRoles
This enum specifies the custom roles which can be used with GeotriggerListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerNameRole | Qt::UserRole + 1 | The geotriggers's name. |
Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerIdRole | Qt::UserRole + 2 | The geotriggers's ID. |
Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerTypeRole | Qt::UserRole + 3 | The type of the geotrigger. |
Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerRequestedActionsRole | Qt::UserRole + 4 | The list of requested actions for the geotrigger. |
Member Function Documentation
[override virtual]
GeotriggerListModel::~GeotriggerListModel ()
Destructor.
void GeotriggerListModel::append(Esri::ArcGISRuntime::Geotrigger *geotrigger)
Appends a geotrigger to the geotrigger list model.
[override virtual]
Esri::ArcGISRuntime::Geotrigger *GeotriggerListModel::at(int index) const
Returns the geotrigger
at the specified index.
void GeotriggerListModel::clear()
Removes all geotriggers 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 GeotriggerListModel::contains(Esri::ArcGISRuntime::Geotrigger *geotrigger) const
Returns true
if the list model contains the specified geotrigger.
[override virtual]
QVariant GeotriggerListModel::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 geotrigger referenced by the index.
- index. The index in the model for which to return data.
- role. The role for which to return data.
Returns an empty value if the specified index is out-of-range.
[signal]
void GeotriggerListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::Geotrigger *GeotriggerListModel::first() const
Returns the first geotrigger in the list model.
int GeotriggerListModel::indexOf (Esri::ArcGISRuntime::Geotrigger *geotrigger) const
Returns the index of the geotrigger specified.
void GeotriggerListModel::insert(int index, Esri::ArcGISRuntime::Geotrigger *geotrigger)
Inserts a geotrigger at a specified index in the list model.
This method appends the geotrigger to the list if the index is greater than the current list model size.
bool GeotriggerListModel::isEmpty () const
Returns true
if the list model contains no geotriggers.
[signal, since Esri::ArcGISRuntime 100.15]
void GeotriggerListModel::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 GeotriggerListModel::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::Geotrigger *GeotriggerListModel::last() const
Returns the last geotrigger in the list model.
void GeotriggerListModel::move(int from, int to)
Moves one geotrigger from an index in the list model to a different index.
void GeotriggerListModel::removeAt (int index)
Removes a geotrigger at the specified index.
No geotriggers are removed if the specified index is out-of-range.
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 GeotriggerListModel::removeOne (Esri::ArcGISRuntime::Geotrigger *geotrigger)
Removes the specified geotrigger 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 GeotriggerListModel::size() const
Returns the number of geotriggers contained in the list model.