mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-03 00:04:47 -04:00
This commit adds a new option for showing annotation layers in 3d maps. From the annotation layer properties, 3d tab, users can set the layer to render as 3d billboards. When activated, all MARKERS from the layer will be shown as floating billboard symbols above the 3d map. (lines, polygons, and text items from the layer are ignored). Users have control over the terrain clamping and offset for the billboards, and whether or not "callout" lines should be shown (vertical lines joining the billboard to the corresponding location on the terrain surface)
155 lines
4.2 KiB
Plaintext
155 lines
4.2 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/3d/qgsannotationlayer3drenderer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
// this is needed for the "convert to subclass" code below to compile
|
|
%ModuleHeaderCode
|
|
#include "qgsannotationlayer3drenderer.h"
|
|
%End
|
|
|
|
class QgsAnnotationLayer3DRendererMetadata : Qgs3DRendererAbstractMetadata
|
|
{
|
|
%Docstring(signature="appended")
|
|
Metadata for annotation layer 3D renderer to allow creation of its
|
|
instances from XML.
|
|
|
|
.. warning::
|
|
|
|
This is not considered stable API, and may change in future QGIS releases. It is
|
|
exposed to the Python bindings as a tech preview only.
|
|
|
|
.. versionadded:: 4.0
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsannotationlayer3drenderer.h"
|
|
%End
|
|
public:
|
|
QgsAnnotationLayer3DRendererMetadata();
|
|
|
|
virtual QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) /Factory/;
|
|
|
|
%Docstring
|
|
Creates an instance of a 3D renderer based on a DOM element with
|
|
renderer configuration
|
|
%End
|
|
};
|
|
|
|
class QgsAnnotationLayer3DRenderer : QgsAbstract3DRenderer
|
|
{
|
|
%Docstring(signature="appended")
|
|
3D renderers for annotation layers.
|
|
|
|
.. versionadded:: 4.0
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsannotationlayer3drenderer.h"
|
|
%End
|
|
%ConvertToSubClassCode
|
|
if ( dynamic_cast<QgsAnnotationLayer3DRenderer *>( sipCpp ) != nullptr )
|
|
sipType = sipType_QgsAnnotationLayer3DRenderer;
|
|
else
|
|
sipType = nullptr;
|
|
%End
|
|
public:
|
|
QgsAnnotationLayer3DRenderer();
|
|
|
|
void setLayer( QgsAnnotationLayer *layer );
|
|
%Docstring
|
|
Sets the annotation layer associated with the renderer.
|
|
|
|
.. seealso:: :py:func:`layer`
|
|
%End
|
|
|
|
QgsAnnotationLayer *layer() const;
|
|
%Docstring
|
|
Returns the annotation layer associated with the renderer.
|
|
|
|
.. seealso:: :py:func:`setLayer`
|
|
%End
|
|
|
|
virtual QString type() const;
|
|
|
|
virtual QgsAnnotationLayer3DRenderer *clone() const /Factory/;
|
|
|
|
|
|
virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
|
|
|
|
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
|
|
|
|
virtual void resolveReferences( const QgsProject &project );
|
|
|
|
|
|
Qgis::AltitudeClamping altitudeClamping() const;
|
|
%Docstring
|
|
Returns the altitude clamping method, which determines the vertical
|
|
position of annotations.
|
|
|
|
.. seealso:: :py:func:`setAltitudeClamping`
|
|
%End
|
|
|
|
void setAltitudeClamping( Qgis::AltitudeClamping clamping );
|
|
%Docstring
|
|
Sets the altitude ``clamping`` method, which determines the vertical
|
|
position of annotations.
|
|
|
|
.. seealso:: :py:func:`altitudeClamping`
|
|
%End
|
|
|
|
double zOffset() const;
|
|
%Docstring
|
|
Returns the z offset, which is a fixed offset amount which should be
|
|
added to z values for the annotations.
|
|
|
|
.. 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 for the annotations.
|
|
|
|
.. seealso:: :py:func:`zOffset`
|
|
%End
|
|
|
|
bool showCalloutLines() const;
|
|
%Docstring
|
|
Returns ``True`` if callout lines are shown, vertically joining the
|
|
annotations to the terrain.
|
|
|
|
.. seealso:: :py:func:`setShowCalloutLines`
|
|
%End
|
|
|
|
void setShowCalloutLines( bool show );
|
|
%Docstring
|
|
Sets whether callout lines are shown, vertically joining the annotations
|
|
to the terrain.
|
|
|
|
.. seealso:: :py:func:`showCalloutLines`
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
QgsAnnotationLayer3DRenderer( const QgsAnnotationLayer3DRenderer & );
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/3d/qgsannotationlayer3drenderer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|