QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Slots | Signals | Public Member Functions | Properties | List of all members
QgsPointCloudAttributeComboBox Class Reference

The QgsPointCloudAttributeComboBox is a combo box which displays the list of attributes of a given point cloud layer. More...

#include <qgspointcloudattributecombobox.h>

Inheritance diagram for QgsPointCloudAttributeComboBox:
Inheritance graph
[legend]

Public Slots

void setAttribute (const QString &name)
 Sets the currently selected attribute by name. More...
 
void setLayer (QgsMapLayer *layer)
 Sets the layer for which fields are listed in the combobox. More...
 

Signals

void attributeChanged (const QString &name)
 Emitted when the currently selected attribute changes. More...
 

Public Member Functions

 QgsPointCloudAttributeComboBox (QWidget *parent=nullptr)
 QgsPointCloudAttributeComboBox creates a combo box to display the fields of a layer. More...
 
bool allowEmptyAttributeName () const
 Returns true if the combo box allows the empty field ("not set") choice. More...
 
QgsPointCloudAttributeCollection attributes () const
 Returns the attributes currently shown in the combobox. More...
 
QString currentAttribute () const
 Returns the currently selected attribute. More...
 
QgsPointCloudAttributeProxyModel::Filters filters () const
 Returns the current filters used for filtering available attributes. More...
 
QgsPointCloudLayerlayer () const
 Returns the layer currently associated with the combobox. More...
 
void setAllowEmptyAttributeName (bool allowEmpty)
 Sets whether an optional empty attribute ("not set") option is shown in the combo box. More...
 
void setAttributes (const QgsPointCloudAttributeCollection &attributes)
 Manually sets the attributes to use for the combo box. More...
 
void setFilters (QgsPointCloudAttributeProxyModel::Filters filters)
 Sets filters to allow filtering available attributes according to the attribute properties. More...
 

Properties

bool allowEmptyAttributeName
 
QgsPointCloudAttributeProxyModel::Filters filters
 

Detailed Description

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.

Since
QGIS 3.18

Definition at line 35 of file qgspointcloudattributecombobox.h.

Constructor & Destructor Documentation

◆ QgsPointCloudAttributeComboBox()

QgsPointCloudAttributeComboBox::QgsPointCloudAttributeComboBox ( QWidget *  parent = nullptr)
explicit

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.

Definition at line 21 of file qgspointcloudattributecombobox.cpp.

Member Function Documentation

◆ allowEmptyAttributeName()

bool QgsPointCloudAttributeComboBox::allowEmptyAttributeName ( ) const

Returns true if the combo box allows the empty field ("not set") choice.

See also
setAllowEmptyAttributeName()

Definition at line 41 of file qgspointcloudattributecombobox.cpp.

◆ attributeChanged

void QgsPointCloudAttributeComboBox::attributeChanged ( const QString &  name)
signal

Emitted when the currently selected attribute changes.

◆ attributes()

QgsPointCloudAttributeCollection QgsPointCloudAttributeComboBox::attributes ( ) const

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 to setAttributes().

Definition at line 62 of file qgspointcloudattributecombobox.cpp.

◆ currentAttribute()

QString QgsPointCloudAttributeComboBox::currentAttribute ( ) const

Returns the currently selected attribute.

Definition at line 92 of file qgspointcloudattributecombobox.cpp.

◆ filters()

QgsPointCloudAttributeProxyModel::Filters QgsPointCloudAttributeComboBox::filters ( ) const
inline

Returns the current filters used for filtering available attributes.

See also
setFilters()

Definition at line 59 of file qgspointcloudattributecombobox.h.

◆ layer()

QgsPointCloudLayer * QgsPointCloudAttributeComboBox::layer ( ) const

Returns the layer currently associated with the combobox.

See also
setLayer()

Definition at line 52 of file qgspointcloudattributecombobox.cpp.

◆ setAllowEmptyAttributeName()

void QgsPointCloudAttributeComboBox::setAllowEmptyAttributeName ( bool  allowEmpty)

Sets whether an optional empty attribute ("not set") option is shown in the combo box.

See also
allowEmptyAttributeName()

Definition at line 36 of file qgspointcloudattributecombobox.cpp.

◆ setAttribute

void QgsPointCloudAttributeComboBox::setAttribute ( const QString &  name)
slot

Sets the currently selected attribute by name.

Definition at line 67 of file qgspointcloudattributecombobox.cpp.

◆ setAttributes()

void QgsPointCloudAttributeComboBox::setAttributes ( const QgsPointCloudAttributeCollection attributes)

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. Calling setAttributes() will automatically clear any existing layer().

See also
attributes()

Definition at line 57 of file qgspointcloudattributecombobox.cpp.

◆ setFilters()

void QgsPointCloudAttributeComboBox::setFilters ( QgsPointCloudAttributeProxyModel::Filters  filters)

Sets filters to allow filtering available attributes according to the attribute properties.

See also
filters()

Definition at line 31 of file qgspointcloudattributecombobox.cpp.

◆ setLayer

void QgsPointCloudAttributeComboBox::setLayer ( QgsMapLayer layer)
slot

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
layer()

Definition at line 46 of file qgspointcloudattributecombobox.cpp.

Property Documentation

◆ allowEmptyAttributeName

bool QgsPointCloudAttributeComboBox::allowEmptyAttributeName
readwrite

Definition at line 1 of file qgspointcloudattributecombobox.h.

◆ filters

QgsPointCloudAttributeProxyModel::Filters QgsPointCloudAttributeComboBox::filters
readwrite

Definition at line 1 of file qgspointcloudattributecombobox.h.


The documentation for this class was generated from the following files: