A immutable, minimal list model storing a list of BuildingSublayer. More...
| Header | #include <Building |
| Since | Esri |
| Inherits | QAbstract |
Public Types
| enum | Building |
Public Functions
| virtual | ~ |
| QList | sublayers() const |
Reimplemented Public Functions
| virtual Esri | at(int index) const override |
| virtual QVariant | data(const QModel |
| 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:
| Role | Type | Description | BuildingSublayerRoles |
|---|---|---|---|
| name | QString | The building sublayer's name. | Building |
| model | QString | The building sublayer's model name. | Building |
| type (read only) | Building | The type of build sublayer. | Building |
| discipline (read only) | Building | The discipline of the build sublayer. | Building |
| opacity | float | The building sublayer's opacity. | Building |
| sublayer | int | The sublayer | Building |
| can | bool | Whether the building sublayer's visibility can be changed. | Building |
| visible | bool | Whether the building sublayer is visible. | Building |
| show | bool | whether the sublayer will be shown in the legend. | Building |
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.
| Constant | Value | Description |
|---|---|---|
Esri | Qt | The building sublayer's name. |
Esri | 258 | (read only) The building sublayer's model |
Esri | 259 | (read only) The building |
Esri | 260 | (read only) The building sublayer's discipline as a Building |
Esri | 261 | The building sublayer's opacity. |
Esri | 262 | (read only) The building sublayer's sublayer |
Esri | 263 | (read only) Whether the building sublayer's visibility can be changed. |
Esri | 264 | Whether the building sublayer is visible. |
Esri | 265 | Whether 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.