QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgstextbuffersettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstextbuffersettings.h
3 -----------------
4 begin : May 2020
5 copyright : (C) Nyall Dawson
6 email : nyall dot dawson at gmail dot com
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 QGSTEXTBUFFERSETTINGS_H
18#define QGSTEXTBUFFERSETTINGS_H
19
20#include "qgis_sip.h"
21#include "qgis_core.h"
22#include "qgsmapunitscale.h"
23#include "qgis.h"
24
25#include <QSharedData>
26#include <QPainter>
27#include <QDomElement>
28
30class QgsTextBufferSettingsPrivate;
31class QgsVectorLayer;
32class QgsPaintEffect;
34
41class CORE_EXPORT QgsTextBufferSettings
42{
43 public:
44
46
48
49 QgsTextBufferSettings &operator=( const QgsTextBufferSettings &other );
50
52
53 bool operator==( const QgsTextBufferSettings &other ) const;
54 bool operator!=( const QgsTextBufferSettings &other ) const;
55
60 bool enabled() const;
61
67 void setEnabled( bool enabled );
68
74 double size() const;
75
82 void setSize( double size );
83
89 Qgis::RenderUnit sizeUnit() const;
90
97 void setSizeUnit( Qgis::RenderUnit unit );
98
105 QgsMapUnitScale sizeMapUnitScale() const;
106
114 void setSizeMapUnitScale( const QgsMapUnitScale &scale );
115
120 QColor color() const;
121
127 void setColor( const QColor &color );
128
135 bool fillBufferInterior() const;
136
143 void setFillBufferInterior( bool fill );
144
150 double opacity() const;
151
158 void setOpacity( double opacity );
159
164 Qt::PenJoinStyle joinStyle() const;
165
171 void setJoinStyle( Qt::PenJoinStyle style );
172
177 QPainter::CompositionMode blendMode() const;
178
184 void setBlendMode( QPainter::CompositionMode mode );
185
190 void readFromLayer( QgsVectorLayer *layer );
191
196 void readXml( const QDomElement &elem );
197
202 QDomElement writeXml( QDomDocument &doc ) const;
203
209 const QgsPaintEffect *paintEffect() const;
210
216 void setPaintEffect( QgsPaintEffect *effect SIP_TRANSFER );
217
222 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
223
228 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
229
230 private:
231
232 QSharedDataPointer<QgsTextBufferSettingsPrivate> d;
233
234};
235
236#endif // QGSTEXTBUFFERSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:4847
Struct for storing maximum and minimum scales for measurements in map units.
Base class for visual effects which can be applied to QPicture drawings.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
Container for settings relating to a text buffer.
Represents a vector layer which manages a vector based data sets.
#define SIP_TRANSFER
Definition qgis_sip.h:36
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)