QGIS API Documentation  3.6.0-Noosa (5873452)
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 
44 {
45  delete mRenderers.take( type );
46 }
47 
49 {
50  return mRenderers.value( type );
51 }
52 
54 {
55  return mRenderers.keys();
56 }
QString type() const
Returns unique identifier of the 3D renderer class.
QStringList renderersList() const
Returns a list of all available 3D renderer types.
void addRenderer(Qgs3DRendererAbstractMetadata *metadata)
Registers a new 3D renderer type.
void removeRenderer(const QString &type)
Unregisters a 3D renderer type.
Qgs3DRendererAbstractMetadata(const QString &type)
Constructor of the base class.
Qgs3DRendererAbstractMetadata * rendererMetadata(const QString &type) const
Returns metadata for a 3D renderer type (may be used to create a new instance of the type) ...
Base metadata class for 3D renderers.
QString mType
Type used within QGIS for identification (the same what renderer's type() returns) ...