QGIS API Documentation  3.20.0-Odense (decaadbb31)
qgsinvertedpolygonrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsinvertedpolygonrenderer.h
3  ---------------------
4  begin : April 2014
5  copyright : (C) 2014 Hugo Mercier / Oslandia
6  email : hugo dot mercier at oslandia 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 #ifndef QGSINVERTEDPOLYGONRENDERER_H
16 #define QGSINVERTEDPOLYGONRENDERER_H
17 
18 #include "qgis_core.h"
19 #include "qgis_sip.h"
20 #include "qgis.h"
21 #include "qgsrenderer.h"
22 #include "qgsexpression.h"
23 #include "qgsfeature.h"
24 #include "qgsgeometry.h"
26 
43 {
44  public:
45 
51  QgsInvertedPolygonRenderer( QgsFeatureRenderer *embeddedRenderer SIP_TRANSFER = nullptr );
52 
57 
59 
60  QString dump() const override;
61 
63  static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
64 
65  QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) override;
66 
68  bool preprocessingEnabled() const { return mOperation == MergeAndInvert; }
69 
76  void setPreprocessingEnabled( bool enabled ) { mOperation = enabled ? MergeAndInvert : InvertOnly; }
77 
84 
85 };
86 
87 
88 #endif // QGSINVERTEDPOLYGONRENDERER_H
QgsInvertedPolygonRenderer is a polygon-only feature renderer used to display features inverted,...
QgsInvertedPolygonRenderer & operator=(const QgsInvertedPolygonRenderer &)=delete
Direct copies are forbidden. Use clone() instead.
QgsInvertedPolygonRenderer(const QgsInvertedPolygonRenderer &)=delete
Direct copies are forbidden. Use clone() instead.
QgsMergedFeatureRenderer is a polygon or line-only feature renderer used to renderer a set of feature...
@ InvertOnly
Invert features only (polygons only)
@ MergeAndInvert
Merge and invert features (polygons only)
static QgsMergedFeatureRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsMergedFeatureRenderer by a conversion from an existing renderer.
QgsMergedFeatureRenderer * clone() const override
Create a deep copy of this renderer.
The class is used as a container of context for various read/write operations on other objects.
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_FACTORY
Definition: qgis_sip.h:76