QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsAbstract3DSymbol Class Referenceabstract

3 More...

#include <qgsabstract3dsymbol.h>

Inheritance diagram for QgsAbstract3DSymbol:
Inheritance graph
[legend]

Public Types

enum class  Property : int { Height = 0 , ExtrusionHeight }
 Data definable properties. More...
 

Public Member Functions

virtual ~QgsAbstract3DSymbol ()=default
 
virtual QgsAbstract3DSymbolclone () const =0
 Returns a new instance of the symbol with the same settings.
 
virtual QList< Qgis::GeometryTypecompatibleGeometryTypes () const
 Returns the list of the vector layer geometry types which are compatible with this symbol.
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the symbol layer's property collection, used for data defined overrides.
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the symbol layer's property collection, used for data defined overrides.
 
virtual bool exportGeometries (Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const
 Exports the geometries contained within the hierarchy of entity.
 
virtual void readXml (const QDomElement &elem, const QgsReadWriteContext &context)=0
 Reads symbol configuration from the given DOM element.
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the symbol layer's property collection, used for data defined overrides.
 
virtual void setDefaultPropertiesFromLayer (const QgsVectorLayer *layer)
 Sets default properties for the symbol based on a layer's configuration.
 
virtual QString type () const =0
 Returns identifier of symbol type. Each 3D symbol implementation should return a different type.
 
virtual void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const =0
 Writes symbol configuration to the given DOM element.
 

Static Public Member Functions

static const QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the symbol layer property definitions.
 

Protected Member Functions

virtual void copyBaseSettings (QgsAbstract3DSymbol *destination) const
 Copies base class settings from this object to a destination object.
 

Protected Attributes

QgsPropertyCollection mDataDefinedProperties
 

Detailed Description

3

Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.

3D symbol objects define appearance of GIS data.

Warning
This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.
Note
Prior to QGIS 3.16 this was available through the QGIS 3D library.

Definition at line 45 of file qgsabstract3dsymbol.h.

Member Enumeration Documentation

◆ Property

enum class QgsAbstract3DSymbol::Property : int
strong

Data definable properties.

Enumerator
Height 

Height (altitude)

ExtrusionHeight 

Extrusion height (zero means no extrusion)

Definition at line 69 of file qgsabstract3dsymbol.h.

Constructor & Destructor Documentation

◆ ~QgsAbstract3DSymbol()

virtual QgsAbstract3DSymbol::~QgsAbstract3DSymbol ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual QgsAbstract3DSymbol * QgsAbstract3DSymbol::clone ( ) const
pure virtual

Returns a new instance of the symbol with the same settings.

Implemented in QgsPoint3DSymbol, and QgsMesh3DSymbol.

◆ compatibleGeometryTypes()

QList< Qgis::GeometryType > QgsAbstract3DSymbol::compatibleGeometryTypes ( ) const
virtual

Returns the list of the vector layer geometry types which are compatible with this symbol.

Since
QGIS 3.16

Reimplemented in QgsPoint3DSymbol.

Definition at line 22 of file qgsabstract3dsymbol.cpp.

◆ copyBaseSettings()

void QgsAbstract3DSymbol::copyBaseSettings ( QgsAbstract3DSymbol destination) const
protectedvirtual

Copies base class settings from this object to a destination object.

Definition at line 33 of file qgsabstract3dsymbol.cpp.

◆ dataDefinedProperties() [1/2]

QgsPropertyCollection & QgsAbstract3DSymbol::dataDefinedProperties ( )
inline

Returns a reference to the symbol layer's property collection, used for data defined overrides.

Definition at line 80 of file qgsabstract3dsymbol.h.

◆ dataDefinedProperties() [2/2]

const QgsPropertyCollection & QgsAbstract3DSymbol::dataDefinedProperties ( ) const
inline

Returns a reference to the symbol layer's property collection, used for data defined overrides.

Definition at line 83 of file qgsabstract3dsymbol.h.

◆ exportGeometries()

bool QgsAbstract3DSymbol::exportGeometries ( Qgs3DSceneExporter exporter,
Qt3DCore::QEntity *  entity,
const QString &  objectNamePrefix 
) const
virtual

Exports the geometries contained within the hierarchy of entity.

Returns whether any objects were exported If this function is not overloaded we don't try to export anything

Reimplemented in QgsPoint3DSymbol.

Definition at line 53 of file qgsabstract3dsymbol.cpp.

◆ propertyDefinitions()

const QgsPropertiesDefinition & QgsAbstract3DSymbol::propertyDefinitions ( )
static

Returns the symbol layer property definitions.

Definition at line 27 of file qgsabstract3dsymbol.cpp.

◆ readXml()

virtual void QgsAbstract3DSymbol::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)
pure virtual

Reads symbol configuration from the given DOM element.

Implemented in QgsMesh3DSymbol, and QgsPoint3DSymbol.

◆ setDataDefinedProperties()

void QgsAbstract3DSymbol::setDataDefinedProperties ( const QgsPropertyCollection collection)
inline

Sets the symbol layer's property collection, used for data defined overrides.

Definition at line 86 of file qgsabstract3dsymbol.h.

◆ setDefaultPropertiesFromLayer()

void QgsAbstract3DSymbol::setDefaultPropertiesFromLayer ( const QgsVectorLayer layer)
virtual

Sets default properties for the symbol based on a layer's configuration.

Since
QGIS 3.26

Reimplemented in QgsPoint3DSymbol.

Definition at line 61 of file qgsabstract3dsymbol.cpp.

◆ type()

virtual QString QgsAbstract3DSymbol::type ( ) const
pure virtual

Returns identifier of symbol type. Each 3D symbol implementation should return a different type.

Implemented in QgsMesh3DSymbol, and QgsPoint3DSymbol.

◆ writeXml()

virtual void QgsAbstract3DSymbol::writeXml ( QDomElement &  elem,
const QgsReadWriteContext context 
) const
pure virtual

Writes symbol configuration to the given DOM element.

Implemented in QgsMesh3DSymbol, and QgsPoint3DSymbol.

Member Data Documentation

◆ mDataDefinedProperties

QgsPropertyCollection QgsAbstract3DSymbol::mDataDefinedProperties
protected

Definition at line 108 of file qgsabstract3dsymbol.h.


The documentation for this class was generated from the following files: