A container class storing a list of UtilityAssociation. More...
| Header | #include <Utility |
| Since | Esri |
| Inherits | QAbstract |
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
The model supports the default display role. For each item, the display role returns the association's global ID as a string without braces.
See also UtilityAssociation.
Member Function Documentation
[override virtual noexcept] UtilityAssociationListModel::~UtilityAssociationListModel ()
Destructor.
void UtilityAssociationListModel::append(Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation )
Appends the utilityAssociation to the utility association list model.
[override virtual] Esri::ArcGISRuntime::UtilityAssociation *UtilityAssociationListModel::at(int index) const
Returns the utility association at the specified index.
void UtilityAssociationListModel::clear()
Removes all utility associations 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 UtilityAssociationListModel::contains(Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation ) const
Returns whether the provided utilityAssociation is in the list model.
[override virtual] QVariant UtilityAssociationListModel::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 utility association 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 UtilityAssociationListModel::errorOccurred (const Esri::ArcGISRuntime::Error &error)
Signal emitted when an error occurs.
- error - Details about the error.
Esri::ArcGISRuntime::UtilityAssociation *UtilityAssociationListModel::first() const
Returns the first utility association in the list model.
int UtilityAssociationListModel::indexOf (Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation ) const
Returns the index of the provided utilityAssociation in the list model.
void UtilityAssociationListModel::insert(int index, Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation )
Inserts a utilityAssociation at a specified index in the list model.
bool UtilityAssociationListModel::isEmpty () const
Returns true if this list model is empty.
[signal] void UtilityAssociationListModel::itemAdded (int index)
Signal emitted when an item is added to the list.
- index is the index of the added item.
[signal] void UtilityAssociationListModel::itemRemoved (int index)
Signal emitted when an item is removed from the list.
- index is the index of the removed item.
Esri::ArcGISRuntime::UtilityAssociation *UtilityAssociationListModel::last() const
Returns the last utility association in the list model.
void UtilityAssociationListModel::move(int from, int to)
Moves one utility association from an index in the list model to a different index.
void UtilityAssociationListModel::removeAt (int index)
Removes a utility association 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 UtilityAssociationListModel::removeOne (Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation )
Removes the specified utilityAssociation 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 UtilityAssociationListModel::size() const
Returns the number of utility associations in the model.