Skip to content
  • UtilityAssociationListModel
  • class Esri::ArcGISRuntime::UtilityAssociationListModel

    A container class storing a list of UtilityAssociation. More...

    Header: #include <UtilityAssociationListModel.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Functions

    virtual ~UtilityAssociationListModel() override
    void append(Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation)
    void clear()
    bool contains(Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation) const
    Esri::ArcGISRuntime::UtilityAssociation *first() const
    int indexOf(Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation) const
    void insert(int index, Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation)
    bool isEmpty() const
    Esri::ArcGISRuntime::UtilityAssociation *last() const
    void move(int from, int to)
    void removeAt(int index)
    void removeOne(Esri::ArcGISRuntime::UtilityAssociation *utilityAssociation)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::UtilityAssociation *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 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.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.