17#ifndef QGSTEXTRENDERER_PRIVATE_H
18#define QGSTEXTRENDERER_PRIVATE_H
50class QgsTextBufferSettingsPrivate :
public QSharedData
54 QgsTextBufferSettingsPrivate()
59 QgsTextBufferSettingsPrivate(
const QgsTextBufferSettingsPrivate &other )
60 : QSharedData( other )
61 , enabled( other.enabled )
63 , sizeUnit( other.sizeUnit )
64 , sizeMapUnitScale( other.sizeMapUnitScale )
65 , color( other.color )
66 , opacity( other.opacity )
67 , fillBufferInterior( other.fillBufferInterior )
68 , joinStyle( other.joinStyle )
69 , blendMode( other.blendMode )
70 , paintEffect( other.paintEffect ? other.paintEffect->clone() :
nullptr )
80 bool fillBufferInterior =
false;
81 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
82 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
83 std::unique_ptr< QgsPaintEffect > paintEffect;
86 QgsTextBufferSettingsPrivate &operator=(
const QgsTextBufferSettingsPrivate & ) =
delete;
90class QgsTextBackgroundSettingsPrivate :
public QSharedData
94 QgsTextBackgroundSettingsPrivate()
95 : size( QSizeF( 0.0, 0.0 ) )
96 , offset( QPointF( 0.0, 0.0 ) )
97 , radii( QSizeF( 0.0, 0.0 ) )
98 , fillColor( Qt::white )
99 , strokeColor( Qt::darkGray )
103 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
104 : QSharedData( other )
105 , enabled( other.enabled )
107 , svgFile( other.svgFile )
108 , sizeType( other.sizeType )
110 , sizeUnits( other.sizeUnits )
111 , sizeMapUnitScale( other.sizeMapUnitScale )
112 , rotationType( other.rotationType )
113 , rotation( other.rotation )
114 , offset( other.offset )
115 , offsetUnits( other.offsetUnits )
116 , offsetMapUnitScale( other.offsetMapUnitScale )
117 , radii( other.radii )
118 , radiiUnits( other.radiiUnits )
119 , radiiMapUnitScale( other.radiiMapUnitScale )
120 , blendMode( other.blendMode )
121 , fillColor( other.fillColor )
122 , strokeColor( other.strokeColor )
123 , opacity( other.opacity )
124 , strokeWidth( other.strokeWidth )
125 , strokeWidthUnits( other.strokeWidthUnits )
126 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
127 , joinStyle( other.joinStyle )
128 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
129 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
130 , fillSymbol( other.fillSymbol ? other.fillSymbol->clone() : nullptr )
134 bool enabled =
false;
140 QgsMapUnitScale sizeMapUnitScale;
142 double rotation = 0.0;
145 QgsMapUnitScale offsetMapUnitScale;
148 QgsMapUnitScale radiiMapUnitScale;
149 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
152 double opacity = 1.0;
153 double strokeWidth = 0.0;
155 QgsMapUnitScale strokeWidthMapUnitScale;
156 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
157 std::unique_ptr< QgsPaintEffect > paintEffect;
158 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
159 std::unique_ptr< QgsFillSymbol > fillSymbol;
162 QgsTextBackgroundSettingsPrivate &operator=(
const QgsTextBackgroundSettingsPrivate & ) =
delete;
167class QgsTextShadowSettingsPrivate :
public QSharedData
171 QgsTextShadowSettingsPrivate()
172 : color( QColor( 0, 0, 0 ) )
177 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
178 : QSharedData( other )
179 , enabled( other.enabled )
180 , shadowUnder( other.shadowUnder )
181 , offsetAngle( other.offsetAngle )
182 , offsetDist( other.offsetDist )
183 , offsetUnits( other.offsetUnits )
184 , offsetMapUnitScale( other.offsetMapUnitScale )
185 , offsetGlobal( other.offsetGlobal )
186 , radius( other.radius )
187 , radiusUnits( other.radiusUnits )
188 , radiusMapUnitScale( other.radiusMapUnitScale )
189 , radiusAlphaOnly( other.radiusAlphaOnly )
190 , scale( other.scale )
191 , color( other.color )
192 , opacity( other.opacity )
193 , blendMode( other.blendMode )
197 bool enabled =
false;
199 int offsetAngle = 135;
200 double offsetDist = 1.0;
202 QgsMapUnitScale offsetMapUnitScale;
203 bool offsetGlobal =
true;
206 QgsMapUnitScale radiusMapUnitScale;
207 bool radiusAlphaOnly =
false;
210 double opacity = 0.7;
211 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
214 QgsTextShadowSettingsPrivate &operator=(
const QgsTextShadowSettingsPrivate & ) =
delete;
218class QgsTextMaskSettingsPrivate :
public QSharedData
222 QgsTextMaskSettingsPrivate()
227 QgsTextMaskSettingsPrivate(
const QgsTextMaskSettingsPrivate &other )
228 : QSharedData( other )
229 , enabled( other.enabled )
232 , sizeUnit( other.sizeUnit )
233 , sizeMapUnitScale( other.sizeMapUnitScale )
234 , joinStyle( other.joinStyle )
235 , opacity( other.opacity )
236 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
237 , maskedSymbolLayers( other.maskedSymbolLayers )
241 bool enabled =
false;
245 QgsMapUnitScale sizeMapUnitScale;
246 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
247 double opacity = 1.0;
248 std::unique_ptr< QgsPaintEffect > paintEffect;
252 QgsTextMaskSettingsPrivate &operator=(
const QgsTextMaskSettingsPrivate & ) =
delete;
256class QgsTextSettingsPrivate :
public QSharedData
260 QgsTextSettingsPrivate()
261 : textColor( Qt::black )
265 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
266 : QSharedData( other )
267 , isValid( other.isValid )
268 , originalFontFamily( other.originalFontFamily )
269 , textFont( other.textFont )
270 , families( other.families )
271 , textNamedStyle( other.textNamedStyle )
272 , forcedBold( other.forcedBold )
273 , forcedItalic( other.forcedItalic )
274 , fontSizeUnits( other.fontSizeUnits )
275 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
276 , fontSize( other.fontSize )
277 , textColor( other.textColor )
278 , opacity( other.opacity )
279 , blendMode( other.blendMode )
280 , multilineHeight( other.multilineHeight )
281 , multilineHeightUnits( other.multilineHeightUnits )
282 , orientation( other.orientation )
283 , previewBackgroundColor( other.previewBackgroundColor )
284 , allowHtmlFormatting( other.allowHtmlFormatting )
285 , capitalization( other.capitalization )
286 , tabStopDistance( other.tabStopDistance )
287 , tabPositions( other.tabPositions )
288 , tabStopDistanceUnits( other.tabStopDistanceUnits )
289 , tabStopDistanceMapUnitScale( other.tabStopDistanceMapUnitScale )
290 , mDataDefinedProperties( other.mDataDefinedProperties )
294 bool isValid =
false;
296 QString originalFontFamily;
298 QStringList families;
299 QString textNamedStyle;
300 bool forcedBold =
false;
301 bool forcedItalic =
false;
303 QgsMapUnitScale fontSizeMapUnitScale;
304 double fontSize = 10 ;
306 double opacity = 1.0;
307 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
308 double multilineHeight = 1.0;
311 QColor previewBackgroundColor = Qt::white;
312 bool allowHtmlFormatting =
false;
315 double tabStopDistance = 6.0;
316 QList< QgsTextFormat::Tab > tabPositions;
318 QgsMapUnitScale tabStopDistanceMapUnitScale;
321 QgsPropertyCollection mDataDefinedProperties;
324 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