QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsmaprendererparalleljob.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaprendererparalleljob.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 QGSMAPRENDERERPARALLELJOB_H
17 #define QGSMAPRENDERERPARALLELJOB_H
18 
19 #include "qgsmaprendererjob.h"
20 
30 {
31  Q_OBJECT
32  public:
33  QgsMapRendererParallelJob( const QgsMapSettings& settings );
35 
36  virtual void start() override;
37  virtual void cancel() override;
38  virtual void cancelWithoutBlocking() override;
39  virtual void waitForFinished() override;
40  virtual bool isActive() const override;
41 
42  virtual QgsLabelingResults* takeLabelingResults() override;
43 
44  // from QgsMapRendererJobWithPreview
45  virtual QImage renderedImage() override;
46 
47  protected slots:
49  void renderLayersFinished();
51  void renderingFinished();
52 
53  protected:
54 
55  static void renderLayerStatic( LayerRenderJob& job );
56  static void renderLabelsStatic( QgsMapRendererParallelJob* self );
57 
58  protected:
59 
61 
63  enum { Idle, RenderingLayers, RenderingLabels } mStatus;
64 
67 
69 
77 
78  private slots:
79 
80  void renderLayersFinishedWhenJobCanceled();
81 };
82 
83 
84 #endif // QGSMAPRENDERERPARALLELJOB_H
The QgsLabelingEngineV2 class provides map labeling functionality.
QgsPalLabeling * mLabelingEngine
Old labeling engine.
virtual QImage renderedImage()=0
Get a preview/resulting image.
QFutureWatcher< void > mFutureWatcher
The QgsMapSettings class contains configuration for rendering of the map.
Job implementation that renders all layers in parallel.
virtual void waitForFinished()=0
Block until the job has finished.
virtual void start()=0
Start the rendering job and immediately return.
QgsLabelingEngineV2 * mLabelingEngineV2
New labeling engine.
Contains information about the context of a rendering operation.
Intermediate base class adding functionality that allows client to query the rendered image...
QFutureWatcher< void > mLabelingFutureWatcher
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.
Class that stores computed placement from labeling engine.
virtual QgsLabelingResults * takeLabelingResults()=0
Get pointer to internal labeling engine (in order to get access to the results)
virtual bool isActive() const =0
Tell whether the rendering job is currently running in background.
Structure keeping low-level rendering job information.