QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
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 "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
#include "
qgspointcloudattributemodel.h
"
22
23
#include <QComboBox>
24
25
class
QgsMapLayer
;
26
class
QgsPointCloudLayer
;
27
35
class
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
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsPointCloudAttributeCollection
A collection of point cloud attributes.
Definition
qgspointcloudattribute.h:157
QgsPointCloudAttributeComboBox::setLayer
void setLayer(QgsMapLayer *layer)
Sets the layer for which fields are listed in the combobox.
Definition
qgspointcloudattributecombobox.cpp:49
QgsPointCloudAttributeComboBox::filters
QgsPointCloudAttributeProxyModel::Filters filters
Definition
qgspointcloudattributecombobox.h:38
QgsPointCloudAttributeComboBox::setAllowEmptyAttributeName
void setAllowEmptyAttributeName(bool allowEmpty)
Sets whether an optional empty attribute ("not set") option is shown in the combo box.
Definition
qgspointcloudattributecombobox.cpp:39
QgsPointCloudAttributeComboBox::attributeChanged
void attributeChanged(const QString &name)
Emitted when the currently selected attribute changes.
QgsPointCloudAttributeComboBox::QgsPointCloudAttributeComboBox
QgsPointCloudAttributeComboBox(QWidget *parent=nullptr)
QgsPointCloudAttributeComboBox creates a combo box to display the fields of a layer.
Definition
qgspointcloudattributecombobox.cpp:24
QgsPointCloudAttributeComboBox::allowEmptyAttributeName
bool allowEmptyAttributeName
Definition
qgspointcloudattributecombobox.h:39
QgsPointCloudAttributeComboBox::layer
QgsPointCloudLayer * layer() const
Returns the layer currently associated with the combobox.
Definition
qgspointcloudattributecombobox.cpp:62
QgsPointCloudAttributeComboBox::setAttribute
void setAttribute(const QString &name)
Sets the currently selected attribute by name.
Definition
qgspointcloudattributecombobox.cpp:77
QgsPointCloudAttributeComboBox::setFilters
void setFilters(QgsPointCloudAttributeProxyModel::Filters filters)
Sets filters to allow filtering available attributes according to the attribute properties.
Definition
qgspointcloudattributecombobox.cpp:34
QgsPointCloudAttributeModel
A model for display of available attributes from a point cloud.
Definition
qgspointcloudattributemodel.h:37
QgsPointCloudAttributeProxyModel
A proxy model for filtering available attributes from a point cloud attribute model.
Definition
qgspointcloudattributemodel.h:145
QgsPointCloudAttributeProxyModel::Filters
QFlags< Filter > Filters
Definition
qgspointcloudattributemodel.h:159
QgsPointCloudLayer
Represents a map layer supporting display of point clouds.
Definition
qgspointcloudlayer.h:49
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgspointcloudattributemodel.h
Generated on
for QGIS API Documentation by
1.17.0