QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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 <memory>
24#include <tuple>
25#include <vector>
26
27#include "qgis_core.h"
28#include "qgis_sip.h"
29#include "qgsmaplayerrenderer.h"
30
31#include <QPainter>
32
33class QgsGroupLayer;
34class QgsFeedback;
35class QgsPaintEffect;
37
46{
47 public:
48
54 QgsFeedback *feedback() const override;
55 bool render() override;
56 bool forceRasterRender() const override;
57
58 private:
59 std::unique_ptr< QgsFeedback > mFeedback;
60 bool mForceRasterRender = false;
61 std::vector< std::unique_ptr< QgsMapLayerRenderer > > mChildRenderers;
62 std::vector< QPainter::CompositionMode > mRendererCompositionModes;
63 std::vector< double > mRendererOpacity;
64 std::vector< QgsCoordinateTransform > mTransforms;
65 double mLayerOpacity = 1.0;
66 std::unique_ptr< QgsPaintEffect > mPaintEffect;
67
68};
69
70#endif // QGSGROUPLAYERRENDERER_H
Handles coordinate transforms between two coordinate systems.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
~QgsGroupLayerRenderer() override
QgsGroupLayerRenderer(QgsGroupLayer *layer, QgsRenderContext &context)
Constructor for a QgsGroupLayerRenderer, for the specified layer.
A map layer which consists of a set of child layers, where all component layers are rendered as a sin...
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.
QgsMapLayerRenderer(const QString &layerID, QgsRenderContext *context=nullptr)
Constructor for QgsMapLayerRenderer, with the associated layerID and render context.
Base class for visual effects which can be applied to QPicture drawings.
Contains information about the context of a rendering operation.