QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
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"
22#include "qgsabstract3dsymbol.h"
25
26#include <QObject>
27
28class QgsVectorLayer;
29
39{
40 public:
42
44 QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) override SIP_FACTORY;
45};
46
47
55{
56 public:
59
63 const QgsAbstract3DSymbol *symbol() const;
64
65 QString type() const override { return "vector"; }
66 QgsVectorLayer3DRenderer *clone() const override SIP_FACTORY;
67 Qt3DCore::QEntity *createEntity( Qgs3DMapSettings *map ) const override SIP_SKIP;
68
69 void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
70 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
71
72 private:
73 std::unique_ptr<QgsAbstract3DSymbol> mSymbol;
74
75 private:
76#ifdef SIP_RUN
79#endif
80};
81
82
83#endif // QGSVECTORLAYER3DRENDERER_H
Definition of the world.
virtual QgsAbstract3DRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context)=0
Returns new instance of the renderer given the DOM element.
Qgs3DRendererAbstractMetadata(const QString &type)
Constructor of the base class.
Base class for all renderers that participate in 3D views.
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
A container for the context for various read/write operations on objects.
3D renderer that renders all features of a vector layer with the same 3D symbol.
void setSymbol(QgsAbstract3DSymbol *symbol)
Sets 3D symbol associated with the renderer. Takes ownership of the symbol.
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass).
const QgsAbstract3DSymbol * symbol() const
Returns 3D symbol associated with the renderer.
QgsVectorLayer3DRenderer(QgsAbstract3DSymbol *s=nullptr)
Takes ownership of the symbol object.
Represents a vector layer which manages a vector based dataset.
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:84