Subgroup: Vector
Class: QgsVectorLayerExporterTask¶
-
class
qgis.core.
QgsVectorLayerExporterTask
¶ Bases:
qgis._core.QgsTask
QgsTask task which performs a QgsVectorLayerExporter layer export operation as a background task. This can be used to export a vector layer out to a provider without blocking the QGIS interface.
New in version 3.0.
See also
See also
Methods
addSubTask
Adds a subtask to this task. blockSignals
canCancel
Returns true if the task can be canceled. cancel
childEvent
children
connectNotify
customEvent
deleteLater
dependentLayers
Returns the list of layers on which the task depends. description
Returns the task’s description. disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] finished
flags
Returns the flags associated with the task. fromFunction
Creates a new QgsTask task from a python function. hold
Places the task on hold. inherits
installEventFilter
isActive
Returns true if the task is active, ie it is not complete and has not been canceled. isCanceled
isSignalConnected
isWidgetType
isWindowType
killTimer
metaObject
moveToThread
objectName
parent
progress
Returns the task’s progress (between 0.0 and 100.0) property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeEventFilter
run
sender
senderSignalIndex
setDependentLayers
Sets a list of layers on which the task depends. setObjectName
setParent
setProgress
setProperty
signalsBlocked
startTimer
status
Returns the current task status. thread
timerEvent
tr
unhold
Releases the task from being held. waitForFinished
Blocks the current thread until the task finishes or a maximum of timeout
milliseconds.withLayerOwnership
Creates a new QgsVectorLayerExporterTask which has ownership over a source layer
.Attributes
AllFlags
CanCancel
Complete
OnHold
ParentDependsOnSubTask
Queued
Running
SubTaskIndependent
Terminated
begun
Will be emitted by task to indicate its commencement. destroyed
destroyed(self, QObject = None) [signal] errorOccurred
Emitted when an error occurs which prevented the layer being exported (or if the task is canceled). exportComplete
Emitted when exporting the layer is successfully completed. objectNameChanged
objectNameChanged(self, str) [signal] progressChanged
Will be emitted by task when its progress changes. staticMetaObject
statusChanged
Will be emitted by task when its status changes. taskCompleted
Will be emitted by task to indicate its successful completion. taskTerminated
Will be emitted by task if it has terminated for any reason other then completion (e.g., when a task has been canceled or encountered an internal error). -
cancel
(self)¶
-
childEvent
()¶
-
connectNotify
()¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
errorOccurred
¶ Emitted when an error occurs which prevented the layer being exported (or if the task is canceled). The export
error
anderrorMessage
will be reported. [signal]
-
exportComplete
¶ Emitted when exporting the layer is successfully completed. [signal]
-
finished
(self, result: bool)¶
-
isCanceled
()¶
-
isSignalConnected
()¶
-
receivers
()¶
-
run
(self) → bool¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setProgress
()¶
-
timerEvent
()¶
-
withLayerOwnership
(layer: QgsVectorLayer, uri: str, providerKey: str, destinationCrs: QgsCoordinateReferenceSystem, options: Dict[str, Any] = {}) → QgsVectorLayerExporterTask¶ Creates a new QgsVectorLayerExporterTask which has ownership over a source
layer
. When the export task has completed (successfully or otherwise)layer
will be deleted. The destinationuri
andproviderKey
, and various export related parameters such as destination CRS and exportoptions
must be specified.
-