QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsabstract3dsymbol.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsabstract3dsymbol.h
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 #ifndef QGSABSTRACT3DSYMBOL_H
17 #define QGSABSTRACT3DSYMBOL_H
18 
19 #include "qgis_3d.h"
20 #include "qgis_sip.h"
21 
22 #include "qgspropertycollection.h"
23 
24 class QDomElement;
25 class QString;
26 
28 
29 
41 class _3D_EXPORT QgsAbstract3DSymbol
42 {
43  public:
44  virtual ~QgsAbstract3DSymbol() = default;
45 
47  virtual QString type() const = 0;
49  virtual QgsAbstract3DSymbol *clone() const = 0 SIP_FACTORY;
50 
52  virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const = 0;
54  virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) = 0;
55 
57  enum Property
58  {
59  PropertyHeight = 0,
61  };
62 
64  static const QgsPropertiesDefinition &propertyDefinitions();
65 
67  QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
68 
70  const QgsPropertyCollection &dataDefinedProperties() const { return mDataDefinedProperties; } SIP_SKIP
71 
73  void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
74 
75  protected:
77 
78  private:
79  static void initPropertyDefinitions();
80 
82  static QgsPropertiesDefinition sPropertyDefinitions;
83 };
84 
85 
86 #endif // QGSABSTRACT3DSYMBOL_H
The class is used as a container of context for various read/write operations on other objects...
QgsPropertyCollection mDataDefinedProperties
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the symbol layer's property collection, used for data defined overrides...
Extrusion height (zero means no extrusion)
3 Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the symbol layer's property collection, used for data defined overrides...
#define SIP_SKIP
Definition: qgis_sip.h:119
#define SIP_FACTORY
Definition: qgis_sip.h:69
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the symbol layer&#39;s property collection, used for data defined overrides.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Property
Data definable properties.