16 #ifndef QGSMAPRENDERERJOB_H 17 #define QGSMAPRENDERERJOB_H 19 #include "qgis_core.h" 21 #include <QFutureWatcher> 56 bool imageInitialized =
false;
58 QPainter::CompositionMode blendMode;
67 typedef QList<LayerRenderJob> LayerRenderJobs;
81 QImage *img =
nullptr;
85 bool canUseCache =
false;
87 bool complete =
false;
89 int renderingTime = -1;
91 QList< QPointer< QgsMapLayer > > participatingLayers;
133 virtual void start() = 0;
139 virtual void cancel() = 0;
146 virtual void cancelWithoutBlocking() = 0;
149 virtual void waitForFinished() = 0;
152 virtual bool isActive()
const = 0;
161 virtual bool usedCachedLabels()
const = 0;
188 Error(
const QString &lid,
const QString &msg )
197 typedef QList<QgsMapRendererJob::Error>
Errors;
200 Errors errors()
const;
220 QHash< QgsMapLayer *, int > perLayerRenderingTime()
const SIP_SKIP;
244 void renderingLayersFinished();
257 int mRenderingTime = 0;
267 bool prepareLabelCache() const SIP_SKIP;
270 LayerRenderJobs prepareJobs( QPainter *painter,
QgsLabelingEngine *labelingEngine2 ) SIP_SKIP;
277 LabelRenderJob prepareLabelingJob( QPainter *painter,
QgsLabelingEngine *labelingEngine2,
bool canUseLabelCache = true ) SIP_SKIP;
280 static QImage composeImage( const
QgsMapSettings &settings, const LayerRenderJobs &jobs, const LabelRenderJob &labelJob ) SIP_SKIP;
283 void logRenderingTime( const LayerRenderJobs &jobs, const LabelRenderJob &labelJob ) SIP_SKIP;
286 void cleanupJobs( LayerRenderJobs &jobs ) SIP_SKIP;
294 void cleanupLabelJob( LabelRenderJob &job ) SIP_SKIP;
337 virtual QImage renderedImage() = 0;
342 #endif // QGSMAPRENDERERJOB_H A rectangle specified with double values.
Base class for all map layer types.
Abstract base class for map rendering implementations.
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.
int renderingTime() const
Returns the total time it took to finish the job (in milliseconds).
void setFeatureFilterProvider(const QgsFeatureFilterProvider *f)
Set the feature filter provider used by the QgsRenderContext of each LayerRenderJob.
The QgsMapSettings class contains configuration for rendering of the map.
QHash< QgsWeakMapLayerPointer, int > mPerLayerRenderingTime
Render time (in ms) per layer, by layer ID.
const QgsFeatureFilterProvider * featureFilterProvider() const
Returns the feature filter provider used by the QgsRenderContext of each LayerRenderJob.
Abstract interface for use by classes that filter the features of a layer.
The QgsLabelingEngine class provides map labeling functionality.
Contains information about the context of a rendering operation.
QList< QgsMapRendererJob::Error > Errors
Intermediate base class adding functionality that allows client to query the rendered image...
Base class for utility classes that encapsulate information necessary for rendering of map layers...
Class that stores computed placement from labeling engine.
This class is responsible for keeping cache of rendered images resulting from a map rendering job...
Error(const QString &lid, const QString &msg)