QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsLightSource Class Referenceabstract

3 More...

#include <qgslightsource.h>

Inheritance diagram for QgsLightSource:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsLightSource ()
 
virtual QgsLightSourceclone () const =0
 Returns a copy of the light source.
 
virtual Qt3DCore::QEntity * createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const =0
 Creates an entity representing the light source.
 
virtual void readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())=0
 Reads configuration from a DOM element previously written using writeXml().
 
virtual void resolveReferences (const QgsProject &project)
 After reading from XML, resolve references to any layers that have been read as layer IDs.
 
virtual Qgis::LightSourceType type () const =0
 Returns the light source type.
 
virtual QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const =0
 Writes the light source's configuration to a new DOM element and returns it.
 

Static Public Member Functions

static QgsLightSourcecreateFromXml (const QDomElement &element, const QgsReadWriteContext &context)
 Creates a new light source from an XML element.
 

Detailed Description

3

Base class for light sources in 3d scenes.

Since
QGIS 3.26

Definition at line 46 of file qgslightsource.h.

Constructor & Destructor Documentation

◆ ~QgsLightSource()

QgsLightSource::~QgsLightSource ( )
virtualdefault

Member Function Documentation

◆ clone()

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

Returns a copy of the light source.

Implemented in QgsDirectionalLightSettings, and QgsPointLightSettings.

◆ createEntity()

virtual Qt3DCore::QEntity * QgsLightSource::createEntity ( const Qgs3DMapSettings map,
Qt3DCore::QEntity *  parent 
) const
pure virtual

Creates an entity representing the light source.

Implemented in QgsDirectionalLightSettings, and QgsPointLightSettings.

◆ createFromXml()

QgsLightSource * QgsLightSource::createFromXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)
static

Creates a new light source from an XML element.

Definition at line 30 of file qgslightsource.cpp.

◆ readXml()

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

Reads configuration from a DOM element previously written using writeXml().

See also
writeXml()

Implemented in QgsDirectionalLightSettings, and QgsPointLightSettings.

◆ resolveReferences()

void QgsLightSource::resolveReferences ( const QgsProject project)
virtual

After reading from XML, resolve references to any layers that have been read as layer IDs.

Definition at line 25 of file qgslightsource.cpp.

◆ type()

virtual Qgis::LightSourceType QgsLightSource::type ( ) const
pure virtual

Returns the light source type.

Implemented in QgsDirectionalLightSettings, and QgsPointLightSettings.

◆ writeXml()

virtual QDomElement QgsLightSource::writeXml ( QDomDocument &  doc,
const QgsReadWriteContext context = QgsReadWriteContext() 
) const
pure virtual

Writes the light source's configuration to a new DOM element and returns it.

See also
readXml()

Implemented in QgsDirectionalLightSettings, and QgsPointLightSettings.


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