Correctly render qgsMapRendererJob use case steps in docs

This commit is contained in:
Harrissou Sant-anna 2020-09-01 21:39:47 +02:00 committed by Nyall Dawson
parent 97b56fef2e
commit a7bf220394
2 changed files with 10 additions and 10 deletions

View File

@ -25,11 +25,11 @@ amount of time.
Common use case:
# prepare QgsMapSettings with rendering configuration (extent, layer, map size, ...)
# create QgsMapRendererJob subclass with QgsMapSettings instance
# connect to job's :py:func:`~finished` signal
# call :py:func:`~start`. Map rendering will start in background, the function immediately returns
# at some point, slot connected to :py:func:`~finished` signal is called, map rendering is done
1. Prepare QgsMapSettings with rendering configuration (extent, layer, map size, ...)
2. Create QgsMapRendererJob subclass with QgsMapSettings instance
3. Connect to job's :py:func:`~finished` signal
4. Call :py:func:`~start`. Map rendering will start in background, the function immediately returns
5. At some point, slot connected to :py:func:`~finished` signal is called, map rendering is done
It is possible to cancel the rendering job while it is active by calling :py:func:`~cancel` function.

View File

@ -167,11 +167,11 @@ struct LabelRenderJob
*
* Common use case:
*
* # prepare QgsMapSettings with rendering configuration (extent, layer, map size, ...)
* # create QgsMapRendererJob subclass with QgsMapSettings instance
* # connect to job's finished() signal
* # call start(). Map rendering will start in background, the function immediately returns
* # at some point, slot connected to finished() signal is called, map rendering is done
* 1. Prepare QgsMapSettings with rendering configuration (extent, layer, map size, ...)
* 2. Create QgsMapRendererJob subclass with QgsMapSettings instance
* 3. Connect to job's finished() signal
* 4. Call start(). Map rendering will start in background, the function immediately returns
* 5. At some point, slot connected to finished() signal is called, map rendering is done
*
* It is possible to cancel the rendering job while it is active by calling cancel() function.
*