QGIS API Documentation 3.99.0-Master (a8f284845db)
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
22#include <memory>
23#include <tuple>
24#include <vector>
25
26#include "qgis_core.h"
27#include "qgis_sip.h"
28#include "qgsmaplayerrenderer.h"
29
30#include <QPainter>
31
32#define SIP_NO_FILE
33
34class QgsGroupLayer;
35class QgsFeedback;
36class QgsPaintEffect;
38
47{
48 public:
49
55 QgsFeedback *feedback() const override;
56 bool render() override;
57 bool forceRasterRender() const override;
58
59 private:
60 std::unique_ptr< QgsFeedback > mFeedback;
61 bool mForceRasterRender = false;
62 std::vector< std::unique_ptr< QgsMapLayerRenderer > > mChildRenderers;
63 std::vector< QPainter::CompositionMode > mRendererCompositionModes;
64 std::vector< double > mRendererOpacity;
65 std::vector< QgsCoordinateTransform > mTransforms;
66 double mLayerOpacity = 1.0;
67 std::unique_ptr< QgsPaintEffect > mPaintEffect;
68
69};
70
71#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.