UtilityNetworkListModel Class

UtilityNetwork."> UtilityNetworkListModel Class | ArcGISQtCpp
  • UtilityNetworkListModel
  • class Esri::ArcGISRuntime::UtilityNetworkListModel

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

    Header: #include <UtilityNetworkListModel.h>
    Since: Esri::ArcGISRuntime 100.10
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum UtilityNetworkRoles { UtilityNetworkDefinitionRole, UtilityNetworkName }

    Public Functions

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

    Reimplemented Public Functions

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

    See also UtilityNetwork.

    Member Type Documentation

    enum UtilityNetworkListModel::UtilityNetworkRoles

    This enum specifies the custom roles that can be used with UtilityNetworkListModel::data.

    ConstantValueDescription
    Esri::ArcGISRuntime::UtilityNetworkListModel::UtilityNetworkDefinitionRoleQt::UserRole + 1The UtilityNetworkDefinition of the UtilityNetwork.
    Esri::ArcGISRuntime::UtilityNetworkListModel::UtilityNetworkNameQt::UserRole + 2The name of the UtilityNetwork.

    Member Function Documentation

    [override virtual] UtilityNetworkListModel::~UtilityNetworkListModel()

    Destructor.

    void UtilityNetworkListModel::append(Esri::ArcGISRuntime::UtilityNetwork *utilityNetwork)

    Appends the utilityNetwork to the utility trace function list model.

    [override virtual] Esri::ArcGISRuntime::UtilityNetwork *UtilityNetworkListModel::at(int index) const

    Returns the utility trace function at the specified index.

    void UtilityNetworkListModel::clear()

    Removes all utility networks 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 UtilityNetworkListModel::contains(Esri::ArcGISRuntime::UtilityNetwork *utilityNetwork) const

    Returns whether the provided utilityNetwork is in the list model.

    [override virtual] QVariant UtilityNetworkListModel::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 trace function 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 UtilityNetworkListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error

    Esri::ArcGISRuntime::UtilityNetwork *UtilityNetworkListModel::first() const

    Returns the first utility trace function in the list model.

    int UtilityNetworkListModel::indexOf(Esri::ArcGISRuntime::UtilityNetwork *utilityNetwork) const

    Returns the index of the provided utilityNetwork in the list model.

    void UtilityNetworkListModel::insert(int index, Esri::ArcGISRuntime::UtilityNetwork *utilityNetwork)

    Inserts a utilityNetwork at a specified index in the list model.

    bool UtilityNetworkListModel::isEmpty() const

    Returns true if this list model is empty.

    [signal, since Esri::ArcGISRuntime 100.15] void UtilityNetworkListModel::itemAdded(int index)

    Signal emitted when an item is added to the list.

    • index is the index of the added item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [signal, since Esri::ArcGISRuntime 100.15] void UtilityNetworkListModel::itemRemoved(int index)

    Signal emitted when an item is removed from the list.

    • index is the index of the removed item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    Esri::ArcGISRuntime::UtilityNetwork *UtilityNetworkListModel::last() const

    Returns the last utility trace function in the list model.

    void UtilityNetworkListModel::move(int from, int to)

    Moves one utility trace function from an index in the list model to a different index.

    void UtilityNetworkListModel::removeAt(int index)

    Removes a utility trace function 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 UtilityNetworkListModel::removeOne(Esri::ArcGISRuntime::UtilityNetwork *utilityNetwork)

    Removes the specified utilityNetwork 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 UtilityNetworkListModel::size() const

    Returns the number of utility networks 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.