QGIS API Documentation 3.99.0-Master (c03dd32cbdd)
Loading...
Searching...
No Matches
qgsannotationlayerrenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsannotationlayerrenderer.h
3 ----------------
4 copyright : (C) 2019 by Sandro Mani
5 email : smani at sourcepole dot ch
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSANNOTATIONLAYERRENDERER_H
18#define QGSANNOTATIONLAYERRENDERER_H
19
20
21#include <memory>
22#include <tuple>
23#include <vector>
24
25#include "qgis_core.h"
26#include "qgis_sip.h"
27#include "qgsannotationitem.h"
28#include "qgsmaplayerrenderer.h"
29
30#define SIP_NO_FILE
31
33class QgsPaintEffect;
34
43{
44 public:
45
51 QgsFeedback *feedback() const override;
52 bool render() override;
53 bool forceRasterRender() const override;
54
55 private:
56 std::vector < std::pair< QString, std::unique_ptr< QgsAnnotationItem > > > mItems;
57 std::unique_ptr< QgsFeedback > mFeedback;
58 QString mLayerName;
59 double mLayerOpacity = 1.0;
60 QPainter::CompositionMode mLayerBlendMode = QPainter::CompositionMode::CompositionMode_SourceOver;
61 std::unique_ptr< QgsPaintEffect > mPaintEffect;
62
63};
64
65#endif // QGSANNOTATIONLAYERRENDERER_H
~QgsAnnotationLayerRenderer() override
QgsAnnotationLayerRenderer(QgsAnnotationLayer *layer, QgsRenderContext &context)
Constructor for a QgsAnnotationLayerRenderer, for the specified layer.
Represents a map layer containing a set of georeferenced annotations, e.g.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
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.