QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 
22 QList<QgsWkbTypes::GeometryType> QgsAbstract3DSymbol::compatibleGeometryTypes() const
23 {
24  return QList< QgsWkbTypes::GeometryType >();
25 }
26 
28 {
29  initPropertyDefinitions();
30  return sPropertyDefinitions;
31 }
32 
34 {
36 }
37 
38 void QgsAbstract3DSymbol::initPropertyDefinitions()
39 {
40  if ( !sPropertyDefinitions.isEmpty() )
41  return;
42 
43  const QString origin = QStringLiteral( "symbol3d" );
44 
45  sPropertyDefinitions = QgsPropertiesDefinition
46  {
47  { PropertyHeight, QgsPropertyDefinition( "height", QObject::tr( "Height" ), QgsPropertyDefinition::Double, origin ) },
48  { PropertyExtrusionHeight, QgsPropertyDefinition( "extrusionHeight", QObject::tr( "ExtrusionHeight" ), QgsPropertyDefinition::DoublePositive, origin ) },
49  };
50 
51 }
52 
53 bool QgsAbstract3DSymbol::exportGeometries( Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix ) const
54 {
55  Q_UNUSED( exporter )
56  Q_UNUSED( entity )
57  Q_UNUSED( objectNamePrefix )
58  return false;
59 }
60 
62 {
63 
64 }
QgsPropertyDefinition::Double
@ Double
Double value (including negative values)
Definition: qgsproperty.h:57
QgsAbstract3DSymbol::copyBaseSettings
virtual void copyBaseSettings(QgsAbstract3DSymbol *destination) const
Copies base class settings from this object to a destination object.
Definition: qgsabstract3dsymbol.cpp:33
QgsAbstract3DSymbol::PropertyHeight
@ PropertyHeight
Height (altitude)
Definition: qgsabstract3dsymbol.h:71
qgsabstract3dsymbol.h
QgsAbstract3DSymbol::compatibleGeometryTypes
virtual QList< QgsWkbTypes::GeometryType > compatibleGeometryTypes() const
Returns the list of the vector layer geometry types which are compatible with this symbol.
Definition: qgsabstract3dsymbol.cpp:22
QgsAbstract3DSymbol
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
Definition: qgsabstract3dsymbol.h:46
QgsPropertiesDefinition
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Definition: qgspropertycollection.h:29
Qgs3DSceneExporter
Entity that handles the exporting of 3D scene.
Definition: qgs3dsceneexporter.h:55
QgsAbstract3DSymbol::PropertyExtrusionHeight
@ PropertyExtrusionHeight
Extrusion height (zero means no extrusion)
Definition: qgsabstract3dsymbol.h:72
QgsAbstract3DSymbol::propertyDefinitions
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the symbol layer property definitions.
Definition: qgsabstract3dsymbol.cpp:27
QgsPropertyDefinition
Definition for a property.
Definition: qgsproperty.h:46
QgsAbstract3DSymbol::mDataDefinedProperties
QgsPropertyCollection mDataDefinedProperties
Definition: qgsabstract3dsymbol.h:107
QgsAbstract3DSymbol::exportGeometries
virtual bool exportGeometries(Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const
Exports the geometries contained within the hierarchy of entity.
Definition: qgsabstract3dsymbol.cpp:53
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:391
QgsAbstract3DSymbol::setDefaultPropertiesFromLayer
virtual void setDefaultPropertiesFromLayer(const QgsVectorLayer *layer)
Sets default properties for the symbol based on a layer's configuration.
Definition: qgsabstract3dsymbol.cpp:61
QgsPropertyDefinition::DoublePositive
@ DoublePositive
Positive double value (including 0)
Definition: qgsproperty.h:58