QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
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
52
57 QgsTextBufferSettings &operator=( const QgsTextBufferSettings &other );
58
60
61 bool operator==( const QgsTextBufferSettings &other ) const;
62 bool operator!=( const QgsTextBufferSettings &other ) const;
63
68 bool enabled() const;
69
75 void setEnabled( bool enabled );
76
82 double size() const;
83
90 void setSize( double size );
91
97 Qgis::RenderUnit sizeUnit() const;
98
105 void setSizeUnit( Qgis::RenderUnit unit );
106
113 QgsMapUnitScale sizeMapUnitScale() const;
114
122 void setSizeMapUnitScale( const QgsMapUnitScale &scale );
123
128 QColor color() const;
129
135 void setColor( const QColor &color );
136
143 bool fillBufferInterior() const;
144
151 void setFillBufferInterior( bool fill );
152
158 double opacity() const;
159
166 void setOpacity( double opacity );
167
172 Qt::PenJoinStyle joinStyle() const;
173
179 void setJoinStyle( Qt::PenJoinStyle style );
180
185 QPainter::CompositionMode blendMode() const;
186
192 void setBlendMode( QPainter::CompositionMode mode );
193
198 void readFromLayer( QgsVectorLayer *layer );
199
204 void readXml( const QDomElement &elem );
205
210 QDomElement writeXml( QDomDocument &doc ) const;
211
217 const QgsPaintEffect *paintEffect() const;
218
224 void setPaintEffect( QgsPaintEffect *effect SIP_TRANSFER );
225
230 void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
231
236 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
237
238 private:
239
240 QSharedDataPointer<QgsTextBufferSettingsPrivate> d;
241
242};
243
244#endif // QGSTEXTBUFFERSETTINGS_H
RenderUnit
Rendering size units.
Definition qgis.h:4193
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)