QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
An interface for classes which provider custom handlers for features rendered as part of a map render job. More...
#include <qgsrenderedfeaturehandlerinterface.h>
Classes | |
struct | RenderedFeatureContext |
Public Member Functions | |
virtual | ~QgsRenderedFeatureHandlerInterface ()=default |
virtual void | handleRenderedFeature (const QgsFeature &feature, const QgsGeometry &renderedBounds, const QgsRenderedFeatureHandlerInterface::RenderedFeatureContext &context)=0 |
Called whenever a feature is rendered during a map render job. More... | |
virtual QSet< QString > | usedAttributes (QgsVectorLayer *layer, const QgsRenderContext &context) const |
Returns a list of attributes required by this handler, for the specified layer. More... | |
An interface for classes which provider custom handlers for features rendered as part of a map render job.
QgsRenderedFeatureHandlerInterface objects are registered in the QgsMapSettings objects used to construct map render jobs. During the rendering operation, the handleRenderedFeature() method will be called once for every rendered feature, allowing the handler to perform some custom task based on the provided information.
They can be used for custom tasks which operate on a set of rendered features, such as creating spatial indexes of the location and rendered symbology bounding box of all features rendered on a map.
Definition at line 46 of file qgsrenderedfeaturehandlerinterface.h.
|
virtualdefault |
|
pure virtual |
Called whenever a feature is rendered during a map render job.
The renderedBounds argument specifies the (approximate) bounds of the rendered feature's symbology. E.g. for point geometry features, this will be the bounding box of the marker symbol used to symbolize the point. renderedBounds geometries are specified in painter units (not map units).
The context argument is used to provide additional context relating to the rendering of a feature.
|
inlinevirtual |
Returns a list of attributes required by this handler, for the specified layer.
Attributes not listed in here may not be requested from the provider at rendering time.
Definition at line 93 of file qgsrenderedfeaturehandlerinterface.h.