QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgsmeshlayerelevationproperties.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshlayerelevationproperties.h
3 ---------------
4 begin : February 2022
5 copyright : (C) 2022 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 QGSMESHLAYERELEVATIONPROPERTIES_H
20#define QGSMESHLAYERELEVATIONPROPERTIES_H
21
22#include "qgis_core.h"
23#include "qgis_sip.h"
25#include "qgis.h"
26
27class QgsLineSymbol;
28class QgsFillSymbol;
29
38{
39
40 Q_OBJECT
41
42 public:
43
49
50 bool hasElevation() const override;
51 QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) override;
52 bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) override;
53 QString htmlSummary() const override;
55 bool isVisibleInZRange( const QgsDoubleRange &range ) const override;
56 QgsDoubleRange calculateZRange( QgsMapLayer *layer ) const override;
57 bool showByDefaultInElevationProfilePlots() const override;
58
64 QgsLineSymbol *profileLineSymbol() const;
65
73 void setProfileLineSymbol( QgsLineSymbol *symbol SIP_TRANSFER );
74
80 QgsFillSymbol *profileFillSymbol() const;
81
89 void setProfileFillSymbol( QgsFillSymbol *symbol SIP_TRANSFER );
90
96 Qgis::ProfileSurfaceSymbology profileSymbology() const { return mSymbology; }
97
103 void setProfileSymbology( Qgis::ProfileSurfaceSymbology symbology );
104
105 private:
106
107 void setDefaultProfileLineSymbol( const QColor &color );
108 void setDefaultProfileFillSymbol( const QColor &color );
109
110 std::unique_ptr< QgsLineSymbol > mProfileLineSymbol;
111 std::unique_ptr< QgsFillSymbol > mProfileFillSymbol;
113};
114
115#endif // QGSMESHLAYERELEVATIONPROPERTIES_H
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:55
ProfileSurfaceSymbology
Surface symbology type for elevation profile plots.
Definition: qgis.h:2446
@ Line
The elevation surface will be rendered using a line symbol.
QgsRange which stores a range of double values.
Definition: qgsrange.h:203
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Definition: qgsfillsymbol.h:30
A line symbol type, for rendering LineString and MultiLineString geometries.
Definition: qgslinesymbol.h:30
Base class for storage of map layer elevation properties.
virtual QgsMapLayerElevationProperties * clone() const =0
Creates a clone of the properties.
virtual QString htmlSummary() const
Returns a HTML formatted summary of the properties.
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 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:73
Mesh layer specific subclass of QgsMapLayerElevationProperties.
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_TRANSFER
Definition: qgis_sip.h:36
#define SIP_FACTORY
Definition: qgis_sip.h:76