QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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 }
Extrusion height (zero means no extrusion)
Positive double value (including 0)
Definition: qgsproperty.h:58
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the symbol layer property definitions.
Double value (including negative values)
Definition: qgsproperty.h:57
Definition for a property.
Definition: qgsproperty.h:46
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.