QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
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
42class CORE_EXPORT QgsTextBufferSettings
43{
44 public:
45
47
53
58 QgsTextBufferSettings &operator=( const QgsTextBufferSettings &other );
59
61
62 bool operator==( const QgsTextBufferSettings &other ) const;
63 bool operator!=( const QgsTextBufferSettings &other ) const;
64
69 bool enabled() const;
70
76 void setEnabled( bool enabled );
77
83 double size() const;
84
91 void setSize( double size );
92
98 Qgis::RenderUnit sizeUnit() const;
99
106 void setSizeUnit( Qgis::RenderUnit unit );
107
114 QgsMapUnitScale sizeMapUnitScale() const;
115
123 void setSizeMapUnitScale( const QgsMapUnitScale &scale );
124
129 QColor color() const;
130
136 void setColor( const QColor &color );
137
144 bool fillBufferInterior() const;
145
152 void setFillBufferInterior( bool fill );
153
159 double opacity() const;
160
167 void setOpacity( double opacity );
168
173 Qt::PenJoinStyle joinStyle() const;
174
180 void setJoinStyle( Qt::PenJoinStyle style );
181
186 QPainter::CompositionMode blendMode() const;
187
193 void setBlendMode( QPainter::CompositionMode mode );
194
199 void readFromLayer( QgsVectorLayer *layer );
200
205 void readXml( const QDomElement &elem );
206
211 QDomElement writeXml( QDomDocument &doc ) const;
212
218 const QgsPaintEffect *paintEffect() const;
219
225 void setPaintEffect( QgsPaintEffect *effect SIP_TRANSFER );
226
231 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
232
237 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
238
239 private:
240
241 QSharedDataPointer<QgsTextBufferSettingsPrivate> d;
242
243};
244
245#endif // QGSTEXTBUFFERSETTINGS_H
RenderUnit
Rendering size units.
Definition: qgis.h:3176
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)