Class: QgsPointCloudAttributeModel¶
A model for display of available attributes from a point cloud.
Added in version 3.18.
Class Hierarchy¶
Base classes¶
Enums
Custom model roles. |
|
alias of |
Methods
Returns |
|
Returns the attributes associated with the model. |
|
Returns the index corresponding to a given attribute name. |
|
Returns the layer associated with the model. |
|
Sets whether an optional empty attribute ("not set") option is present in the model. |
|
Sets the attributes to include in the model. |
|
Sets the layer associated with the model. |
Static Methods
Returns a HTML formatted tooltip string for a attribute, containing details like the attribute name and type. |
|
Returns an icon corresponding to an attribute type |
- class qgis.core.QgsPointCloudAttributeModel[source]¶
Bases:
QAbstractItemModel
- __init__(parent: QObject | None = None)
Constructor for QgsPointCloudAttributeModel, with the specified
parent
object.- Parameters:
parent (Optional[QObject] = None)
- class CustomRole(*values)¶
Bases:
IntEnum
Custom model roles.
Note
Prior to QGIS 3.36 this was available as QgsPointCloudAttributeModel.FieldRoles
Added in version 3.36.
AttributeName
: Attribute nameAvailable as
QgsPointCloudAttributeModel.AttributeNameRole
in older QGIS releases.AttributeIndex
: Attribute index if index corresponds to an attributeAvailable as
QgsPointCloudAttributeModel.AttributeIndexRole
in older QGIS releases.AttributeSize
: Attribute sizeAvailable as
QgsPointCloudAttributeModel.AttributeSizeRole
in older QGIS releases.AttributeType
: Attribute type, see QgsPointCloudAttribute.DataTypeAvailable as
QgsPointCloudAttributeModel.AttributeTypeRole
in older QGIS releases.IsEmpty
:True
if the index corresponds to the empty valueAvailable as
QgsPointCloudAttributeModel.IsEmptyRole
in older QGIS releases.IsNumeric
:True
if the index corresponds to a numeric attributreAvailable as
QgsPointCloudAttributeModel.IsNumericRole
in older QGIS releases.
- FieldRoles¶
alias of
CustomRole
- allowEmptyAttributeName(self) bool [source]¶
Returns
True
if the model allows the empty attribute (“not set”) choice.See also
- Return type:
bool
- static attributeToolTip(attribute: QgsPointCloudAttribute) str [source]¶
Returns a HTML formatted tooltip string for a
attribute
, containing details like the attribute name and type.- Parameters:
attribute (QgsPointCloudAttribute)
- Return type:
str
- attributes(self) QgsPointCloudAttributeCollection [source]¶
Returns the attributes associated with the model.
See also
- Return type:
- static iconForAttributeType(type: QgsPointCloudAttribute.DataType) QIcon [source]¶
Returns an icon corresponding to an attribute
type
- Parameters:
- Return type:
QIcon
- indexFromName(self, name: str | None) QModelIndex [source]¶
Returns the index corresponding to a given attribute
name
.- Parameters:
name (Optional[str])
- Return type:
QModelIndex
- layer(self) QgsPointCloudLayer | None [source]¶
Returns the layer associated with the model.
See also
- Return type:
Optional[QgsPointCloudLayer]
- setAllowEmptyAttributeName(self, allowEmpty: bool)[source]¶
Sets whether an optional empty attribute (“not set”) option is present in the model.
See also
- Parameters:
allowEmpty (bool)
- setAttributes(self, attributes: QgsPointCloudAttributeCollection)[source]¶
Sets the
attributes
to include in the model.See also
See also
- Parameters:
attributes (QgsPointCloudAttributeCollection)
- setLayer(self, layer: QgsPointCloudLayer | None)[source]¶
Sets the
layer
associated with the model.See also
- Parameters:
layer (Optional[QgsPointCloudLayer])