QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgspointcloudlayerelevationproperties.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudlayerelevationproperties.h
3 ---------------
4 begin : November 2020
5 copyright : (C) 2020 by Nyall Dawson
6 email : nyall dot dawson dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18
19#ifndef QGSPOINTCLOUDLAYERELEVATIONPROPERTIES_H
20#define QGSPOINTCLOUDLAYERELEVATIONPROPERTIES_H
21
22#include "qgis_core.h"
23#include "qgis_sip.h"
24#include "qgsunittypes.h"
26
35{
36
37 Q_OBJECT
38
39 public:
40
45
46 bool hasElevation() const override;
47 QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) override;
48 bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) override;
50 QString htmlSummary() const override;
51 bool isVisibleInZRange( const QgsDoubleRange &range, QgsMapLayer *layer = nullptr ) const override;
52 QgsDoubleRange calculateZRange( QgsMapLayer *layer ) const override;
53 QList< double > significantZValues( QgsMapLayer *layer ) const override;
54 bool showByDefaultInElevationProfilePlots() const override;
55
68 double maximumScreenError() const { return mMaximumScreenError; }
69
82 void setMaximumScreenError( double error );
83
92 Qgis::RenderUnit maximumScreenErrorUnit() const { return mMaximumScreenErrorUnit; }
93
102 void setMaximumScreenErrorUnit( Qgis::RenderUnit unit );
103
110 Qgis::PointCloudSymbol pointSymbol() const;
111
118 void setPointSymbol( Qgis::PointCloudSymbol symbol );
119
126 QColor pointColor() const { return mPointColor; }
127
134 void setPointColor( const QColor &color );
135
143 bool applyOpacityByDistanceEffect() const { return mApplyOpacityByDistanceEffect; }
144
152 void setApplyOpacityByDistanceEffect( bool apply );
153
163 void setPointSize( double size );
164
175 double pointSize() const { return mPointSize; }
176
185 void setPointSizeUnit( const Qgis::RenderUnit units );
186
194 Qgis::RenderUnit pointSizeUnit() const { return mPointSizeUnit; }
195
201 bool respectLayerColors() const { return mRespectLayerColors; }
202
208 void setRespectLayerColors( bool enabled );
209
210 private:
211
212 double mMaximumScreenError = 0.3;
213 Qgis::RenderUnit mMaximumScreenErrorUnit = Qgis::RenderUnit::Millimeters;
214
215 double mPointSize = 0.6;
218 QColor mPointColor;
219 bool mRespectLayerColors = true;
220 bool mApplyOpacityByDistanceEffect = false;
221};
222
223#endif // QGSPOINTCLOUDLAYERELEVATIONPROPERTIES_H
PointCloudSymbol
Rendering symbols for point cloud points.
Definition qgis.h:3950
@ Square
Renders points as squares.
RenderUnit
Rendering size units.
Definition qgis.h:4847
@ Millimeters
Millimeters.
QgsRange which stores a range of double values.
Definition qgsrange.h:231
Base class for storage of map layer elevation properties.
virtual QList< double > significantZValues(QgsMapLayer *layer) const
Returns a list of significant elevation/z-values for the specified layer, using the settings defined ...
virtual bool isVisibleInZRange(const QgsDoubleRange &range, QgsMapLayer *layer=nullptr) const
Returns true if the layer should be visible and rendered for the specified z range.
virtual QgsMapLayerElevationProperties * clone() const =0
Creates a clone of the properties.
virtual QString htmlSummary() const
Returns a HTML formatted summary of the properties.
virtual bool showByDefaultInElevationProfilePlots() const
Returns true if the layer should be visible by default in newly created elevation profile plots.
virtual QDomElement writeXml(QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)=0
Writes the properties to a DOM element, to be used later with readXml().
virtual QgsDoubleRange calculateZRange(QgsMapLayer *layer) const
Attempts to calculate the overall elevation or z range for the specified layer, using the settings de...
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads the elevation properties from a DOM element previously written by writeXml().
virtual bool hasElevation() const
Returns true if the layer has an elevation or z component.
Base class for all map layer types.
Definition qgsmaplayer.h:76
Point cloud layer specific subclass of QgsMapLayerElevationProperties.
bool respectLayerColors() const
Returns true if layer coloring should be respected when rendering elevation profile plots.
QColor pointColor() const
Returns the color used drawing points in elevation profile charts.
double pointSize() const
Returns the point size used for drawing points in elevation profile charts.
Qgis::RenderUnit maximumScreenErrorUnit() const
Returns the unit for the maximum screen error allowed when generating elevation profiles for the poin...
Qgis::RenderUnit pointSizeUnit() const
Returns the units used for the point size used for drawing points in elevation profile charts.
bool applyOpacityByDistanceEffect() const
Returns true if a reduced opacity by distance from profile curve effect should be applied when drawin...
double maximumScreenError() const
Returns the maximum screen error allowed when generating elevation profiles for the point cloud.
The class is used as a container of context for various read/write operations on other objects.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_FACTORY
Definition qgis_sip.h:76