19 #ifndef QGSMAPLAYERELEVATIONPROPERTIES_H
20 #define QGSMAPLAYERELEVATIONPROPERTIES_H
22 #include "qgis_core.h"
29 #include <QDomElement>
54 if ( qobject_cast<QgsPointCloudLayerElevationProperties *>( sipCpp ) )
56 sipType = sipType_QgsPointCloudLayerElevationProperties;
58 else if ( qobject_cast<QgsVectorLayerElevationProperties *>( sipCpp ) )
60 sipType = sipType_QgsVectorLayerElevationProperties;
62 else if ( qobject_cast<QgsRasterLayerElevationProperties *>( sipCpp ) )
64 sipType = sipType_QgsRasterLayerElevationProperties;
66 else if ( qobject_cast<QgsMeshLayerElevationProperties *>( sipCpp ) )
68 sipType = sipType_QgsMeshLayerElevationProperties;
94 FlagDontInvalidateCachedRendersWhenRangeChanges = 1
96 Q_DECLARE_FLAGS( Flags, Flag )
106 virtual bool hasElevation()
const;
113 virtual QDomElement writeXml( QDomElement &element, QDomDocument &doc,
const QgsReadWriteContext &context ) = 0;
120 virtual bool readXml(
const QDomElement &element,
const QgsReadWriteContext &context ) = 0;
127 virtual void setDefaultsFromLayer(
QgsMapLayer *layer );
134 virtual QString htmlSummary()
const;
146 virtual bool isVisibleInZRange(
const QgsDoubleRange &range )
const;
151 virtual QgsMapLayerElevationProperties::Flags
flags()
const {
return QgsMapLayerElevationProperties::Flags(); }
170 virtual bool showByDefaultInElevationProfilePlots()
const;
190 void setZOffset(
double offset );
203 double zScale()
const {
return mZScale; }
216 void setZScale(
double scale );
266 void zOffsetChanged();
273 void zScaleChanged();
283 void profileRenderingPropertyChanged();
293 void profileGenerationPropertyChanged();
297 double mZScale = 1.0;
299 double mZOffset = 0.0;
313 void writeCommonProperties( QDomElement &element, QDomDocument &doc,
const QgsReadWriteContext &context );
321 void readCommonProperties(
const QDomElement &element,
const QgsReadWriteContext &context );
335 static void initPropertyDefinitions();
339 #endif // QGSMAPLAYERELEVATIONPROPERTIES_H