17#ifndef QGSTEXTRENDERER_PRIVATE_H
18#define QGSTEXTRENDERER_PRIVATE_H
50class QgsTextBufferSettingsPrivate :
public QSharedData
53 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 )
77 bool fillBufferInterior =
false;
78 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
79 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
80 std::unique_ptr< QgsPaintEffect > paintEffect;
83 QgsTextBufferSettingsPrivate &operator=(
const QgsTextBufferSettingsPrivate & ) =
delete;
87class QgsTextBackgroundSettingsPrivate :
public QSharedData
90 QgsTextBackgroundSettingsPrivate()
91 : size( QSizeF( 0.0, 0.0 ) )
92 , offset( QPointF( 0.0, 0.0 ) )
93 , radii( QSizeF( 0.0, 0.0 ) )
94 , fillColor( Qt::white )
95 , strokeColor( Qt::darkGray )
98 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
99 : QSharedData( other )
100 , enabled( other.enabled )
102 , svgFile( other.svgFile )
103 , sizeType( other.sizeType )
105 , sizeUnits( other.sizeUnits )
106 , sizeMapUnitScale( other.sizeMapUnitScale )
107 , rotationType( other.rotationType )
108 , rotation( other.rotation )
109 , offset( other.offset )
110 , offsetUnits( other.offsetUnits )
111 , offsetMapUnitScale( other.offsetMapUnitScale )
112 , radii( other.radii )
113 , radiiUnits( other.radiiUnits )
114 , radiiMapUnitScale( other.radiiMapUnitScale )
115 , blendMode( other.blendMode )
116 , fillColor( other.fillColor )
117 , strokeColor( other.strokeColor )
118 , opacity( other.opacity )
119 , strokeWidth( other.strokeWidth )
120 , strokeWidthUnits( other.strokeWidthUnits )
121 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
122 , joinStyle( other.joinStyle )
123 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
124 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
125 , fillSymbol( other.fillSymbol ? other.fillSymbol->clone() : nullptr )
128 bool enabled =
false;
134 QgsMapUnitScale sizeMapUnitScale;
136 double rotation = 0.0;
139 QgsMapUnitScale offsetMapUnitScale;
142 QgsMapUnitScale radiiMapUnitScale;
143 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
146 double opacity = 1.0;
147 double strokeWidth = 0.0;
149 QgsMapUnitScale strokeWidthMapUnitScale;
150 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
151 std::unique_ptr< QgsPaintEffect > paintEffect;
152 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
153 std::unique_ptr< QgsFillSymbol > fillSymbol;
156 QgsTextBackgroundSettingsPrivate &operator=(
const QgsTextBackgroundSettingsPrivate & ) =
delete;
160class QgsTextShadowSettingsPrivate :
public QSharedData
163 QgsTextShadowSettingsPrivate()
164 : color( QColor( 0, 0, 0 ) )
167 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
168 : QSharedData( other )
169 , enabled( other.enabled )
170 , shadowUnder( other.shadowUnder )
171 , offsetAngle( other.offsetAngle )
172 , offsetDist( other.offsetDist )
173 , offsetUnits( other.offsetUnits )
174 , offsetMapUnitScale( other.offsetMapUnitScale )
175 , offsetGlobal( other.offsetGlobal )
176 , radius( other.radius )
177 , radiusUnits( other.radiusUnits )
178 , radiusMapUnitScale( other.radiusMapUnitScale )
179 , radiusAlphaOnly( other.radiusAlphaOnly )
180 , scale( other.scale )
181 , color( other.color )
182 , opacity( other.opacity )
183 , blendMode( other.blendMode )
186 bool enabled =
false;
188 int offsetAngle = 135;
189 double offsetDist = 1.0;
191 QgsMapUnitScale offsetMapUnitScale;
192 bool offsetGlobal =
true;
195 QgsMapUnitScale radiusMapUnitScale;
196 bool radiusAlphaOnly =
false;
199 double opacity = 0.7;
200 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
203 QgsTextShadowSettingsPrivate &operator=(
const QgsTextShadowSettingsPrivate & ) =
delete;
207class QgsTextMaskSettingsPrivate :
public QSharedData
210 QgsTextMaskSettingsPrivate() {}
212 QgsTextMaskSettingsPrivate(
const QgsTextMaskSettingsPrivate &other )
213 : QSharedData( other )
214 , enabled( other.enabled )
217 , sizeUnit( other.sizeUnit )
218 , sizeMapUnitScale( other.sizeMapUnitScale )
219 , joinStyle( other.joinStyle )
220 , opacity( other.opacity )
221 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
222 , maskedSymbolLayers( other.maskedSymbolLayers )
225 bool enabled =
false;
229 QgsMapUnitScale sizeMapUnitScale;
230 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
231 double opacity = 1.0;
232 std::unique_ptr< QgsPaintEffect > paintEffect;
236 QgsTextMaskSettingsPrivate &operator=(
const QgsTextMaskSettingsPrivate & ) =
delete;
240class QgsTextSettingsPrivate :
public QSharedData
243 QgsTextSettingsPrivate()
244 : textColor( Qt::black )
247 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
248 : QSharedData( other )
249 , isValid( other.isValid )
250 , originalFontFamily( other.originalFontFamily )
251 , textFont( other.textFont )
252 , families( other.families )
253 , textNamedStyle( other.textNamedStyle )
254 , forcedBold( other.forcedBold )
255 , forcedItalic( other.forcedItalic )
256 , fontSizeUnits( other.fontSizeUnits )
257 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
258 , fontSize( other.fontSize )
259 , textColor( other.textColor )
260 , opacity( other.opacity )
261 , blendMode( other.blendMode )
262 , multilineHeight( other.multilineHeight )
263 , multilineHeightUnits( other.multilineHeightUnits )
264 , orientation( other.orientation )
265 , previewBackgroundColor( other.previewBackgroundColor )
266 , allowHtmlFormatting( other.allowHtmlFormatting )
267 , capitalization( other.capitalization )
268 , tabStopDistance( other.tabStopDistance )
269 , tabPositions( other.tabPositions )
270 , tabStopDistanceUnits( other.tabStopDistanceUnits )
271 , tabStopDistanceMapUnitScale( other.tabStopDistanceMapUnitScale )
272 , mDataDefinedProperties( other.mDataDefinedProperties )
275 bool isValid =
false;
277 QString originalFontFamily;
279 QStringList families;
280 QString textNamedStyle;
281 bool forcedBold =
false;
282 bool forcedItalic =
false;
284 QgsMapUnitScale fontSizeMapUnitScale;
285 double fontSize = 10;
287 double opacity = 1.0;
288 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
289 double multilineHeight = 1.0;
292 QColor previewBackgroundColor = Qt::white;
293 bool allowHtmlFormatting =
false;
296 double tabStopDistance = 6.0;
297 QList< QgsTextFormat::Tab > tabPositions;
299 QgsMapUnitScale tabStopDistanceMapUnitScale;
302 QgsPropertyCollection mDataDefinedProperties;
305 QgsTextSettingsPrivate &operator=(
const QgsTextSettingsPrivate & ) =
delete;
Capitalization
String capitalization options.
@ MixedCase
Mixed case, ie no change.
TextOrientation
Text orientations.
@ Horizontal
Horizontally oriented text.
RenderUnit
Rendering size units.
@ Percentage
Percentage of another measurement (e.g., canvas size, feature size).
@ Millimeters
Millimeters.
@ Points
Points (e.g., for font sizes).
Struct for storing maximum and minimum scales for measurements in map units.
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.
MaskType
Mask shape types.
ShadowPlacement
Placement positions for text shadow.
@ ShadowLowest
Draw shadow below all text components.
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList