mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-09 00:35:20 -05:00
69 lines
2.8 KiB
Plaintext
69 lines
2.8 KiB
Plaintext
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/core/qgsrenderedfeaturehandlerinterface.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
class QgsRenderedFeatureHandlerInterface
|
||
|
{
|
||
|
%Docstring
|
||
|
|
||
|
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.
|
||
|
|
||
|
.. versionadded:: 3.10
|
||
|
%End
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include "qgsrenderedfeaturehandlerinterface.h"
|
||
|
%End
|
||
|
public:
|
||
|
virtual ~QgsRenderedFeatureHandlerInterface();
|
||
|
|
||
|
struct RenderedFeatureContext
|
||
|
{
|
||
|
bool dummy;
|
||
|
};
|
||
|
|
||
|
virtual void handleRenderedFeature( const QgsFeature &feature, const QgsGeometry &renderedBounds, const QgsRenderedFeatureHandlerInterface::RenderedFeatureContext &context ) = 0;
|
||
|
%Docstring
|
||
|
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).
|
||
|
|
||
|
.. warning::
|
||
|
|
||
|
This method may be called from many different threads (for multi-threaded map render operations),
|
||
|
and accordingly care must be taken to ensure that handleRenderedFeature() implementations are
|
||
|
appropriately thread safe.
|
||
|
|
||
|
The ``context`` argument is used to provide additional context relating to the rendering of a feature.
|
||
|
%End
|
||
|
|
||
|
};
|
||
|
|
||
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/core/qgsrenderedfeaturehandlerinterface.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|