1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/maprenderer/qgsmaprenderertask.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsMapRendererTask : QgsTask
{
%Docstring(signature="appended")
:py:class:`QgsTask` task which draws a map to an image file or a painter
as a background task. This can be used to draw maps without blocking the
QGIS interface.
%End
%TypeHeaderCode
#include "qgsmaprenderertask.h"
%End
public:
enum ErrorType /BaseType=IntEnum/
{
ImageAllocationFail,
ImageSaveFail,
ImageUnsupportedFormat
};
QgsMapRendererTask( const QgsMapSettings &ms,
const QString &fileName,
const QString &fileFormat = QString( "PNG" ),
bool forceRaster = false,
QgsTask::Flags flags = QgsTask::CanCancel );
%Docstring
Constructor for QgsMapRendererTask to render a map to an image file.
Since QGIS 3.26 the optional ``flags`` argument can be used to control
the task flags.
%End
QgsMapRendererTask( const QgsMapSettings &ms,
QPainter *p );
%Docstring
Constructor for QgsMapRendererTask to render a map to a QPainter object.
%End
~QgsMapRendererTask();
void addAnnotations( const QList<QgsAnnotation *> &annotations );
%Docstring
Adds ``annotations`` to be rendered on the map.
%End
void addDecorations( const QList<QgsMapDecoration *> &decorations );
%Docstring
Adds ``decorations`` to be rendered on the map.
%End
void setSaveWorldFile( bool save );
%Docstring
Sets whether the image file will be georeferenced (embedded or via a
world file).
%End
void setExportMetadata( bool exportMetadata );
%Docstring
Sets whether metadata such as title and subject will be exported
whenever possible.
%End
virtual void cancel();
signals:
void renderingComplete();
%Docstring
Emitted when the map rendering is successfully completed.
%End
void errorOccurred( int error );
%Docstring
Emitted when map rendering failed.
%End
protected:
virtual bool run();
virtual void finished( bool result );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/maprenderer/qgsmaprenderertask.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|