Subgroup: Map
Class: QgsMapRendererTask¶
-
class
qgis.core.
QgsMapRendererTask
¶ Bases:
qgis._core.QgsTask
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.
New in version 3.0: Methods
addAnnotations
Adds annotations
to be rendered on the map.addDecorations
Adds decorations
to be rendered on the map.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
setSaveWorldFile
Sets whether a world file will be created alongside an image file. 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.Attributes
AllFlags
CanCancel
Complete
ImageAllocationFail
ImageSaveFail
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 map rendering failed. objectNameChanged
objectNameChanged(self, str) [signal] progressChanged
Will be emitted by task when its progress changes. renderingComplete
Emitted when the map rendering is successfully completed. 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). -
class
ErrorType
¶ Bases:
int
-
ImageAllocationFail
= 1¶
-
ImageSaveFail
= 2¶
-
addAnnotations
(self, annotations: object)¶ Adds
annotations
to be rendered on the map.
-
addDecorations
(self, decorations: object)¶ Adds
decorations
to be rendered on the map.
-
cancel
(self)¶
-
childEvent
()¶
-
connectNotify
()¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
errorOccurred
¶ Emitted when map rendering failed. [signal]
-
finished
(self, result: bool)¶
-
isCanceled
()¶
-
isSignalConnected
()¶
-
receivers
()¶
-
renderingComplete
¶ Emitted when the map rendering is successfully completed. [signal]
-
run
(self) → bool¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setProgress
()¶
-
setSaveWorldFile
(self, save: bool)¶ Sets whether a world file will be created alongside an image file.
-
timerEvent
()¶
-
class