QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgsgrouplayerrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgrouplayerrenderer.h
3  ----------------
4  Date : September 2021
5  Copyright : (C) 2021 by Nyall Dawson
6  Email : nyall dot dawson at gmail 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 QGSGROUPLAYERRENDERER_H
19 #define QGSGROUPLAYERRENDERER_H
20 
21 #define SIP_NO_FILE
22 
23 #include "qgis_core.h"
24 #include "qgis_sip.h"
25 #include "qgsmaplayerrenderer.h"
26 #include <QPainter>
27 #include <tuple>
28 #include <vector>
29 #include <memory>
30 
31 class QgsGroupLayer;
32 class QgsFeedback;
33 class QgsPaintEffect;
35 
43 class CORE_EXPORT QgsGroupLayerRenderer : public QgsMapLayerRenderer
44 {
45  public:
46 
52  QgsFeedback *feedback() const override;
53  bool render() override;
54  bool forceRasterRender() const override;
55 
56  private:
57  std::unique_ptr< QgsFeedback > mFeedback;
58  bool mForceRasterRender = false;
59  std::vector< std::unique_ptr< QgsMapLayerRenderer > > mChildRenderers;
60  std::vector< QPainter::CompositionMode > mRendererCompositionModes;
61  std::vector< double > mRendererOpacity;
62  std::vector< QgsCoordinateTransform > mTransforms;
63  double mLayerOpacity = 1.0;
64  std::unique_ptr< QgsPaintEffect > mPaintEffect;
65 
66 };
67 
68 #endif // QGSGROUPLAYERRENDERER_H
Class for doing transforms between two map coordinate systems.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
Implementation of threaded rendering for group layers.
~QgsGroupLayerRenderer() override
A map layer which consists of a set of child layers, where all component layers are rendered as a sin...
Definition: qgsgrouplayer.h:42
Base class for utility classes that encapsulate information necessary for rendering of map layers.
virtual bool render()=0
Do the rendering (based on data stored in the class).
virtual QgsFeedback * feedback() const
Access to feedback object of the layer renderer (may be nullptr)
virtual bool forceRasterRender() const
Returns true if the renderer must be rendered to a raster paint device (e.g.
Base class for visual effects which can be applied to QPicture drawings.
Contains information about the context of a rendering operation.