QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslightsource.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslightsource.h
3  ---------------
4  begin : April 2022
5  copyright : (C) 2022 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSLIGHTSOURCE_H
19 #define QGSLIGHTSOURCE_H
20 
21 #include "qgis_3d.h"
22 #include "qgis.h"
23 #include "qgis_sip.h"
24 #include "qgsreadwritecontext.h"
25 
26 #include <QList>
27 
28 class Qgs3DMapSettings;
29 class QgsProject;
30 class QDomElement;
31 class QDomDocument;
32 
33 #ifndef SIP_RUN
34 namespace Qt3DCore
35 {
36  class QEntity;
37 }
38 #endif
39 
46 class _3D_EXPORT QgsLightSource SIP_ABSTRACT
47 {
48 
49  public:
50 
51  virtual ~QgsLightSource();
52 
56  virtual Qgis::LightSourceType type() const = 0;
57 
61  virtual QgsLightSource *clone() const = 0 SIP_FACTORY;
62 
66  virtual Qt3DCore::QEntity *createEntity( const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent ) const = 0 SIP_SKIP;
67 
73  virtual QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context = QgsReadWriteContext() ) const = 0;
74 
80  virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context = QgsReadWriteContext() ) = 0;
81 
85  virtual void resolveReferences( const QgsProject &project );
86 
90  static QgsLightSource *createFromXml( const QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
91 };
92 
93 
94 #endif // QGSLIGHTSOURCE_H
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:34
qgsreadwritecontext.h
qgis.h
QgsLightSource
Base class for light sources in 3d scenes.
Definition: qgslightsource.h:46
Qgis::LightSourceType
LightSourceType
Light source types for 3D scenes.
Definition: qgis.h:1837
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:103
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
Qt3DCore
Definition: qgsabstract3drenderer.h:30
qgis_sip.h
Qgs3DMapSettings
Definition of the world.
Definition: qgs3dmapsettings.h:57
SIP_ABSTRACT
#define SIP_ABSTRACT
Definition: qgis_sip.h:208