Skip To Content ArcGIS for Developers Sign In Dashboard

UtilityAssetTypeListModel Class

class Esri::ArcGISRuntime::UtilityAssetTypeListModel

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

Header: #include <UtilityAssetTypeListModel>
Since: Esri::ArcGISRuntime 100.9
Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

This class was introduced in Esri::ArcGISRuntime 100.9.

Public Types

enum UtilityAssetTypeRoles { UtilityAssetTypeAssociationRole, UtilityAssetTypeCode, UtilityAssetTypeContainerViewScale, UtilityAssetTypeName }

Public Functions

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

Reimplemented Public Functions

virtual Esri::ArcGISRuntime::UtilityAssetType *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 utilityAssetTypeAdded(int index)
void utilityAssetTypeRemoved(int index)

Detailed Description

The model returns data for the following roles:

RoleTypeDescriptionUtilityAssetTypeRoles
associationRoleUtilityAssociationRoleThe associationRole of the UtilityAssetType.UtilityAssetTypeAssociationRole
codeintThe attribute domain value code of the UtilityAssetType.UtilityAssetTypeCode
containerViewScaledoubleThe container view scale of the UtilityAssetTypeUtilityAssetTypeContainerViewScale
nameQStringThe name of the UtilityAssetType.UtilityAssetTypeName

See also UtilityAssetType.

Member Type Documentation

enum UtilityAssetTypeListModel::UtilityAssetTypeRoles

This enum specifies the custom roles which can be used with UtilityAssetTypeListModel::data.

ConstantValueDescription
Esri::ArcGISRuntime::UtilityAssetTypeListModel::UtilityAssetTypeAssociationRoleQt::UserRole + 1The associationRole of the UtilityAssetType.
Esri::ArcGISRuntime::UtilityAssetTypeListModel::UtilityAssetTypeCodeQt::UserRole + 2The attribute domain value code of the UtilityAssetType.
Esri::ArcGISRuntime::UtilityAssetTypeListModel::UtilityAssetTypeContainerViewScaleQt::UserRole + 3The container view scale of the UtilityAssetType
Esri::ArcGISRuntime::UtilityAssetTypeListModel::UtilityAssetTypeNameQt::UserRole + 4The name of the UtilityAssetType.

Member Function Documentation

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

Signal emitted when an error occurs.

  • error - Details about the error.

[signal] void UtilityAssetTypeListModel::utilityAssetTypeAdded(int index)

Signal emitted when a UtilityAssetType is added to the list.

index is the index of the added UtilityAssetType.

[signal] void UtilityAssetTypeListModel::utilityAssetTypeRemoved(int index)

Signal emitted when a UtilityAssetType is removed from the list.

index is the index of the removed UtilityAssetType.

[override virtual] UtilityAssetTypeListModel::~UtilityAssetTypeListModel()

Destructor.

void UtilityAssetTypeListModel::append(Esri::ArcGISRuntime::UtilityAssetType *utilityAssetType)

Appends the utilityAssetType to the utility asset types list model.

[override virtual] Esri::ArcGISRuntime::UtilityAssetType *UtilityAssetTypeListModel::at(int index) const

Returns the utility asset type at the specified index.

void UtilityAssetTypeListModel::clear()

Removes all utility asset types from the list model.

bool UtilityAssetTypeListModel::contains(Esri::ArcGISRuntime::UtilityAssetType *utilityAssetType) const

Returns whether the provided utilityAssetType is in the list model.

[override virtual] QVariant UtilityAssetTypeListModel::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 asset type 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::UtilityAssetType *UtilityAssetTypeListModel::first() const

Returns the first utility asset type in the list model.

int UtilityAssetTypeListModel::indexOf(Esri::ArcGISRuntime::UtilityAssetType *utilityAssetType) const

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

void UtilityAssetTypeListModel::insert(int index, Esri::ArcGISRuntime::UtilityAssetType *utilityAssetType)

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

bool UtilityAssetTypeListModel::isEmpty() const

Returns true if this list model is empty.

Esri::ArcGISRuntime::UtilityAssetType *UtilityAssetTypeListModel::last() const

Returns the last utility asset type in the list model.

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

Moves one utility asset type from an index in the list model to a different index.

void UtilityAssetTypeListModel::removeAt(int index)

Removes a utility asset type at the specified index in the list model.

void UtilityAssetTypeListModel::removeOne(Esri::ArcGISRuntime::UtilityAssetType *utilityAssetType)

Removes the specified utilityAssetType from the list model.

[override virtual] int UtilityAssetTypeListModel::size() const

Returns the number of utility asset types in the model.


Feedback on this topic?