QGIS/python/core/auto_generated/qgsmaplayerelevationproperties.sip.in

249 lines
7.5 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmaplayerelevationproperties.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMapLayerElevationProperties : QObject
{
%Docstring(signature="appended")
Base class for storage of map layer elevation properties.
:py:class:`QgsMapLayerElevationProperties` exposes user-configurable settings for controlling
how an individual :py:class:`QgsMapLayer` behaves with relation to z values or elevations.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgsmaplayerelevationproperties.h"
#include "qgspointcloudlayerelevationproperties.h"
#include "qgsrasterlayerelevationproperties.h"
#include "qgsvectorlayerelevationproperties.h"
#include "qgsmeshlayerelevationproperties.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsPointCloudLayerElevationProperties *>( sipCpp ) )
{
sipType = sipType_QgsPointCloudLayerElevationProperties;
}
else if ( qobject_cast<QgsVectorLayerElevationProperties *>( sipCpp ) )
{
sipType = sipType_QgsVectorLayerElevationProperties;
}
else if ( qobject_cast<QgsRasterLayerElevationProperties *>( sipCpp ) )
{
sipType = sipType_QgsRasterLayerElevationProperties;
}
else if ( qobject_cast<QgsMeshLayerElevationProperties *>( sipCpp ) )
{
sipType = sipType_QgsMeshLayerElevationProperties;
}
else
{
sipType = 0;
}
%End
public:
enum Property
{
ZOffset,
ExtrusionHeight,
};
enum Flag
{
FlagDontInvalidateCachedRendersWhenRangeChanges
};
typedef QFlags<QgsMapLayerElevationProperties::Flag> Flags;
QgsMapLayerElevationProperties( QObject *parent /TransferThis/ );
%Docstring
Constructor for QgsMapLayerElevationProperties, with the specified ``parent`` object.
%End
virtual bool hasElevation() const;
%Docstring
Returns ``True`` if the layer has an elevation or z component.
%End
virtual QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) = 0;
%Docstring
Writes the properties to a DOM ``element``, to be used later with :py:func:`~QgsMapLayerElevationProperties.readXml`.
.. seealso:: :py:func:`readXml`
%End
virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) = 0;
%Docstring
Reads the elevation properties from a DOM ``element`` previously written by :py:func:`~QgsMapLayerElevationProperties.writeXml`.
.. seealso:: :py:func:`writeXml`
%End
virtual QgsMapLayerElevationProperties *clone() const = 0 /Factory/;
%Docstring
Creates a clone of the properties.
.. versionadded:: 3.26
%End
virtual bool isVisibleInZRange( const QgsDoubleRange &range ) const;
%Docstring
Returns ``True`` if the layer should be visible and rendered for the specified z ``range``.
%End
virtual QgsMapLayerElevationProperties::Flags flags() const;
%Docstring
Returns flags associated to the elevation properties.
%End
virtual QgsDoubleRange calculateZRange( QgsMapLayer *layer ) const;
%Docstring
Attempts to calculate the overall elevation or z range for the specified ``layer``, using
the settings defined by this elevation properties object.
May return an infinite range if the extent could not be calculated.
%End
double zOffset() const;
%Docstring
Returns the z offset, which is a fixed offset amount which should be added to z values from
the layer.
.. note::
Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`
.. seealso:: :py:func:`setZOffset`
%End
void setZOffset( double offset );
%Docstring
Sets the z ``offset``, which is a fixed offset amount which will be added to z values from
the layer.
.. note::
Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`
.. seealso:: :py:func:`zOffset`
%End
double zScale() const;
%Docstring
Returns the z scale, which is a scaling factor which should be applied to z values from
the layer.
This can be used to correct or manually adjust for incorrect elevation values in a layer, such
as conversion of elevation values in feet to meters.
.. note::
Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`
.. seealso:: :py:func:`setZScale`
%End
void setZScale( double scale );
%Docstring
Sets the z ``scale``, which is a scaling factor which will be applied to z values from
the layer.
This can be used to correct or manually adjust for incorrect elevation values in a layer, such
as conversion of elevation values in feet to meters.
.. note::
Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`
.. seealso:: :py:func:`zScale`
%End
QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the object's property collection, used for data defined overrides.
.. seealso:: :py:func:`setDataDefinedProperties`
.. versionadded:: 3.26
%End
void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the object's property ``collection``, used for data defined overrides.
Any existing properties will be discarded.
.. seealso:: :py:func:`dataDefinedProperties`
.. seealso:: Property
.. versionadded:: 3.26
%End
static QgsPropertiesDefinition propertyDefinitions();
%Docstring
Returns the definitions for data defined properties available for use in elevation properties.
.. versionadded:: 3.26
%End
signals:
void changed();
%Docstring
Emitted when the elevation properties have changed.
%End
protected:
void writeCommonProperties( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context );
%Docstring
Writes common class properties to a DOM ``element``, to be used later with :py:func:`~QgsMapLayerElevationProperties.readXml`.
.. seealso:: :py:func:`readCommonProperties`
.. versionadded:: 3.26
%End
void readCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads common class properties from a DOM ``element`` previously written by :py:func:`~QgsMapLayerElevationProperties.writeXml`.
.. seealso:: :py:func:`writeCommonProperties`
.. versionadded:: 3.26
%End
void copyCommonProperties( const QgsMapLayerElevationProperties *other );
%Docstring
Copies common properties from another object.
.. versionadded:: 3.26
%End
static void initPropertyDefinitions();
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmaplayerelevationproperties.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/