QGIS API Documentation
4.3.0-Master (0ad0cdb9438)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
textrenderer
qgstextbackgroundsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstextbackgroundsettings.h
3
-----------------
4
begin : May 2020
5
copyright : (C) Nyall Dawson
6
email : nyall dot dawson at gmail 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 QGSTEXTBACKGROUNDSETTINGS_H
17
#define QGSTEXTBACKGROUNDSETTINGS_H
18
19
#include "
qgis.h
"
20
#include "qgis_core.h"
21
#include "
qgis_sip.h
"
22
#include "
qgsmapunitscale.h
"
23
24
#include <QDomElement>
25
#include <QPainter>
26
#include <QPointF>
27
#include <QSharedDataPointer>
28
#include <QSizeF>
29
#include <QString>
30
31
class
QgsMarkerSymbol
;
32
class
QgsFillSymbol
;
33
class
QgsPaintEffect
;
34
class
QgsVectorLayer
;
35
class
QgsReadWriteContext
;
36
class
QgsPropertyCollection
;
37
class
QgsTextBackgroundSettingsPrivate;
38
45
class
CORE_EXPORT
QgsTextBackgroundSettings
46
{
47
public
:
51
enum
ShapeType
52
{
53
ShapeRectangle
= 0,
54
ShapeSquare
,
55
ShapeEllipse
,
56
ShapeCircle
,
57
ShapeSVG
,
58
ShapeMarkerSymbol
,
59
};
60
64
enum
SizeType
65
{
66
SizeBuffer
= 0,
67
SizeFixed
,
68
SizePercent
69
};
70
74
enum
RotationType
75
{
76
RotationSync
= 0,
77
RotationOffset
,
78
RotationFixed
79
};
80
81
QgsTextBackgroundSettings
();
82
83
QgsTextBackgroundSettings
(
const
QgsTextBackgroundSettings
&other );
84
SIP_SKIP
QgsTextBackgroundSettings
(
QgsTextBackgroundSettings
&&other );
85
86
QgsTextBackgroundSettings
&operator=(
const
QgsTextBackgroundSettings
&other );
87
QgsTextBackgroundSettings
&operator=(
QgsTextBackgroundSettings
&&other );
88
89
~QgsTextBackgroundSettings
();
90
91
bool
operator==
(
const
QgsTextBackgroundSettings
&other )
const
;
92
bool
operator!=
(
const
QgsTextBackgroundSettings
&other )
const
;
93
98
bool
enabled()
const
;
99
105
void
setEnabled(
bool
enabled );
106
111
ShapeType type()
const
;
112
118
void
setType( ShapeType type );
119
124
QString svgFile()
const
;
125
132
void
setSvgFile(
const
QString &file );
133
141
QgsMarkerSymbol
*markerSymbol()
const
;
142
150
void
setMarkerSymbol(
QgsMarkerSymbol
*symbol
SIP_TRANSFER
);
151
161
QgsFillSymbol
*fillSymbol()
const
;
162
172
void
setFillSymbol(
QgsFillSymbol
*symbol
SIP_TRANSFER
);
173
180
SizeType sizeType()
const
;
181
189
void
setSizeType( SizeType type );
190
199
QSizeF size()
const
;
200
210
void
setSize( QSizeF size );
211
219
Qgis::RenderUnit
sizeUnit()
const
;
220
229
void
setSizeUnit(
Qgis::RenderUnit
unit );
230
237
QgsMapUnitScale
sizeMapUnitScale()
const
;
238
246
void
setSizeMapUnitScale(
const
QgsMapUnitScale
&scale );
247
253
RotationType rotationType()
const
;
254
261
void
setRotationType( RotationType type );
262
268
double
rotation()
const
;
269
275
void
setRotation(
double
rotation );
276
283
QPointF offset()
const
;
284
292
void
setOffset( QPointF offset );
293
299
Qgis::RenderUnit
offsetUnit()
const
;
300
307
void
setOffsetUnit(
Qgis::RenderUnit
units );
308
315
QgsMapUnitScale
offsetMapUnitScale()
const
;
316
324
void
setOffsetMapUnitScale(
const
QgsMapUnitScale
&scale );
325
332
QSizeF radii()
const
;
333
342
void
setRadii( QSizeF radii );
343
349
Qgis::RenderUnit
radiiUnit()
const
;
350
357
void
setRadiiUnit(
Qgis::RenderUnit
units );
358
365
QgsMapUnitScale
radiiMapUnitScale()
const
;
366
374
void
setRadiiMapUnitScale(
const
QgsMapUnitScale
&scale );
375
381
double
opacity()
const
;
382
389
void
setOpacity(
double
opacity );
390
395
QPainter::CompositionMode blendMode()
const
;
396
402
void
setBlendMode( QPainter::CompositionMode mode );
403
411
QColor fillColor()
const
;
412
421
void
setFillColor(
const
QColor &color );
422
430
QColor strokeColor()
const
;
431
438
void
setStrokeColor(
const
QColor &color );
439
446
double
strokeWidth()
const
;
447
456
void
setStrokeWidth(
double
width );
457
463
Qgis::RenderUnit
strokeWidthUnit()
const
;
464
473
void
setStrokeWidthUnit(
Qgis::RenderUnit
units );
474
481
QgsMapUnitScale
strokeWidthMapUnitScale()
const
;
482
492
void
setStrokeWidthMapUnitScale(
const
QgsMapUnitScale
&scale );
493
498
Qt::PenJoinStyle joinStyle()
const
;
499
507
void
setJoinStyle( Qt::PenJoinStyle style );
508
514
const
QgsPaintEffect
*paintEffect()
const
;
515
521
void
setPaintEffect(
QgsPaintEffect
*effect
SIP_TRANSFER
);
522
527
void
readFromLayer(
QgsVectorLayer
*layer );
528
533
void
readXml(
const
QDomElement &elem,
const
QgsReadWriteContext
&context );
534
539
QDomElement writeXml( QDomDocument &doc,
const
QgsReadWriteContext
&context )
const
;
540
548
void
updateDataDefinedProperties(
QgsRenderContext
&context,
const
QgsPropertyCollection
&properties );
549
554
void
upgradeDataDefinedProperties(
QgsPropertyCollection
&properties )
SIP_SKIP
;
555
560
QSet<QString> referencedFields(
const
QgsRenderContext
&context )
const
;
561
562
private
:
563
QSharedDataPointer<QgsTextBackgroundSettingsPrivate> d;
564
};
565
566
#endif
// QGSTEXTBACKGROUNDSETTINGS_H
Qgis::RenderUnit
RenderUnit
Rendering size units.
Definition
qgis.h:5758
QgsFillSymbol
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Definition
qgsfillsymbol.h:30
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition
qgsmapunitscale.h:37
QgsMarkerSymbol
A marker symbol type, for rendering Point and MultiPoint geometries.
Definition
qgsmarkersymbol.h:31
QgsPaintEffect
Base class for visual effects which can be applied to QPicture drawings.
Definition
qgspainteffect.h:59
QgsPropertyCollection
A grouped map of multiple QgsProperty objects, each referenced by an integer key value.
Definition
qgspropertycollection.h:348
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:38
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:63
QgsTextBackgroundSettings
Container for settings relating to a text background object.
Definition
qgstextbackgroundsettings.h:46
QgsTextBackgroundSettings::SizeType
SizeType
Methods for determining the background shape size.
Definition
qgstextbackgroundsettings.h:65
QgsTextBackgroundSettings::SizeFixed
@ SizeFixed
Fixed size.
Definition
qgstextbackgroundsettings.h:67
QgsTextBackgroundSettings::SizePercent
@ SizePercent
Shape size is determined by percent of text size.
Definition
qgstextbackgroundsettings.h:68
QgsTextBackgroundSettings::SizeBuffer
@ SizeBuffer
Shape size is determined by adding a buffer margin around text.
Definition
qgstextbackgroundsettings.h:66
QgsTextBackgroundSettings::QgsTextBackgroundSettings
QgsTextBackgroundSettings()
Definition
qgstextbackgroundsettings.cpp:34
QgsTextBackgroundSettings::ShapeType
ShapeType
Background shape types.
Definition
qgstextbackgroundsettings.h:52
QgsTextBackgroundSettings::ShapeCircle
@ ShapeCircle
Circle.
Definition
qgstextbackgroundsettings.h:56
QgsTextBackgroundSettings::ShapeMarkerSymbol
@ ShapeMarkerSymbol
Marker symbol.
Definition
qgstextbackgroundsettings.h:58
QgsTextBackgroundSettings::ShapeSquare
@ ShapeSquare
Square - buffered sizes only.
Definition
qgstextbackgroundsettings.h:54
QgsTextBackgroundSettings::ShapeRectangle
@ ShapeRectangle
Rectangle.
Definition
qgstextbackgroundsettings.h:53
QgsTextBackgroundSettings::ShapeSVG
@ ShapeSVG
SVG file.
Definition
qgstextbackgroundsettings.h:57
QgsTextBackgroundSettings::ShapeEllipse
@ ShapeEllipse
Ellipse.
Definition
qgstextbackgroundsettings.h:55
QgsTextBackgroundSettings::RotationType
RotationType
Methods for determining the rotation of the background shape.
Definition
qgstextbackgroundsettings.h:75
QgsTextBackgroundSettings::RotationOffset
@ RotationOffset
Shape rotation is offset from text rotation.
Definition
qgstextbackgroundsettings.h:77
QgsTextBackgroundSettings::RotationSync
@ RotationSync
Shape rotation is synced with text rotation.
Definition
qgstextbackgroundsettings.h:76
QgsTextBackgroundSettings::RotationFixed
@ RotationFixed
Shape rotation is a fixed angle.
Definition
qgstextbackgroundsettings.h:78
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis.h
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:427
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:432
qgsmapunitscale.h
Generated on
for QGIS API Documentation by
1.17.0