17 #ifndef QGSTEXTRENDERER_PRIVATE_H
18 #define QGSTEXTRENDERER_PRIVATE_H
22 #include "qgis_core.h"
33 #include <QSharedData>
48 class QgsTextBufferSettingsPrivate :
public QSharedData
52 QgsTextBufferSettingsPrivate()
57 QgsTextBufferSettingsPrivate(
const QgsTextBufferSettingsPrivate &other )
58 : QSharedData( other )
59 , enabled( other.enabled )
61 , sizeUnit( other.sizeUnit )
62 , sizeMapUnitScale( other.sizeMapUnitScale )
63 , color( other.color )
64 , opacity( other.opacity )
65 , fillBufferInterior( other.fillBufferInterior )
66 , joinStyle( other.joinStyle )
67 , blendMode( other.blendMode )
68 , paintEffect( other.paintEffect ? other.paintEffect->clone() :
nullptr )
78 bool fillBufferInterior =
false;
79 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
80 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
81 std::unique_ptr< QgsPaintEffect > paintEffect;
84 QgsTextBufferSettingsPrivate &operator=(
const QgsTextBufferSettingsPrivate & ) =
delete;
88 class QgsTextBackgroundSettingsPrivate :
public QSharedData
92 QgsTextBackgroundSettingsPrivate()
93 : size( QSizeF( 0.0, 0.0 ) )
94 , offset( QPointF( 0.0, 0.0 ) )
95 , radii( QSizeF( 0.0, 0.0 ) )
96 , fillColor( Qt::white )
97 , strokeColor( Qt::darkGray )
101 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
102 : QSharedData( other )
103 , enabled( other.enabled )
105 , svgFile( other.svgFile )
106 , sizeType( other.sizeType )
108 , sizeUnits( other.sizeUnits )
109 , sizeMapUnitScale( other.sizeMapUnitScale )
110 , rotationType( other.rotationType )
111 , rotation( other.rotation )
112 , offset( other.offset )
113 , offsetUnits( other.offsetUnits )
114 , offsetMapUnitScale( other.offsetMapUnitScale )
115 , radii( other.radii )
116 , radiiUnits( other.radiiUnits )
117 , radiiMapUnitScale( other.radiiMapUnitScale )
118 , blendMode( other.blendMode )
119 , fillColor( other.fillColor )
120 , strokeColor( other.strokeColor )
121 , opacity( other.opacity )
122 , strokeWidth( other.strokeWidth )
123 , strokeWidthUnits( other.strokeWidthUnits )
124 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
125 , joinStyle( other.joinStyle )
126 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
127 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
131 bool enabled =
false;
139 double rotation = 0.0;
146 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
149 double opacity = 1.0;
150 double strokeWidth = 0.0;
153 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
154 std::unique_ptr< QgsPaintEffect > paintEffect;
155 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
158 QgsTextBackgroundSettingsPrivate &operator=(
const QgsTextBackgroundSettingsPrivate & ) =
delete;
163 class QgsTextShadowSettingsPrivate :
public QSharedData
167 QgsTextShadowSettingsPrivate()
168 : color( QColor( 0, 0, 0 ) )
173 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
174 : QSharedData( other )
175 , enabled( other.enabled )
176 , shadowUnder( other.shadowUnder )
177 , offsetAngle( other.offsetAngle )
178 , offsetDist( other.offsetDist )
179 , offsetUnits( other.offsetUnits )
180 , offsetMapUnitScale( other.offsetMapUnitScale )
181 , offsetGlobal( other.offsetGlobal )
182 , radius( other.radius )
183 , radiusUnits( other.radiusUnits )
184 , radiusMapUnitScale( other.radiusMapUnitScale )
185 , radiusAlphaOnly( other.radiusAlphaOnly )
186 , scale( other.scale )
187 , color( other.color )
188 , opacity( other.opacity )
189 , blendMode( other.blendMode )
193 bool enabled =
false;
195 int offsetAngle = 135;
196 double offsetDist = 1.0;
199 bool offsetGlobal =
true;
203 bool radiusAlphaOnly =
false;
206 double opacity = 0.7;
207 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
210 QgsTextShadowSettingsPrivate &operator=(
const QgsTextShadowSettingsPrivate & ) =
delete;
214 class QgsTextMaskSettingsPrivate :
public QSharedData
218 QgsTextMaskSettingsPrivate()
223 QgsTextMaskSettingsPrivate(
const QgsTextMaskSettingsPrivate &other )
224 : QSharedData( other )
225 , enabled( other.enabled )
228 , sizeUnit( other.sizeUnit )
229 , sizeMapUnitScale( other.sizeMapUnitScale )
230 , joinStyle( other.joinStyle )
231 , opacity( other.opacity )
232 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
233 , maskedSymbolLayers( other.maskedSymbolLayers )
237 bool enabled =
false;
242 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
243 double opacity = 1.0;
244 std::unique_ptr< QgsPaintEffect > paintEffect;
248 QgsTextMaskSettingsPrivate &operator=(
const QgsTextMaskSettingsPrivate & ) =
delete;
252 class QgsTextSettingsPrivate :
public QSharedData
256 QgsTextSettingsPrivate()
257 : textColor( Qt::black )
261 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
262 : QSharedData( other )
263 , isValid( other.isValid )
264 , textFont( other.textFont )
265 , textNamedStyle( other.textNamedStyle )
266 , fontSizeUnits( other.fontSizeUnits )
267 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
268 , fontSize( other.fontSize )
269 , textColor( other.textColor )
270 , opacity( other.opacity )
271 , blendMode( other.blendMode )
272 , multilineHeight( other.multilineHeight )
273 , orientation( other.orientation )
274 , previewBackgroundColor( other.previewBackgroundColor )
275 , allowHtmlFormatting( other.allowHtmlFormatting )
276 , capitalization( other.capitalization )
277 , mDataDefinedProperties( other.mDataDefinedProperties )
281 bool isValid =
false;
283 QString textNamedStyle;
286 double fontSize = 10 ;
288 double opacity = 1.0;
289 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
290 double multilineHeight = 1.0 ;
292 QColor previewBackgroundColor = Qt::white;
293 bool allowHtmlFormatting =
false;
300 QgsTextSettingsPrivate &operator=(
const QgsTextSettingsPrivate & ) =
delete;
Struct for storing maximum and minimum scales for measurements in map units.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Capitalization
Capitalization options.
@ MixedCase
Mixed case, ie no change.
SizeType
Methods for determining the background shape size.
@ SizeBuffer
Shape size is determined by adding a buffer margin around text.
ShapeType
Background shape types.
@ ShapeRectangle
Rectangle.
RotationType
Methods for determining the rotation of the background shape.
@ RotationSync
Shape rotation is synced with text rotation.
TextOrientation
Text orientation.
@ HorizontalOrientation
Vertically oriented text.
MaskType
Mask shape types.
ShadowPlacement
Placement positions for text shadow.
@ ShadowLowest
Draw shadow below all text components.
RenderUnit
Rendering size units.
@ RenderPoints
Points (e.g., for font sizes)
@ RenderMillimeters
Millimeters.
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList