Skip to content
  • BuildingSublayerListModel
  • class Esri::ArcGISRuntime::BuildingSublayerListModel

    A immutable, minimal list model storing a list of BuildingSublayer. More...

    Header: #include <BuildingSublayerListModel.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum BuildingSublayerRoles { BuildingSublayerNameRole, BuildingSublayerModelNameRole, BuildingSublayerTypeRole, BuildingSublayerDisciplineRole, BuildingSublayerOpacityRole, …, BuildingSublayerShowInLegendRole }

    Public Functions

    virtual ~BuildingSublayerListModel() override
    QList<Esri::ArcGISRuntime::BuildingSublayer *> sublayers() const

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::BuildingSublayer *at(int index) const override
    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
    virtual int size() const override

    Detailed Description

    You cannot mutate the list (add, remove, move), but you can mutate the individual objects. See the roles descriptions for which roles are read-write.

    The model returns data for the following roles:

    RoleTypeDescriptionBuildingSublayerRoles
    nameQStringThe building sublayer's name.BuildingSublayerNameRole
    modelName (read only)QStringThe building sublayer's model name.BuildingSublayerModelNameRole
    type (read only)BuildingSublayerTypeThe type of build sublayer.BuildingSublayerTypeRole
    discipline (read only)BuildingSublayerDisciplineThe discipline of the build sublayer.BuildingSublayerDisciplineRole
    opacityfloatThe building sublayer's opacity.BuildingSublayerOpacityRole
    sublayerId (read only)intThe sublayerId of the building sublayer.BuildingSublayerIdRole
    canChangeVisibility (read only)boolWhether the building sublayer's visibility can be changed.BuildingSublayerCanChangeVisibilityRole
    visibleboolWhether the building sublayer is visible.BuildingSublayerVisibleRole
    showInLegendboolwhether the sublayer will be shown in the legend.BuildingSublayerShowInLegendRole

    Relevant samples:

    • Add building scene layer: Add a layer to a local scene to visualize and interact with 3D building models developed using Building Information Modeling (BIM) tools.

    Member Type Documentation

    enum BuildingSublayerListModel::BuildingSublayerRoles

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

    ConstantValueDescription
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerNameRoleQt::UserRole + 1The building sublayer's name.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerModelNameRole258(read only) The building sublayer's modelName.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerTypeRole259(read only) The buildingSublayerType as a BuildingSublayerType enum.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerDisciplineRole260(read only) The building sublayer's discipline as a BuildingSublayerDiscipline enum.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerOpacityRole261The building sublayer's opacity.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerIdRole262(read only) The building sublayer's sublayerId.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerCanChangeVisibilityRole263(read only) Whether the building sublayer's visibility can be changed.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerVisibleRole264Whether the building sublayer is visible.
    Esri::ArcGISRuntime::BuildingSublayerListModel::BuildingSublayerShowInLegendRole265Whether the sublayer will be shown in the legend.

    Member Function Documentation

    [override virtual noexcept] BuildingSublayerListModel::~BuildingSublayerListModel()

    Destructor.

    [override virtual] Esri::ArcGISRuntime::BuildingSublayer *BuildingSublayerListModel::at(int index) const

    Returns the BuildingSublayer at the specified index.

    [override virtual] QVariant BuildingSublayerListModel::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 sublayer referred to by the index.

    • index. The index in the model for which to return data.
    • role. The role for which to return data.

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

    Returns the number of building sublayers in the list model.

    QList<Esri::ArcGISRuntime::BuildingSublayer *> BuildingSublayerListModel::sublayers() const

    Returns the list of BuildingSublayer contained in the list model.

    Use this to directly obtain the list of BuildingSublayer objects, as opposed to hooking up the list model to a view.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.