QGIS API Documentation
3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
src
core
3d
qgs3drendererregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgs3drendererregistry.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 QGS3DRENDERERREGISTRY_H
17
#define QGS3DRENDERERREGISTRY_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
#include <QMap>
23
24
class
QDomElement;
25
class
QgsAbstract3DRenderer
;
26
class
QgsReadWriteContext
;
27
28
33
class
CORE_EXPORT
Qgs3DRendererAbstractMetadata
34
{
35
public
:
36
37
virtual
~Qgs3DRendererAbstractMetadata
() =
default
;
38
42
QString type()
const
;
43
48
virtual
QgsAbstract3DRenderer
*
createRenderer
( QDomElement &elem,
const
QgsReadWriteContext
&context ) = 0
SIP_FACTORY
;
49
50
protected
:
51
55
explicit
Qgs3DRendererAbstractMetadata
(
const
QString &type );
56
57
protected
:
59
QString
mType
;
60
};
61
62
67
class
CORE_EXPORT
Qgs3DRendererRegistry
68
{
69
public
:
70
71
Qgs3DRendererRegistry
() =
default
;
72
73
~Qgs3DRendererRegistry
();
74
78
void
addRenderer(
Qgs3DRendererAbstractMetadata
*metadata
SIP_TRANSFER
);
79
83
void
removeRenderer(
const
QString &type );
84
88
Qgs3DRendererAbstractMetadata
*rendererMetadata(
const
QString &type )
const
;
89
93
QStringList renderersList()
const
;
94
95
private
:
96
QMap<QString, Qgs3DRendererAbstractMetadata *> mRenderers;
97
};
98
99
#endif
// QGS3DRENDERERREGISTRY_H
Qgs3DRendererAbstractMetadata
Base metadata class for 3D renderers.
Definition
qgs3drendererregistry.h:34
Qgs3DRendererAbstractMetadata::mType
QString mType
Type used within QGIS for identification (the same what renderer's type() returns)
Definition
qgs3drendererregistry.h:59
Qgs3DRendererAbstractMetadata::~Qgs3DRendererAbstractMetadata
virtual ~Qgs3DRendererAbstractMetadata()=default
Qgs3DRendererAbstractMetadata::createRenderer
virtual QgsAbstract3DRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context)=0
Returns new instance of the renderer given the DOM element.
Qgs3DRendererRegistry
Keeps track of available 3D renderers.
Definition
qgs3drendererregistry.h:68
Qgs3DRendererRegistry::Qgs3DRendererRegistry
Qgs3DRendererRegistry()=default
QgsAbstract3DRenderer
Base class for all renderers that may to participate in 3D view.
Definition
qgsabstract3drenderer.h:48
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
Generated on Mon Oct 28 2024 22:06:03 for QGIS API Documentation by
1.9.8