15 #ifndef QGSINVERTEDPOLYGONRENDERER_H 16 #define QGSINVERTEDPOLYGONRENDERER_H 18 #include "qgis_core.h" 22 #include "qgsexpression.h" 78 QString
dump()
const override;
83 QgsFeatureRenderer::Capabilities
capabilities()
override;
155 std::unique_ptr<QgsFeatureRenderer> mSubRenderer;
158 struct CombinedFeature
160 QVector<QgsGeometry> geometries;
163 typedef QVector<CombinedFeature> FeatureCategoryVector;
165 FeatureCategoryVector mFeaturesCategories;
168 QMap<QByteArray, int> mSymbolCategories;
183 struct FeatureDecoration
189 FeatureDecoration(
QgsFeature &a_feature,
bool a_selected,
bool a_drawMarkers,
int a_layer )
190 : feature( a_feature )
191 , selected( a_selected )
192 , drawMarkers( a_drawMarkers )
196 QList<FeatureDecoration> mFeatureDecorations;
199 bool mPreprocessingEnabled =
false;
203 #endif // QGSMASKRENDERERV2_H virtual bool willRenderFeature(QgsFeature &feat, QgsRenderContext &context)
Returns whether the renderer will render a feature or not.
The class is used as a container of context for various read/write operations on other objects...
virtual QgsSymbolList originalSymbolsForFeature(QgsFeature &feat, QgsRenderContext &context)
Equivalent of originalSymbolsForFeature() call extended to support renderers that may use more symbol...
virtual QgsLegendSymbolList legendSymbolItems() const
Returns a list of symbology items for the legend.
QList< QgsLegendSymbolItem > QgsLegendSymbolList
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
store renderer info to XML element
virtual QgsSymbol * originalSymbolForFeature(QgsFeature &feature, QgsRenderContext &context)
Return symbol for feature.
QVector< QgsPolylineXY > QgsPolygonXY
Polygon: first item of the list is outer ring, inner rings (if any) start from second item...
Container of fields for a vector layer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Return a list of attributes required by this renderer.
QList< QgsSymbol * > QgsSymbolList
virtual QgsSymbolList symbolsForFeature(QgsFeature &feat, QgsRenderContext &context)
Returns list of symbols used for rendering the feature.
QgsInvertedPolygonRenderer is a polygon-only feature renderer used to display features inverted...
bool preprocessingEnabled() const
void setPreprocessingEnabled(bool enabled)
virtual bool legendSymbolItemChecked(const QString &key)
items of symbology items in legend is checked
virtual void checkLegendSymbolItem(const QString &key, bool state=true)
item in symbology was checked
virtual void setLegendSymbolItem(const QString &key, QgsSymbol *symbol)
Sets the symbol to be used for a legend symbol item.
virtual void setEmbeddedRenderer(QgsFeatureRenderer *subRenderer)
Sets an embedded renderer (subrenderer) for this feature renderer.
virtual QgsSymbolList symbols(QgsRenderContext &context)
Returns list of symbols used by the renderer.
virtual const QgsFeatureRenderer * embeddedRenderer() const
Returns the current embedded renderer (subrenderer) for this feature renderer.
virtual QgsSymbol * symbolForFeature(QgsFeature &feature, QgsRenderContext &context)=0
To be overridden.
Contains information about the context of a rendering operation.
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual bool legendSymbolItemsCheckable() const
items of symbology items in legend should be checkable
virtual QgsFeatureRenderer::Capabilities capabilities()
Returns details about internals of this renderer.
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
virtual bool renderFeature(QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false)
Render a feature using this renderer in the given context.
virtual QString dump() const
Returns debug information about this renderer.