QGIS API Documentation  3.24.2-Tisler (13c1a02865)
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 
16 #include "qgs3drendererregistry.h"
17 
18 
20  : mType( type )
21 {
22 }
23 
25 {
26  return mType;
27 }
28 
29 
30 // ----------
31 
32 
34 {
35  qDeleteAll( mRenderers );
36 }
37 
39 {
40  mRenderers.insert( metadata->type(), metadata );
41 }
42 
43 void Qgs3DRendererRegistry::removeRenderer( const QString &type )
44 {
45  delete mRenderers.take( type );
46 }
47 
49 {
50  return mRenderers.value( type );
51 }
52 
54 {
55  return mRenderers.keys();
56 }
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.