QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgs3drendererregistry.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgs3drendererregistry.cpp
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
17
22
24{
25 return mType;
26}
27
28
29// ----------
30
31
33{
34 qDeleteAll( mRenderers );
35}
36
38{
39 mRenderers.insert( metadata->type(), metadata );
40}
41
42void Qgs3DRendererRegistry::removeRenderer( const QString &type )
43{
44 delete mRenderers.take( type );
45}
46
48{
49 return mRenderers.value( type );
50}
51
53{
54 return mRenderers.keys();
55}
Base metadata class for 3D renderers.
QString mType
Type used within QGIS for identification (the same what renderer's type() returns).
Qgs3DRendererAbstractMetadata(const QString &type)
Constructor of the base class.
QString type() const
Returns unique identifier of the 3D renderer class.
void removeRenderer(const QString &type)
Unregisters a 3D renderer type.
QStringList renderersList() const
Returns a list of all available 3D renderer types.
Qgs3DRendererAbstractMetadata * rendererMetadata(const QString &type) const
Returns metadata for a 3D renderer type (may be used to create a new instance of the type).
void addRenderer(Qgs3DRendererAbstractMetadata *metadata)
Registers a new 3D renderer type.