QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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.
 
void setLayer (QgsMapLayer *layer)
 Sets the layer for which fields are listed in the combobox.
 

Signals

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

Public Member Functions

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

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 22 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 42 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 70 of file qgspointcloudattributecombobox.cpp.

◆ currentAttribute()

QString QgsPointCloudAttributeComboBox::currentAttribute ( ) const

Returns the currently selected attribute.

Definition at line 100 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 60 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 37 of file qgspointcloudattributecombobox.cpp.

◆ setAttribute

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

Sets the currently selected attribute by name.

Definition at line 75 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 65 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 32 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 47 of file qgspointcloudattributecombobox.cpp.

Property Documentation

◆ allowEmptyAttributeName

bool QgsPointCloudAttributeComboBox::allowEmptyAttributeName
readwrite

Definition at line 39 of file qgspointcloudattributecombobox.h.

◆ filters

QgsPointCloudAttributeProxyModel::Filters QgsPointCloudAttributeComboBox::filters
readwrite

Definition at line 38 of file qgspointcloudattributecombobox.h.


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