18 #ifndef QGSMAPRENDERERTASK_H
19 #define QGSMAPRENDERERTASK_H
22 #include "qgis_core.h"
55 ImageAllocationFail = 1,
57 ImageUnsupportedFormat
71 const QString &fileName,
72 const QString &fileFormat = QString(
"PNG" ),
73 bool forceRaster =
false,
84 const QString &fileName,
85 const QString &fileFormat = QString(
"PNG" ),
86 bool forceRaster =
false,
101 void addAnnotations(
const QList<QgsAnnotation *> &annotations );
106 void addDecorations(
const QList<QgsMapDecoration *> &decorations );
125 void renderingComplete();
130 void errorOccurred(
int error );
135 void finished(
bool result )
override;
141 bool mErrored =
false;
146 std::unique_ptr< QgsMapRendererJob > mJob;
148 std::unique_ptr< QgsAbstractGeoPdfExporter > mGeoPdfExporter;
149 std::unique_ptr< QgsRenderedFeatureHandlerInterface > mRenderedFeatureHandler;
151 QPainter *mPainter =
nullptr;
152 QPainter *mDestPainter =
nullptr;
154 #ifndef QT_NO_PRINTER
155 std::unique_ptr< QPrinter > mPrinter;
156 #endif // ! QT_NO_PRINTER
158 std::unique_ptr< QPainter > mTempPainter;
162 bool mForceRaster =
false;
163 bool mSaveWorldFile =
false;
164 bool mExportMetadata =
false;
165 bool mGeoPDF =
false;
168 QList< QgsAnnotation * > mAnnotations;
169 QList< QgsMapDecoration * > mDecorations;
170 QMap< QString, QString> mLayerIdToLayerNameMap;
171 QStringList mMapLayerOrder;