UtilityTraceFunctionListModel Class
A container class storing a list of UtilityTraceFunction. More...
Header: | #include <UtilityTraceFunctionListModel> |
Since: | Esri::ArcGISRuntime 100.9 |
Inherits: | QAbstractListModel and Esri::ArcGISRuntime::Iterable |
This class was introduced in Esri::ArcGISRuntime 100.9.
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(Esri::ArcGISRuntime::Error error) |
void | utilityTraceFunctionAdded(int index) |
void | utilityTraceFunctionRemoved(int index) |
Detailed Description
The model returns data for the following roles:
Role | Type | Description | UtilityTraceFunctionRoles |
---|---|---|---|
condition | UtilityTraceCondition | The UtilityTraceCondition to use to restrict the functional calculation | UtilityTraceFunctionCondition |
functionType | UtilityTraceFunctionFunctionType | The function type that is applied to the UtilityNetworkAttribute | UtilityTraceFunctionFunctionType |
networkAttribute | UtilityNetworkAttribute* | The UtilityNetworkAttribute to propagate further along the trace | UtilityTraceFunctionNetworkAttribute |
See also UtilityTraceFunction.
Member Type Documentation
enum UtilityTraceFunctionListModel::UtilityTraceFunctionRoles
This enum specifies the custom roles that can be used with UtilityTraceFunctionListModel::data.
Constant | Value | Description |
---|---|---|
Esri::ArcGISRuntime::UtilityTraceFunctionListModel::UtilityTraceFunctionCondition | Qt::UserRole + 1 | The UtilityTraceCondition to use to restrict the functional calculation. |
Esri::ArcGISRuntime::UtilityTraceFunctionListModel::UtilityTraceFunctionFunctionType | Qt::UserRole + 2 | The function type that is applied to the UtilityNetworkAttribute. |
Esri::ArcGISRuntime::UtilityTraceFunctionListModel::UtilityTraceFunctionNetworkAttribute | Qt::UserRole + 3 | The UtilityNetworkAttribute to use with the calculation. |
Member Function Documentation
[signal]
void UtilityTraceFunctionListModel::errorOccurred(Esri::ArcGISRuntime::Error error)
Signal emitted when an error occurs.
- error - Details about the error
[signal]
void UtilityTraceFunctionListModel::utilityTraceFunctionAdded(int index)
Signal emitted when a UtilityTraceFunction is added to the list.
- index is the index of the added UtilityTraceFunction.
[signal]
void UtilityTraceFunctionListModel::utilityTraceFunctionRemoved(int index)
Signal emitted when a UtilityTraceFunction is removed from the list.
- index is the index of the removed UtilityTraceFunction.
[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.
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
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.
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.
void UtilityTraceFunctionListModel::removeOne(Esri::ArcGISRuntime::UtilityTraceFunction *utilityTraceFunction)
Removes the specified utilityTraceFunction from the list model.
[override virtual]
int UtilityTraceFunctionListModel::size() const
Returns the number of utility trace functions in the model.