QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgsmaprenderersequentialjob.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaprenderersequentialjob.h
3  --------------------------------------
4  Date : December 2013
5  Copyright : (C) 2013 by Martin Dobias
6  Email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSMAPRENDERERSEQUENTIALJOB_H
17 #define QGSMAPRENDERERSEQUENTIALJOB_H
18 
19 #include "qgis_core.h"
20 #include "qgsmaprendererjob.h"
21 
23 
34 {
35  Q_OBJECT
36  public:
38  ~QgsMapRendererSequentialJob() override;
39 
40  void cancel() override;
41  void cancelWithoutBlocking() override;
42  void waitForFinished() override;
43  bool isActive() const override;
44 
45  bool usedCachedLabels() const override;
47 
48  // from QgsMapRendererJobWithPreview
49  QImage renderedImage() override;
50 
51  public slots:
52 
53  void internalFinished();
54 
55  private:
56 
57  void startPrivate() override;
58 
59  QgsMapRendererCustomPainterJob *mInternalJob = nullptr;
60  QImage mImage;
61  QPainter *mPainter = nullptr;
62  std::unique_ptr< QgsLabelingResults > mLabelingResults;
63  bool mUsedCachedLabels = false;
64 
65 };
66 
67 
68 #endif // QGSMAPRENDERERSEQUENTIALJOB_H
Class that stores computed placement from labeling engine.
Job implementation that renders everything sequentially using a custom painter.
virtual void waitForFinished()=0
Block until the job has finished.
virtual QgsLabelingResults * takeLabelingResults()=0
Gets pointer to internal labeling engine (in order to get access to the results).
virtual bool usedCachedLabels() const =0
Returns true if the render job was able to use a cached labeling solution.
virtual bool isActive() const =0
Tell whether the rendering job is currently running in background.
virtual void cancel()=0
Stop the rendering job - does not return until the job has terminated.
virtual void cancelWithoutBlocking()=0
Triggers cancellation of the rendering job without blocking.
Intermediate base class adding functionality that allows client to query the rendered image.
virtual QImage renderedImage()=0
Gets a preview/resulting image.
Job implementation that renders everything sequentially in one thread.
The QgsMapSettings class contains configuration for rendering of the map.
#define SIP_TRANSFER
Definition: qgis_sip.h:36