QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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
42{
43 public:
44
50 QgsInvertedPolygonRenderer( QgsFeatureRenderer *embeddedRenderer SIP_TRANSFER = nullptr );
51
56
58
59 QString dump() const override;
60
62 static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY; // cppcheck-suppress duplInheritedMember
63
64 QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) override;
65
67 bool preprocessingEnabled() const { return mOperation == MergeAndInvert; }
68
75 void setPreprocessingEnabled( bool enabled ) { mOperation = enabled ? MergeAndInvert : InvertOnly; }
76
81 static QgsInvertedPolygonRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; // cppcheck-suppress duplInheritedMember
82
83};
84
85
86#endif // QGSINVERTEDPOLYGONRENDERER_H
Abstract base class for all 2D vector feature renderers.
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