QGIS API Documentation
4.1.0-Master (01362494303)
Loading...
Searching...
No Matches
src
core
3d
qgsabstract3drenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsabstract3drenderer.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 QGSABSTRACT3DRENDERER_H
17
#define QGSABSTRACT3DRENDERER_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
#include <QString>
23
24
using namespace
Qt::StringLiterals;
25
26
class
QDomElement;
27
class
QgsProject
;
28
class
QgsReadWriteContext
;
29
class
Qgs3DMapSettings
;
30
31
#ifndef SIP_RUN
32
namespace
Qt3DCore
33
{
34
class
QEntity;
35
}
36
#endif
37
49
class
CORE_EXPORT
QgsAbstract3DRenderer
SIP_ABSTRACT
50
{
51
#ifdef SIP_RUN
52
SIP_CONVERT_TO_SUBCLASS_CODE
53
54
// QgsMeshLayer3DRenderer is not available in Python bindings
55
const
QString
type
= sipCpp->type();
56
57
if
( sipCpp->type() ==
"annotation"
_L1 )
58
sipType = sipFindType(
"QgsAnnotationLayer3DRenderer"
);
59
else
if
( sipCpp->type() ==
"pointcloud"
_L1 )
60
sipType = sipFindType(
"QgsPointCloudLayer3DRenderer"
);
61
else
if
( sipCpp->type() ==
"rulebased"
_L1 )
62
sipType = sipFindType(
"QgsRuleBased3DRenderer"
);
63
else
if
( sipCpp->type() ==
"tiledscene"
_L1 )
64
sipType = sipFindType(
"QgsTiledSceneLayer3DRenderer"
);
65
else
if
( sipCpp->type() ==
"vector"
_L1 )
66
sipType = sipFindType(
"QgsVectorLayer3DRenderer"
);
67
else
68
sipType =
nullptr
;
69
SIP_END
70
#endif
71
72
public
:
73
virtual
~QgsAbstract3DRenderer
() =
default
;
74
76
virtual
QString
type
()
const
= 0;
78
virtual
QgsAbstract3DRenderer
*
clone
()
const
= 0
SIP_FACTORY
;
80
virtual
Qt3DCore::QEntity *
createEntity
(
Qgs3DMapSettings
*map )
const
SIP_SKIP
= 0;
81
83
virtual
void
writeXml
( QDomElement &elem,
const
QgsReadWriteContext
&context )
const
= 0;
85
virtual
void
readXml
(
const
QDomElement &elem,
const
QgsReadWriteContext
&context ) = 0;
87
virtual
void
resolveReferences
(
const
QgsProject
&project );
88
89
protected
:
90
QgsAbstract3DRenderer
() =
default
;
91
92
private
:
93
#ifdef SIP_RUN
94
QgsAbstract3DRenderer
(
const
QgsAbstract3DRenderer
& );
95
QgsAbstract3DRenderer
&operator=(
const
QgsAbstract3DRenderer
& );
96
#endif
97
98
Q_DISABLE_COPY(
QgsAbstract3DRenderer
)
99
};
100
101
102
#endif
// QGSABSTRACT3DRENDERER_H
Qgs3DMapSettings
Definition of the world.
Definition
qgs3dmapsettings.h:56
QgsAbstract3DRenderer::QgsAbstract3DRenderer
QgsAbstract3DRenderer()=default
QgsAbstract3DRenderer::~QgsAbstract3DRenderer
virtual ~QgsAbstract3DRenderer()=default
QgsAbstract3DRenderer::type
virtual QString type() const =0
Returns unique identifier of the renderer class (used to identify subclass).
QgsAbstract3DRenderer::writeXml
virtual void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const =0
Writes renderer's properties to given XML element.
QgsAbstract3DRenderer::readXml
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)=0
Reads renderer's properties from given XML element.
QgsAbstract3DRenderer::clone
virtual QgsAbstract3DRenderer * clone() const =0
Returns a cloned instance.
QgsAbstract3DRenderer::resolveReferences
virtual void resolveReferences(const QgsProject &project)
Resolves references to other objects - second phase of loading - after readXml().
Definition
qgsabstract3drenderer.cpp:18
QgsAbstract3DRenderer::createEntity
virtual Qt3DCore::QEntity * createEntity(Qgs3DMapSettings *map) const =0
Returns a 3D entity that will be used to show renderer's data in 3D scene.
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:38
Qt3DCore
Definition
qgsabstract3drenderer.h:33
qgis_sip.h
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:198
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:133
SIP_ABSTRACT
#define SIP_ABSTRACT
Definition
qgis_sip.h:220
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
SIP_END
#define SIP_END
Definition
qgis_sip.h:215
Generated on
for QGIS API Documentation by
1.15.0