QGIS API Documentation  3.17.0-Master (a035f434f4)
qgsskyboxsettings.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsskyboxsettings.h
3  --------------------------------------
4  Date : August 2020
5  Copyright : (C) 2020 by Belgacem Nedjima
6  Email : gb uderscore nedjima at esi dot dz
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 #ifndef QGSSKYBOXSETTINGS_H
17 #define QGSSKYBOXSETTINGS_H
18 
19 #include <QString>
20 #include <QMap>
21 
22 #include "qgis_3d.h"
23 #include "qgsskyboxentity.h"
24 
26 class QDomElement;
27 
28 #define SIP_NO_FILE
29 
35 class _3D_EXPORT QgsSkyboxSettings
36 {
37  public:
39  QgsSkyboxSettings() = default;
41  QgsSkyboxSettings( const QgsSkyboxSettings &other );
43  QgsSkyboxSettings &operator=( QgsSkyboxSettings const &rhs );
44 
46  void readXml( const QDomElement &element, const QgsReadWriteContext &context );
48  void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const;
49 
51  QgsSkyboxEntity::SkyboxType skyboxType() const { return mSkyboxType; }
53  void setSkyboxType( QgsSkyboxEntity::SkyboxType type ) { mSkyboxType = type; }
54 
56  QString panoramicTexturePath() const { return mPanoramicTexturePath; }
58  void setPanoramicTexturePath( const QString &texturePath ) { mPanoramicTexturePath = texturePath; }
59 
64  QMap<QString, QString> cubeMapFacesPaths() const { return mCubeMapFacesPaths; }
65 
70  void setCubeMapFace( const QString &face, const QString &path ) { mCubeMapFacesPaths[face] = path; }
71 
72  private:
73  QgsSkyboxEntity::SkyboxType mSkyboxType;
74  //
75  QString mPanoramicTexturePath;
76  //
77  QMap<QString, QString> mCubeMapFacesPaths;
78 };
79 
80 #endif // QGSSKYBOXSETTINGS_H
The class is used as a container of context for various read/write operations on other objects...
class containing the configuration of a skybox entity 3
QMap< QString, QString > cubeMapFacesPaths() const
Returns a map containing the path of each texture specified by the user.
void setCubeMapFace(const QString &face, const QString &path)
Sets a face of one of the skybox 6 textures The face parameter needs to be one of the followings: "po...
QgsSkyboxEntity::SkyboxType skyboxType() const
Returns the type of the skybox.
QString panoramicTexturePath() const
Returns the panoramic texture path of a skybox of type "Panormaic skybox".
SkyboxType
Skybox type enumeration.
void setSkyboxType(QgsSkyboxEntity::SkyboxType type)
Sets the type of the skybox.
void setPanoramicTexturePath(const QString &texturePath)
Sets the panoramic texture path of a skybox of type "Panoramic skybox".