18 #ifndef QGSMAPRENDERERTASK_H 19 #define QGSMAPRENDERERTASK_H 22 #include "qgis_core.h" 49 ImageAllocationFail = 1,
57 const QString &fileName,
58 const QString &fileFormat = QString(
"PNG" ),
59 const bool forceRaster =
false );
70 void addAnnotations( QList< QgsAnnotation * > annotations );
75 void addDecorations(
const QList<QgsMapDecoration *> &decorations );
89 void renderingComplete();
94 void errorOccurred(
int error );
99 void finished(
bool result )
override;
106 std::unique_ptr< QgsMapRendererCustomPainterJob > mJob;
108 QPainter *mPainter =
nullptr;
112 bool mForceRaster =
false;
113 bool mSaveWorldFile =
false;
115 QList< QgsAnnotation * > mAnnotations;
116 QList< QgsMapDecoration * > mDecorations;
Job implementation that renders everything sequentially using a custom painter.
void setSaveWorldFile(bool save)
Sets whether a world file will be created alongside an image file.
QgsTask task which draws a map to an image file or a painter as a background task.
The QgsMapSettings class contains configuration for rendering of the map.
Abstract base class for long running background tasks.
virtual void cancel()
Notifies the task that it should terminate.
virtual void finished(bool result)
If the task is managed by a QgsTaskManager, this will be called after the task has finished (whether ...
virtual bool run()=0
Performs the task's operation.