QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsvectorlayer3drenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectorlayer3drenderer.h
3  --------------------------------------
4  Date : July 2017
5  Copyright : (C) 2017 by Martin Dobias
6  Email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSVECTORLAYER3DRENDERER_H
17 #define QGSVECTORLAYER3DRENDERER_H
18 
19 #include "qgis_3d.h"
20 #include "qgis_sip.h"
21 
22 #include "qgs3drendererregistry.h"
24 #include "qgsabstract3dsymbol.h"
25 
27 
28 #include "qgsmaplayerref.h"
29 
30 #include <QObject>
31 
32 class QgsVectorLayer;
33 
34 
45 {
46  public:
48 
50  QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) override SIP_FACTORY;
51 };
52 
53 
61 {
62  public:
65 
67  void setSymbol( QgsAbstract3DSymbol *symbol SIP_TRANSFER );
69  const QgsAbstract3DSymbol *symbol() const;
70 
71  QString type() const override { return "vector"; }
72  QgsVectorLayer3DRenderer *clone() const override SIP_FACTORY;
73  Qt3DCore::QEntity *createEntity( const Qgs3DMapSettings &map ) const override SIP_SKIP;
74 
75  void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
76  void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
77 
78  private:
79  std::unique_ptr<QgsAbstract3DSymbol> mSymbol;
80 
81  private:
82 #ifdef SIP_RUN
85 #endif
86 };
87 
88 
89 #endif // QGSVECTORLAYER3DRENDERER_H
QgsVectorLayer3DRenderer::type
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass)
Definition: qgsvectorlayer3drenderer.h:71
QgsVectorLayer3DRenderer
Definition: qgsvectorlayer3drenderer.h:60
QgsReadWriteContext
Definition: qgsreadwritecontext.h:34
Qgs3DRendererAbstractMetadata::createRenderer
virtual QgsAbstract3DRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context)=0
Returns new instance of the renderer given the DOM element.
QgsAbstract3DRenderer
Definition: qgsabstract3drenderer.h:48
QgsVectorLayer3DRendererMetadata
Definition: qgsvectorlayer3drenderer.h:44
Qgs3DRendererAbstractMetadata
Base metadata class for 3D renderers.
Definition: qgs3drendererregistry.h:34
QgsAbstractVectorLayer3DRenderer
Definition: qgsabstractvectorlayer3drenderer.h:77
qgsabstract3dsymbol.h
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
geos::unique_ptr
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition: qgsgeos.h:79
QgsAbstract3DSymbol
Definition: qgsabstract3dsymbol.h:41
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
qgsabstractvectorlayer3drenderer.h
Qt3DCore
Definition: qgsabstract3drenderer.h:30
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
Qgs3DMapSettings
Definition: qgs3dmapsettings.h:51
qgs3drendererregistry.h
QgsVectorLayer
Definition: qgsvectorlayer.h:385
QgsAbstract3DRenderer::clone
virtual QgsAbstract3DRenderer * clone() const =0
Returns a cloned instance.
qgsmaplayerref.h
qgsphongmaterialsettings.h