QGIS API Documentation 3.41.0-Master (d5b93354e9c)
Loading...
Searching...
No Matches
qgspointcloudattributecombobox.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudattributecombobox.h
3 --------------------------------------
4 begin : November 2020
5 copyright : (C) 2020 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7***************************************************************************
8* *
9* This program is free software; you can redistribute it and/or modify *
10* it under the terms of the GNU General Public License as published by *
11* the Free Software Foundation; either version 2 of the License, or *
12* (at your option) any later version. *
13* *
14***************************************************************************/
15
16#ifndef QGSPOINTCLOUDATTRIBUTECOMBOBOX_H
17#define QGSPOINTCLOUDATTRIBUTECOMBOBOX_H
18
19#include <QComboBox>
20
22#include "qgis_gui.h"
23
24#include "qgis_sip.h"
25
26class QgsMapLayer;
28
35class GUI_EXPORT QgsPointCloudAttributeComboBox : public QComboBox
36{
37 Q_OBJECT
38 Q_PROPERTY( QgsPointCloudAttributeProxyModel::Filters filters READ filters WRITE setFilters )
39 Q_PROPERTY( bool allowEmptyAttributeName READ allowEmptyAttributeName WRITE setAllowEmptyAttributeName )
40
41 public:
46 explicit QgsPointCloudAttributeComboBox( QWidget *parent SIP_TRANSFERTHIS = nullptr );
47
52 void setFilters( QgsPointCloudAttributeProxyModel::Filters filters );
53
58 QgsPointCloudAttributeProxyModel::Filters filters() const { return mProxyModel->filters(); }
59
64 void setAllowEmptyAttributeName( bool allowEmpty );
65
70 bool allowEmptyAttributeName() const;
71
73 QString currentAttribute() const;
74
79 QgsPointCloudLayer *layer() const;
80
90 void setAttributes( const QgsPointCloudAttributeCollection &attributes );
91
98 QgsPointCloudAttributeCollection attributes() const;
99
100 signals:
102 void attributeChanged( const QString &name );
103
104 public slots:
105
111 void setLayer( QgsMapLayer *layer );
112
114 void setAttribute( const QString &name );
115
116 private slots:
117 void indexChanged( int i );
118
119 private:
120 QgsPointCloudAttributeModel *mAttributeModel = nullptr;
121 QgsPointCloudAttributeProxyModel *mProxyModel = nullptr;
122};
123
124#endif // QGSPOINTCLOUDATTRIBUTECOMBOBOX_H
Base class for all map layer types.
Definition qgsmaplayer.h:76
Collection of point cloud attributes.
The QgsPointCloudAttributeComboBox is a combo box which displays the list of attributes of a given po...
void attributeChanged(const QString &name)
Emitted when the currently selected attribute changes.
A model for display of available attributes from a point cloud.
A proxy model for filtering available attributes from a point cloud attribute model.
Filters filters() const
Returns the filters controlling displayed attributes.
Represents a map layer supporting display of point clouds.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53