QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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
QgsMergedFeatureRenderer::dump
QString dump() const override
Returns debug information about this renderer.
Definition: qgsmergedfeaturerenderer.cpp:402
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:34
QgsMergedFeatureRenderer::save
QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) override
Stores renderer properties to an XML element.
Definition: qgsmergedfeaturerenderer.cpp:439
qgsexpression.h
qgsmergedfeaturerenderer.h
qgsfeature.h
qgis.h
QgsMergedFeatureRenderer::operator=
QgsMergedFeatureRenderer & operator=(const QgsMergedFeatureRenderer &)=delete
Direct copies are forbidden. Use clone() instead.
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsMergedFeatureRenderer::MergeAndInvert
@ MergeAndInvert
Merge and invert features (polygons only)
Definition: qgsmergedfeaturerenderer.h:136
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
qgsrenderer.h
QgsMergedFeatureRenderer::convertFromRenderer
static QgsMergedFeatureRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsMergedFeatureRenderer by a conversion from an existing renderer.
Definition: qgsmergedfeaturerenderer.cpp:554
qgsgeometry.h
QgsFeatureRenderer
Definition: qgsrenderer.h:101
QgsMergedFeatureRenderer::InvertOnly
@ InvertOnly
Invert features only (polygons only)
Definition: qgsmergedfeaturerenderer.h:135
QgsMergedFeatureRenderer
QgsMergedFeatureRenderer is a polygon or line-only feature renderer used to renderer a set of feature...
Definition: qgsmergedfeaturerenderer.h:40
QgsMergedFeatureRenderer::create
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a renderer out of an XML, for loading.
Definition: qgsmergedfeaturerenderer.cpp:426
QgsMergedFeatureRenderer::clone
QgsMergedFeatureRenderer * clone() const override
Create a deep copy of this renderer.
Definition: qgsmergedfeaturerenderer.cpp:411
QgsInvertedPolygonRenderer
QgsInvertedPolygonRenderer is a polygon-only feature renderer used to display features inverted,...
Definition: qgsinvertedpolygonrenderer.h:42