16 #ifndef QGSMAPRENDERERJOB_H 17 #define QGSMAPRENDERERJOB_H 19 #include "qgis_core.h" 21 #include <QFutureWatcher> 50 bool imageInitialized =
false;
52 QPainter::CompositionMode blendMode;
60 typedef QList<LayerRenderJob> LayerRenderJobs;
74 QImage *img =
nullptr;
78 bool canUseCache =
false;
80 bool complete =
false;
82 int renderingTime = -1;
84 QList< QPointer< QgsMapLayer > > participatingLayers;
126 virtual void start() = 0;
132 virtual void cancel() = 0;
139 virtual void cancelWithoutBlocking() = 0;
142 virtual void waitForFinished() = 0;
145 virtual bool isActive()
const = 0;
154 virtual bool usedCachedLabels()
const = 0;
181 Error(
const QString &lid,
const QString &msg )
190 typedef QList<QgsMapRendererJob::Error>
Errors;
193 Errors errors()
const;
213 QHash< QgsMapLayer *, int > perLayerRenderingTime()
const SIP_SKIP;
237 void renderingLayersFinished();
250 int mRenderingTime = 0;
260 bool prepareLabelCache() const SIP_SKIP;
263 LayerRenderJobs prepareJobs( QPainter *painter,
QgsLabelingEngine *labelingEngine2 ) SIP_SKIP;
270 LabelRenderJob prepareLabelingJob( QPainter *painter,
QgsLabelingEngine *labelingEngine2,
bool canUseLabelCache = true ) SIP_SKIP;
273 static QImage composeImage( const
QgsMapSettings &settings, const LayerRenderJobs &jobs, const LabelRenderJob &labelJob ) SIP_SKIP;
276 void logRenderingTime( const LayerRenderJobs &jobs, const LabelRenderJob &labelJob ) SIP_SKIP;
279 void cleanupJobs( LayerRenderJobs &jobs ) SIP_SKIP;
287 void cleanupLabelJob( LabelRenderJob &job ) SIP_SKIP;
330 virtual QImage renderedImage() = 0;
335 #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)