Class: QgsPointCloudAttributeComboBox¶
The QgsPointCloudAttributeComboBox
is a combo box which
displays the list of attributes of a given point cloud layer. It might
be combined with a QgsMapLayerComboBox
to automatically
update attributes according to a chosen layer.
Added in version 3.18.
Class Hierarchy¶
Base classes¶
Methods
Returns |
|
Returns the attributes currently shown in the combobox. |
|
Returns the currently selected attribute |
|
Returns the current filters used for filtering available attributes. |
|
Returns the layer currently associated with the combobox. |
|
Sets whether an optional empty attribute ("not set") option is shown in the combo box. |
|
Sets the currently selected attribute by name |
|
Manually sets the attributes to use for the combo box. |
|
Sets filters to allow filtering available attributes according to the attribute properties. |
|
Sets the layer for which fields are listed in the combobox. |
Signals
Emitted when the currently selected attribute changes. |
- class qgis.gui.QgsPointCloudAttributeComboBox[source]¶
Bases:
QComboBox
- __init__(parent: QWidget | None = None)
QgsPointCloudAttributeComboBox creates a combo box to display the fields of a layer. The layer can be either manually given or dynamically set by connecting the signal
QgsMapLayerComboBox
.layerChanged to the slot setLayer.- Parameters:
parent (Optional[QWidget] = None)
- allowEmptyAttributeName(self) bool [source]¶
Returns
True
if the combo box allows the empty field (“not set”) choice.See also
- Return type:
bool
- signal attributeChanged(name: str)[source]¶
Emitted when the currently selected attribute changes.
- Parameters:
name (str)
- attributes(self) QgsPointCloudAttributeCollection [source]¶
Returns the attributes currently shown in the combobox.
This will either be attributes from the associated
layer()
or the attributes manually set by a call tosetAttributes()
.- Return type:
- filters(self) QgsPointCloudAttributeProxyModel.Filters [source]¶
Returns the current filters used for filtering available attributes.
See also
- Return type:
- layer(self) QgsPointCloudLayer | None [source]¶
Returns the layer currently associated with the combobox.
See also
- Return type:
Optional[QgsPointCloudLayer]
- setAllowEmptyAttributeName(self, allowEmpty: bool)[source]¶
Sets whether an optional empty attribute (“not set”) option is shown in the combo box.
See also
- Parameters:
allowEmpty (bool)
- setAttribute(self, name: str | None)[source]¶
Sets the currently selected attribute by
name
- Parameters:
name (Optional[str])
- setAttributes(self, attributes: QgsPointCloudAttributeCollection)[source]¶
Manually sets the
attributes
to use for the combo box.This method should only be used when the combo box ISN’T associated with a
layer()
and needs to show the fields from an arbitrary attribute collection instead. CallingsetAttributes()
will automatically clear any existinglayer()
.See also
- Parameters:
attributes (QgsPointCloudAttributeCollection)
- setFilters(self, filters: QgsPointCloudAttributeProxyModel.Filters | QgsPointCloudAttributeProxyModel.Filter)[source]¶
Sets
filters
to allow filtering available attributes according to the attribute properties.See also
- Parameters:
filters (Union[QgsPointCloudAttributeProxyModel.Filters, QgsPointCloudAttributeProxyModel.Filter])
- setLayer(self, layer: QgsMapLayer | None)[source]¶
Sets the layer for which fields are listed in the combobox. If no layer is set or a non-point cloud layer is set then the combobox will be empty.
See also
- Parameters:
layer (Optional[QgsMapLayer])