;

UtilityNetworkListModel Class

  • UtilityNetworkListModel
  • class Esri::ArcGISRuntime::UtilityNetworkListModel

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

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

    This class was introduced in Esri::ArcGISRuntime 100.10.

    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(Esri::ArcGISRuntime::Error error)
    void utilityNetworkAdded(int index)
    void utilityNetworkRemoved(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

    [signal] void UtilityNetworkListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

    Signal emitted when an error occurs.

    • error - Details about the error

    [signal] void UtilityNetworkListModel::utilityNetworkAdded(int index)

    Signal emitted when a UtilityNetwork is added to the list.

    [signal] void UtilityNetworkListModel::utilityNetworkRemoved(int index)

    Signal emitted when a UtilityNetwork is removed from the list.

    [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.

    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

    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.

    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.

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

    Removes the specified utilityNetwork from the list model.

    [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.