UtilityTraceFunctionListModel Class

  • UtilityTraceFunctionListModel
  • class Esri::ArcGISRuntime::UtilityTraceFunctionListModel

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

    Header: #include <UtilityTraceFunctionListModel.h>
    Since: Esri::ArcGISRuntime 100.9
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum UtilityTraceFunctionRoles { UtilityTraceFunctionCondition, UtilityTraceFunctionFunctionType, UtilityTraceFunctionNetworkAttribute }

    Public Functions

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

    Reimplemented Public Functions

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

    RoleTypeDescriptionUtilityTraceFunctionRoles
    conditionUtilityTraceConditionThe UtilityTraceCondition to use to restrict the functional calculationUtilityTraceFunctionCondition
    functionTypeUtilityTraceFunctionFunctionTypeThe function type that is applied to the UtilityNetworkAttributeUtilityTraceFunctionFunctionType
    networkAttributeUtilityNetworkAttribute*The UtilityNetworkAttribute to propagate further along the traceUtilityTraceFunctionNetworkAttribute

    See also UtilityTraceFunction.

    Member Type Documentation

    enum UtilityTraceFunctionListModel::UtilityTraceFunctionRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::UtilityTraceFunctionListModel::UtilityTraceFunctionConditionQt::UserRole + 1The UtilityTraceCondition to use to restrict the functional calculation.
    Esri::ArcGISRuntime::UtilityTraceFunctionListModel::UtilityTraceFunctionFunctionTypeQt::UserRole + 2The function type that is applied to the UtilityNetworkAttribute.
    Esri::ArcGISRuntime::UtilityTraceFunctionListModel::UtilityTraceFunctionNetworkAttributeQt::UserRole + 3The UtilityNetworkAttribute to use with the calculation.

    Member Function Documentation

    [override virtual] UtilityTraceFunctionListModel::~UtilityTraceFunctionListModel()

    Destructor.

    void UtilityTraceFunctionListModel::append(Esri::ArcGISRuntime::UtilityTraceFunction *utilityTraceFunction)

    Appends the utilityTraceFunction to the utility trace function list model.

    [override virtual] Esri::ArcGISRuntime::UtilityTraceFunction *UtilityTraceFunctionListModel::at(int index) const

    Returns the utility trace function at the specified index.

    void UtilityTraceFunctionListModel::clear()

    Removes all utility trace functions 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 UtilityTraceFunctionListModel::contains(Esri::ArcGISRuntime::UtilityTraceFunction *utilityTraceFunction) const

    Returns whether the provided utilityTraceFunction is in the list model.

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

    Signal emitted when an error occurs.

    • error - Details about the error

    Esri::ArcGISRuntime::UtilityTraceFunction *UtilityTraceFunctionListModel::first() const

    Returns the first utility trace function in the list model.

    int UtilityTraceFunctionListModel::indexOf(Esri::ArcGISRuntime::UtilityTraceFunction *utilityTraceFunction) const

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

    void UtilityTraceFunctionListModel::insert(int index, Esri::ArcGISRuntime::UtilityTraceFunction *utilityTraceFunction)

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

    bool UtilityTraceFunctionListModel::isEmpty() const

    Returns true if this list model is empty.

    [signal, since Esri::ArcGISRuntime 100.15] void UtilityTraceFunctionListModel::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 UtilityTraceFunctionListModel::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::UtilityTraceFunction *UtilityTraceFunctionListModel::last() const

    Returns the last utility trace function in the list model.

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

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

    void UtilityTraceFunctionListModel::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 UtilityTraceFunctionListModel::removeOne(Esri::ArcGISRuntime::UtilityTraceFunction *utilityTraceFunction)

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

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