QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsabstract3dsymbol.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsabstract3dsymbol.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 "qgsabstract3dsymbol.h"
17 
18 
19 QgsPropertiesDefinition QgsAbstract3DSymbol::sPropertyDefinitions;
20 
21 
23 {
24  initPropertyDefinitions();
25  return sPropertyDefinitions;
26 }
27 
28 void QgsAbstract3DSymbol::initPropertyDefinitions()
29 {
30  if ( !sPropertyDefinitions.isEmpty() )
31  return;
32 
33  QString origin = QStringLiteral( "symbol3d" );
34 
35  sPropertyDefinitions = QgsPropertiesDefinition
36  {
37  { PropertyHeight, QgsPropertyDefinition( "height", QObject::tr( "Height" ), QgsPropertyDefinition::Double, origin ) },
38  { PropertyExtrusionHeight, QgsPropertyDefinition( "extrusionHeight", QObject::tr( "ExtrusionHeight" ), QgsPropertyDefinition::DoublePositive, origin ) },
39  };
40 
41 }
QgsPropertyDefinition::Double
@ Double
Double value (including negative values)
Definition: qgsproperty.h:58
QgsAbstract3DSymbol::PropertyHeight
@ PropertyHeight
Height (altitude)
Definition: qgsabstract3dsymbol.h:59
qgsabstract3dsymbol.h
QgsPropertiesDefinition
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Definition: qgspropertycollection.h:29
QgsAbstract3DSymbol::PropertyExtrusionHeight
@ PropertyExtrusionHeight
Extrusion height (zero means no extrusion)
Definition: qgsabstract3dsymbol.h:60
QgsAbstract3DSymbol::propertyDefinitions
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the symbol layer property definitions.
Definition: qgsabstract3dsymbol.cpp:22
QgsPropertyDefinition
Definition for a property.
Definition: qgsproperty.h:47
QgsPropertyDefinition::DoublePositive
@ DoublePositive
Positive double value (including 0)
Definition: qgsproperty.h:59