2017-04-21 11:47:37 +07:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsmaprenderertask.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMapRendererTask : QgsTask
|
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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.
|
|
|
|
|
2017-04-21 11:47:37 +07:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmaprenderertask.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum ErrorType
|
|
|
|
{
|
|
|
|
ImageAllocationFail,
|
|
|
|
ImageSaveFail
|
|
|
|
};
|
|
|
|
|
|
|
|
QgsMapRendererTask( const QgsMapSettings &ms,
|
|
|
|
const QString &fileName,
|
2017-07-18 10:47:06 +07:00
|
|
|
const QString &fileFormat = QString( "PNG" ),
|
|
|
|
const bool forceRaster = false );
|
2017-04-21 11:47:37 +07:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsMapRendererTask to render a map to an image file.
|
2017-04-21 11:47:37 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsMapRendererTask( const QgsMapSettings &ms,
|
|
|
|
QPainter *p );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsMapRendererTask to render a map to a QPainter object.
|
2017-04-21 11:47:37 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
void addAnnotations( QList< QgsAnnotation * > annotations );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Adds ``annotations`` to be rendered on the map.
|
2017-04-21 11:47:37 +07:00
|
|
|
%End
|
|
|
|
|
2017-09-11 21:19:22 +10:00
|
|
|
void addDecorations( const QList<QgsMapDecoration *> &decorations );
|
2017-04-23 13:02:42 +07:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Adds ``decorations`` to be rendered on the map.
|
2017-04-23 13:02:42 +07:00
|
|
|
%End
|
|
|
|
|
2017-05-01 12:09:55 +07:00
|
|
|
void setSaveWorldFile( bool save );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether a world file will be created alongside an image file.
|
2017-05-01 12:09:55 +07:00
|
|
|
%End
|
|
|
|
|
2017-04-23 13:07:04 +10:00
|
|
|
virtual void cancel();
|
|
|
|
|
|
|
|
|
2017-04-21 11:47:37 +07:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void renderingComplete();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when the map rendering is successfully completed.
|
2017-04-21 11:47:37 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
void errorOccurred( int error );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when map rendering failed.
|
2017-04-21 11:47:37 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool run();
|
|
|
|
virtual void finished( bool result );
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-09-25 14:20:39 +10:00
|
|
|
|
2017-04-21 11:47:37 +07:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsmaprenderertask.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|