Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
266 additions
and 30 deletions.
- +1 −0 python/CMakeLists.txt
- +96 −0 python/core/3d/qgs3drendererregistry.sip
- +68 −0 python/core/3d/qgsabstract3drenderer.sip
- +2 −0 python/core/core_auto.sip
- +9 −0 python/core/qgsapplication.sip
- +17 −0 python/core/qgsmaplayer.sip
- +1 −1 scripts/spell_check/check_spelling.sh
- +13 −9 src/core/3d/qgs3drendererregistry.cpp
- +35 −11 src/core/3d/qgs3drendererregistry.h
- +21 −6 src/core/3d/qgsabstract3drenderer.h
- +1 −1 src/core/qgsapplication.h
- +2 −2 src/core/qgsmaplayer.h
@@ -0,0 +1,96 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/3d/qgs3drendererregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class Qgs3DRendererAbstractMetadata | ||
{ | ||
%Docstring | ||
Base metadata class for 3D renderers. Instances of derived classes may be registered in Qgs3DRendererRegistry. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgs3drendererregistry.h" | ||
%End | ||
public: | ||
|
||
virtual ~Qgs3DRendererAbstractMetadata(); | ||
|
||
QString type() const; | ||
%Docstring | ||
Returns unique identifier of the 3D renderer class | ||
:rtype: str | ||
%End | ||
|
||
virtual QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) = 0 /Factory/; | ||
%Docstring | ||
Returns new instance of the renderer given the DOM element. Returns NULL on error. | ||
Pure virtual function: must be implemented in derived classes. | ||
:rtype: QgsAbstract3DRenderer | ||
%End | ||
|
||
protected: | ||
|
||
explicit Qgs3DRendererAbstractMetadata( const QString &type ); | ||
%Docstring | ||
Constructor of the base class | ||
%End | ||
|
||
protected: | ||
}; | ||
|
||
|
||
class Qgs3DRendererRegistry | ||
{ | ||
%Docstring | ||
Keeps track of available 3D renderers. Should be accessed through QgsApplication.renderer3DRegistry() singleton. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgs3drendererregistry.h" | ||
%End | ||
public: | ||
Qgs3DRendererRegistry(); | ||
|
||
~Qgs3DRendererRegistry(); | ||
|
||
void addRenderer( Qgs3DRendererAbstractMetadata *metadata /Transfer/ ); | ||
%Docstring | ||
Registers a new 3D renderer type. The call takes ownership of the passed metadata object. | ||
%End | ||
|
||
void removeRenderer( const QString &type ); | ||
%Docstring | ||
Unregisters a 3D renderer type | ||
%End | ||
|
||
Qgs3DRendererAbstractMetadata *rendererMetadata( const QString &type ) const; | ||
%Docstring | ||
Returns metadata for a 3D renderer type (may be used to create a new instance of the type) | ||
:rtype: Qgs3DRendererAbstractMetadata | ||
%End | ||
|
||
QStringList renderersList() const; | ||
%Docstring | ||
Returns a list of all available 3D renderer types. | ||
:rtype: list of str | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/3d/qgs3drendererregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
@@ -0,0 +1,68 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/3d/qgsabstract3drenderer.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
namespace Qt3DCore | ||
{ | ||
} | ||
|
||
class QgsAbstract3DRenderer | ||
{ | ||
%Docstring | ||
Base class for all renderers that may to participate in 3D view. | ||
|
||
3D renderers implement the method createEntity() that returns a new 3D entity - that entity | ||
will be added to the 3D scene to represent data in renderer's display style. | ||
|
||
Renderers may store some custom properties (e.g. materials, sizes) that are written to and read from | ||
XML. It is therefore not recommended to store large amount of data within a renderer (e.g. arrays of vertices). | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsabstract3drenderer.h" | ||
%End | ||
public: | ||
virtual ~QgsAbstract3DRenderer(); | ||
|
||
virtual QString type() const = 0; | ||
%Docstring | ||
Returns unique identifier of the renderer class (used to identify subclass) | ||
:rtype: str | ||
%End | ||
virtual QgsAbstract3DRenderer *clone() const = 0 /Factory/; | ||
%Docstring | ||
Returns a cloned instance | ||
:rtype: QgsAbstract3DRenderer | ||
%End | ||
|
||
virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const = 0; | ||
%Docstring | ||
Writes renderer's properties to given XML element | ||
%End | ||
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) = 0; | ||
%Docstring | ||
Reads renderer's properties from given XML element | ||
%End | ||
virtual void resolveReferences( const QgsProject &project ); | ||
%Docstring | ||
Resolves references to other objects - second phase of loading - after readXml() | ||
%End | ||
}; | ||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/3d/qgsabstract3drenderer.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.