18 #ifndef QGSMAPRENDERERTASK_H
19 #define QGSMAPRENDERERTASK_H
22 #include "qgis_core.h"
55 ImageAllocationFail = 1,
57 ImageUnsupportedFormat
68 const QString &fileName,
69 const QString &fileFormat = QString(
"PNG" ),
70 bool forceRaster =
false,
74 const QString &fileName,
75 const QString &fileFormat = QString(
"PNG" ),
76 bool forceRaster =
false );
90 void addAnnotations(
const QList<QgsAnnotation *> &annotations );
95 void addDecorations(
const QList<QgsMapDecoration *> &decorations );
124 void finished(
bool result )
override;
130 bool mErrored =
false;
135 std::unique_ptr< QgsMapRendererJob > mJob;
137 std::unique_ptr< QgsAbstractGeoPdfExporter > mGeoPdfExporter;
138 std::unique_ptr< QgsRenderedFeatureHandlerInterface > mRenderedFeatureHandler;
140 QPainter *mPainter =
nullptr;
141 QPainter *mDestPainter =
nullptr;
143 #ifndef QT_NO_PRINTER
144 std::unique_ptr< QPrinter > mPrinter;
145 #endif // ! QT_NO_PRINTER
147 std::unique_ptr< QPainter > mTempPainter;
151 bool mForceRaster =
false;
152 bool mSaveWorldFile =
false;
153 bool mExportMetadata =
false;
154 bool mGeoPDF =
false;
157 QList< QgsAnnotation * > mAnnotations;
158 QList< QgsMapDecoration * > mDecorations;
159 QMap< QString, QString> mLayerIdToLayerNameMap;
160 QStringList mMapLayerOrder;