Skip To Content ArcGIS for Developers Sign In Dashboard

SubtypeSublayerListModel Class

(Esri::ArcGISRuntime::SubtypeSublayerListModel)

A list model storing a list of subtype sublayers. More...

Header: #include <SubtypeSublayerListModel>
Since: Esri::ArcGISRuntime 100.7
Inherits: QAbstractListModel and Iterable<SubtypeSublayer *>

Public Types

enum SubtypeSublayerRoles { SubtypeSublayerNameRole, SubtypeSublayerIdRole, SubtypeSublayerMinScaleRole, SubtypeSublayerMaxScaleRole, ..., SubtypeSublayerLabelsEnabledRole }

Public Functions

~SubtypeSublayerListModel()
void append(SubtypeSublayer *subtypeSublayer)
SubtypeSublayer *at(int index) const
void clear()
bool contains(SubtypeSublayer *subtypeSublayer) const
SubtypeSublayer *first() const
int indexOf(SubtypeSublayer *subtypeSublayer) const
void insert(int index, SubtypeSublayer *subtypeSublayer)
bool isEmpty() const
SubtypeSublayer *last() const
void move(int from, int to)
void removeAt(int index)
void removeOne(SubtypeSublayer *subtypeSublayer)
int size() const

Reimplemented Public Functions

virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const

Signals

void errorOccurred(Esri::ArcGISRuntime::Error error)
void subtypeSublayerAdded(int index)
void subtypeSublayerRemoved(int index)

Additional Inherited Members

Detailed Description

A list model storing a list of subtype sublayers.

Modifying this model (adding, removing, moving) results in updates to any objects that are currently referencing these subtype sublayers.

The model returns data for the following roles:

RoleTypeDescriptionSubtypeSublayerRoles
nameQStringThe subtypeSublayer's name.SublayerNameRole
sublayerVisibleboolWhether the subtypeSublayer is enabled to be visible.SublayerVisibleRole
showInLegendboolWhether the subtypeSublayer will be shown in the legend.SublayerShowInLegendRole
sublayerIdintThe subtypeSublayer's ID.SublayerIdRole
minScaledoubleThe minumum scale at which the subtypeSublayer displays.SublayerMinScaleRole
maxScaledoubleThe maximum scale at which the subtypeSublayer displays.SublayerMaxScaleRole
sublayerTypeArcGISSublayerTypeThe subtypeSublayer's type.SublayerTypeRole
canChangeVisibilityboolWhether the subtypeSublayer's visibility can be changed.SublayerCanChangeVisibilityRole
definitionExpressionQStringThe subtypeSublayer's definition expressionSublayerDefinitionExpressionRole
sublayerOpacityfloatThe subtypeSublayer's opacitySublayerOpacityRole
scaleSymbolsboolWhether the subtypeSublayer renderers its symbols based on scaleSublayerScaleSymbolsRole
labelsEnabledboolWhether the subtypeSublayer's labels are displayedSublayerLabelsEnabledRole

Member Type Documentation

enum SubtypeSublayerListModel::SubtypeSublayerRoles

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

ConstantValueDescription
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerNameRoleQt::UserRole + 1The subtypeSublayer's name.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerIdRoleQt::UserRole + 2The subtypeSublayer's ID.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerMinScaleRoleQt::UserRole + 3The minumum scale at which the subtypeSublayer displays.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerMaxScaleRoleQt::UserRole + 4The maximum scale at which the subtypeSublayer displays.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerTypeRoleQt::UserRole + 5The subtypeSublayer's type.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerCanChangeVisibilityRoleQt::UserRole + 6Whether the subtypeSublayer's visibility can be changed.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerVisibleRoleQt::UserRole + 7Whether the subtypeSublayer is enabled to be visible.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerShowInLegendRoleQt::UserRole + 8Whether the subtypeSublayer will be shown in the legend.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerDefinitionExpressionRoleQt::UserRole + 9The subtypeSublayer's definition expression.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerOpacityRoleQt::UserRole + 10The subtypeSublayer's opacity.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerScaleSymbolsRoleQt::UserRole + 11Whether the subtypeSublayer renderers its symbols based on scale.
Esri::ArcGISRuntime::SubtypeSublayerListModel::SubtypeSublayerLabelsEnabledRoleQt::UserRole + 12Whether the subtypeSublayer's labels are displayed.

Member Function Documentation

SubtypeSublayerListModel::~SubtypeSublayerListModel()

Destructor.

void SubtypeSublayerListModel::append(SubtypeSublayer *subtypeSublayer)

Appends a subtypeSublayer to the subtypeSublayer list model.

SubtypeSublayer *SubtypeSublayerListModel::at(int index) const

Returns the subtypeSublayer at the specified index.

void SubtypeSublayerListModel::clear()

Removes all sublayers from the list model.

bool SubtypeSublayerListModel::contains(SubtypeSublayer *subtypeSublayer) const

Returns true if the list model contains the specified subtypeSublayer.

[virtual] QVariant SubtypeSublayerListModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const

Reimplemented from QAbstractItemModel::data().

Returns the data stored under the given role for the subtypeSublayer 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 SubtypeSublayerListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

Signal emitted when an error occurs.

  • error - Details about the error.

SubtypeSublayer *SubtypeSublayerListModel::first() const

Returns the first subtypeSublayer in the list model.

int SubtypeSublayerListModel::indexOf(SubtypeSublayer *subtypeSublayer) const

Returns the index of the subtypeSublayer specified.

void SubtypeSublayerListModel::insert(int index, SubtypeSublayer *subtypeSublayer)

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

This method will append to the list model if the index is greater than the current size of the list.

bool SubtypeSublayerListModel::isEmpty() const

Returns true if the list model contains no sublayers.

SubtypeSublayer *SubtypeSublayerListModel::last() const

Returns the last subtypeSublayer in the list model.

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

Moves one subtypeSublayer from an index in the list model to a different index.

void SubtypeSublayerListModel::removeAt(int index)

Removes a subtypeSublayer at the specified index.

void SubtypeSublayerListModel::removeOne(SubtypeSublayer *subtypeSublayer)

Removes the specified subtypeSublayer from the list model.

int SubtypeSublayerListModel::size() const

Returns the number of sublayers contained in the list model.

[signal] void SubtypeSublayerListModel::subtypeSublayerAdded(int index)

Signal emitted when a subtypeSublayer is added to the list model.

index is the index of the added subtypeSublayer.

[signal] void SubtypeSublayerListModel::subtypeSublayerRemoved(int index)

Signal emitted when a subtypeSublayer is removed from the list model.

index is the index of the removed subtypeSublayer.


Feedback on this topic?