17#ifndef QGSTEXTRENDERER_PRIVATE_H
18#define QGSTEXTRENDERER_PRIVATE_H
49class QgsTextBufferSettingsPrivate :
public QSharedData
53 QgsTextBufferSettingsPrivate()
58 QgsTextBufferSettingsPrivate(
const QgsTextBufferSettingsPrivate &other )
59 : QSharedData( other )
60 , enabled( other.enabled )
62 , sizeUnit( other.sizeUnit )
63 , sizeMapUnitScale( other.sizeMapUnitScale )
64 , color( other.color )
65 , opacity( other.opacity )
66 , fillBufferInterior( other.fillBufferInterior )
67 , joinStyle( other.joinStyle )
68 , blendMode( other.blendMode )
69 , paintEffect( other.paintEffect ? other.paintEffect->clone() :
nullptr )
79 bool fillBufferInterior =
false;
80 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
81 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
82 std::unique_ptr< QgsPaintEffect > paintEffect;
85 QgsTextBufferSettingsPrivate &operator=(
const QgsTextBufferSettingsPrivate & ) =
delete;
89class QgsTextBackgroundSettingsPrivate :
public QSharedData
93 QgsTextBackgroundSettingsPrivate()
94 : size( QSizeF( 0.0, 0.0 ) )
95 , offset( QPointF( 0.0, 0.0 ) )
96 , radii( QSizeF( 0.0, 0.0 ) )
97 , fillColor( Qt::white )
98 , strokeColor( Qt::darkGray )
102 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
103 : QSharedData( other )
104 , enabled( other.enabled )
106 , svgFile( other.svgFile )
107 , sizeType( other.sizeType )
109 , sizeUnits( other.sizeUnits )
110 , sizeMapUnitScale( other.sizeMapUnitScale )
111 , rotationType( other.rotationType )
112 , rotation( other.rotation )
113 , offset( other.offset )
114 , offsetUnits( other.offsetUnits )
115 , offsetMapUnitScale( other.offsetMapUnitScale )
116 , radii( other.radii )
117 , radiiUnits( other.radiiUnits )
118 , radiiMapUnitScale( other.radiiMapUnitScale )
119 , blendMode( other.blendMode )
120 , fillColor( other.fillColor )
121 , strokeColor( other.strokeColor )
122 , opacity( other.opacity )
123 , strokeWidth( other.strokeWidth )
124 , strokeWidthUnits( other.strokeWidthUnits )
125 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
126 , joinStyle( other.joinStyle )
127 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
128 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
129 , fillSymbol( other.fillSymbol ? other.fillSymbol->clone() : nullptr )
133 bool enabled =
false;
141 double rotation = 0.0;
148 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
151 double opacity = 1.0;
152 double strokeWidth = 0.0;
155 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
156 std::unique_ptr< QgsPaintEffect > paintEffect;
157 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
158 std::unique_ptr< QgsFillSymbol > fillSymbol;
161 QgsTextBackgroundSettingsPrivate &operator=(
const QgsTextBackgroundSettingsPrivate & ) =
delete;
166class QgsTextShadowSettingsPrivate :
public QSharedData
170 QgsTextShadowSettingsPrivate()
171 : color( QColor( 0, 0, 0 ) )
176 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
177 : QSharedData( other )
178 , enabled( other.enabled )
179 , shadowUnder( other.shadowUnder )
180 , offsetAngle( other.offsetAngle )
181 , offsetDist( other.offsetDist )
182 , offsetUnits( other.offsetUnits )
183 , offsetMapUnitScale( other.offsetMapUnitScale )
184 , offsetGlobal( other.offsetGlobal )
185 , radius( other.radius )
186 , radiusUnits( other.radiusUnits )
187 , radiusMapUnitScale( other.radiusMapUnitScale )
188 , radiusAlphaOnly( other.radiusAlphaOnly )
189 , scale( other.scale )
190 , color( other.color )
191 , opacity( other.opacity )
192 , blendMode( other.blendMode )
196 bool enabled =
false;
198 int offsetAngle = 135;
199 double offsetDist = 1.0;
202 bool offsetGlobal =
true;
206 bool radiusAlphaOnly =
false;
209 double opacity = 0.7;
210 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
213 QgsTextShadowSettingsPrivate &operator=(
const QgsTextShadowSettingsPrivate & ) =
delete;
217class QgsTextMaskSettingsPrivate :
public QSharedData
221 QgsTextMaskSettingsPrivate()
226 QgsTextMaskSettingsPrivate(
const QgsTextMaskSettingsPrivate &other )
227 : QSharedData( other )
228 , enabled( other.enabled )
231 , sizeUnit( other.sizeUnit )
232 , sizeMapUnitScale( other.sizeMapUnitScale )
233 , joinStyle( other.joinStyle )
234 , opacity( other.opacity )
235 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
236 , maskedSymbolLayers( other.maskedSymbolLayers )
240 bool enabled =
false;
245 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
246 double opacity = 1.0;
247 std::unique_ptr< QgsPaintEffect > paintEffect;
251 QgsTextMaskSettingsPrivate &operator=(
const QgsTextMaskSettingsPrivate & ) =
delete;
255class QgsTextSettingsPrivate :
public QSharedData
259 QgsTextSettingsPrivate()
260 : textColor( Qt::black )
264 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
265 : QSharedData( other )
266 , isValid( other.isValid )
267 , textFont( other.textFont )
268 , families( other.families )
269 , textNamedStyle( other.textNamedStyle )
270 , forcedBold( other.forcedBold )
271 , forcedItalic( other.forcedItalic )
272 , fontSizeUnits( other.fontSizeUnits )
273 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
274 , fontSize( other.fontSize )
275 , textColor( other.textColor )
276 , opacity( other.opacity )
277 , blendMode( other.blendMode )
278 , multilineHeight( other.multilineHeight )
279 , multilineHeightUnits( other.multilineHeightUnits )
280 , orientation( other.orientation )
281 , previewBackgroundColor( other.previewBackgroundColor )
282 , allowHtmlFormatting( other.allowHtmlFormatting )
283 , capitalization( other.capitalization )
284 , mDataDefinedProperties( other.mDataDefinedProperties )
288 bool isValid =
false;
290 QStringList families;
291 QString textNamedStyle;
292 bool forcedBold =
false;
293 bool forcedItalic =
false;
296 double fontSize = 10 ;
298 double opacity = 1.0;
299 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
300 double multilineHeight = 1.0;
303 QColor previewBackgroundColor = Qt::white;
304 bool allowHtmlFormatting =
false;
311 QgsTextSettingsPrivate &operator=(
const QgsTextSettingsPrivate & ) =
delete;
Capitalization
String capitalization options.
@ MixedCase
Mixed case, ie no change.
TextOrientation
Text orientations.
RenderUnit
Rendering size units.
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.
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