QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmaprendererjobproxy.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaprendererjobproxy.h
3  ------------------------
4  begin : January 2017
5  copyright : (C) 2017 by Paul Blottiere
6  email : paul dot blottiere at oslandia dot com
7 ***************************************************************************/
8 
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17 
18 #ifndef QGSMAPRENDERERJOBPROXY_H
19 #define QGSMAPRENDERERJOBPROXY_H
20 
21 #include "qgsmapsettings.h"
22 #include "qgsmaprendererjob.h"
23 
25 
26 namespace QgsWms
27 {
28 
36  {
37  public:
38 
47  bool parallelRendering
48  , int maxThreads
49  , QgsFeatureFilterProvider *featureFilterProvider
50  );
51 
57  void render( const QgsMapSettings &mapSettings, QImage *image );
58 
63  QPainter *takePainter();
64 
69  QgsMapRendererJob::Errors errors() const { return mErrors; }
70 
71  private:
72  bool mParallelRendering;
73  QgsFeatureFilterProvider *mFeatureFilterProvider = nullptr;
74  std::unique_ptr<QPainter> mPainter;
75 
76  void getRenderErrors( const QgsMapRendererJob *job );
77 
80  };
81 
82 
83 }
84 #endif
QgsWms::QgsMapRendererJobProxy
Proxy for sequential or parallel map render job.
Definition: qgsmaprendererjobproxy.h:35
qgsmapsettings.h
QgsWms::QgsMapRendererJobProxy::takePainter
QPainter * takePainter()
Takes ownership of the painter used for rendering.
Definition: qgsmaprendererjobproxy.cpp:101
QgsWms::QgsMapRendererJobProxy::QgsMapRendererJobProxy
QgsMapRendererJobProxy(bool parallelRendering, int maxThreads, QgsFeatureFilterProvider *featureFilterProvider)
Constructor for QgsMapRendererJobProxy.
Definition: qgsmaprendererjobproxy.cpp:41
qgsmaprendererjob.h
QgsWms
Median cut implementation.
Definition: qgsdxfwriter.cpp:22
QgsMapRendererJob
Abstract base class for map rendering implementations.
Definition: qgsmaprendererjob.h:269
QgsFeatureFilterProvider
Abstract interface for use by classes that filter the features or attributes of a layer.
Definition: qgsfeaturefilterprovider.h:43
QgsMapRendererJob::Errors
QList< QgsMapRendererJob::Error > Errors
Definition: qgsmaprendererjob.h:365
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map. The rendering itself is don...
Definition: qgsmapsettings.h:88
QgsWms::QgsMapRendererJobProxy::errors
QgsMapRendererJob::Errors errors() const
Returns map rendering errors.
Definition: qgsmaprendererjobproxy.h:69
QgsWms::QgsMapRendererJobProxy::render
void render(const QgsMapSettings &mapSettings, QImage *image)
Sequential or parallel map rendering.
Definition: qgsmaprendererjobproxy.cpp:64