QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgsmasksymbollayer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmasksymbollayer.h
3 ---------------------
4 begin : July 2019
5 copyright : (C) 2019 by Hugo Mercier
6 email : hugo dot mercier at oslandia dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSMASKSYMBOLLAYER_H
17#define QGSMASKSYMBOLLAYER_H
18
19#include "qgis_core.h"
20#include "qgis.h"
21#include "qgssymbollayer.h"
22
23class QgsPaintEffect;
24class QgsMarkerSymbol;
26
35{
36 public:
39
41
49 static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
50
51 QgsMaskMarkerSymbolLayer *clone() const override SIP_FACTORY;
52 QgsSymbol *subSymbol() override;
53 bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) override;
54 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
55 bool hasDataDefinedProperties() const override;
56
57 QVariantMap properties() const override;
58
59 QString layerType() const override;
60 void startRender( QgsSymbolRenderContext &context ) override;
61 void stopRender( QgsSymbolRenderContext &context ) override;
62 void renderPoint( QPointF point, QgsSymbolRenderContext &context ) override;
63 QRectF bounds( QPointF point, QgsSymbolRenderContext &context ) override;
64 bool usesMapUnits() const override;
65 void setOutputUnit( Qgis::RenderUnit unit ) override;
66 QColor color() const override;
67
68 virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) override;
69
71 bool enabled() const;
72
78 QList<QgsSymbolLayerReference> masks() const override;
79
85 void setMasks( const QList<QgsSymbolLayerReference> &maskedLayers );
86
87 private:
88#ifdef SIP_RUN
90#endif
91
93 std::unique_ptr<QgsMarkerSymbol> mSymbol;
94
96 QList<QgsSymbolLayerReference> mMaskedSymbolLayers;
97
98 std::unique_ptr<QgsPaintEffect> mEffect;
99};
100
101#endif
102
103
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:55
Abstract base class for marker symbol layers.
A marker symbol type, for rendering Point and MultiPoint geometries.
Special symbol layer that uses its sub symbol as a selective mask.
~QgsMaskMarkerSymbolLayer() override
Base class for visual effects which can be applied to QPicture drawings.
Contains information about the context of a rendering operation.
Type used to refer to a specific symbol layer in a symbol of a layer.
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:93
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_FACTORY
Definition: qgis_sip.h:76