QGIS/python/core/auto_generated/qgsvectorfilewritertask.sip.in

78 lines
2.6 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorfilewritertask.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsVectorFileWriterTask : QgsTask
{
%Docstring(signature="appended")
:py:class:`QgsTask` task which performs a :py:class:`QgsVectorFileWriter` layer saving operation as a background
task. This can be used to save a vector layer out to a file without blocking the
QGIS interface.
.. seealso:: :py:class:`QgsVectorLayerExporterTask`
.. seealso:: :py:class:`QgsRasterFileWriterTask`
%End
%TypeHeaderCode
#include "qgsvectorfilewritertask.h"
%End
public:
QgsVectorFileWriterTask( QgsVectorLayer *layer,
const QString &fileName,
const QgsVectorFileWriter::SaveVectorOptions &options,
QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags() );
%Docstring
Constructor for QgsVectorFileWriterTask. Takes a source ``layer``, destination ``fileName``
and save ``options``.
Since QGIS 3.40 the ``sinkFlags`` can be specified.
%End
virtual void cancel();
signals:
void writeComplete( const QString &newFilename );
%Docstring
Emitted when writing the layer is successfully completed. The ``newFilename``
parameter indicates the file path for the written file.
.. note::
this signal is deprecated in favor of :py:func:`~QgsVectorFileWriterTask.completed`.
%End
void errorOccurred( int error, const QString &errorMessage );
%Docstring
Emitted when an error occurs which prevented the file being written (or if
the task is canceled). The writing ``error`` and ``errorMessage`` will be reported.
%End
protected:
virtual bool run();
virtual void finished( bool result );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsvectorfilewritertask.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/