17 #ifndef QGSTEXTRENDERER_PRIVATE_H
18 #define QGSTEXTRENDERER_PRIVATE_H
22 #include "qgis_core.h"
36 #include <QSharedData>
51 class QgsTextBufferSettingsPrivate :
public QSharedData
55 QgsTextBufferSettingsPrivate()
60 QgsTextBufferSettingsPrivate(
const QgsTextBufferSettingsPrivate &other )
61 : QSharedData( other )
62 , enabled( other.enabled )
64 , sizeUnit( other.sizeUnit )
65 , sizeMapUnitScale( other.sizeMapUnitScale )
66 , color( other.color )
67 , opacity( other.opacity )
68 , fillBufferInterior( other.fillBufferInterior )
69 , joinStyle( other.joinStyle )
70 , blendMode( other.blendMode )
71 , paintEffect( other.paintEffect ? other.paintEffect->clone() :
nullptr )
81 bool fillBufferInterior =
false;
82 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
83 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
84 std::unique_ptr< QgsPaintEffect > paintEffect;
87 QgsTextBufferSettingsPrivate &operator=(
const QgsTextBufferSettingsPrivate & ) =
delete;
91 class QgsTextBackgroundSettingsPrivate :
public QSharedData
95 QgsTextBackgroundSettingsPrivate()
96 : size( QSizeF( 0.0, 0.0 ) )
97 , offset( QPointF( 0.0, 0.0 ) )
98 , radii( QSizeF( 0.0, 0.0 ) )
99 , fillColor( Qt::white )
100 , strokeColor( Qt::darkGray )
104 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
105 : QSharedData( other )
106 , enabled( other.enabled )
108 , svgFile( other.svgFile )
109 , sizeType( other.sizeType )
111 , sizeUnits( other.sizeUnits )
112 , sizeMapUnitScale( other.sizeMapUnitScale )
113 , rotationType( other.rotationType )
114 , rotation( other.rotation )
115 , offset( other.offset )
116 , offsetUnits( other.offsetUnits )
117 , offsetMapUnitScale( other.offsetMapUnitScale )
118 , radii( other.radii )
119 , radiiUnits( other.radiiUnits )
120 , radiiMapUnitScale( other.radiiMapUnitScale )
121 , blendMode( other.blendMode )
122 , fillColor( other.fillColor )
123 , strokeColor( other.strokeColor )
124 , opacity( other.opacity )
125 , strokeWidth( other.strokeWidth )
126 , strokeWidthUnits( other.strokeWidthUnits )
127 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
128 , joinStyle( other.joinStyle )
129 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
130 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
131 , fillSymbol( other.fillSymbol ? other.fillSymbol->clone() : nullptr )
135 bool enabled =
false;
143 double rotation = 0.0;
150 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
153 double opacity = 1.0;
154 double strokeWidth = 0.0;
157 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
158 std::unique_ptr< QgsPaintEffect > paintEffect;
159 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
160 std::unique_ptr< QgsFillSymbol > fillSymbol;
163 QgsTextBackgroundSettingsPrivate &operator=(
const QgsTextBackgroundSettingsPrivate & ) =
delete;
168 class QgsTextShadowSettingsPrivate :
public QSharedData
172 QgsTextShadowSettingsPrivate()
173 : color( QColor( 0, 0, 0 ) )
178 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
179 : QSharedData( other )
180 , enabled( other.enabled )
181 , shadowUnder( other.shadowUnder )
182 , offsetAngle( other.offsetAngle )
183 , offsetDist( other.offsetDist )
184 , offsetUnits( other.offsetUnits )
185 , offsetMapUnitScale( other.offsetMapUnitScale )
186 , offsetGlobal( other.offsetGlobal )
187 , radius( other.radius )
188 , radiusUnits( other.radiusUnits )
189 , radiusMapUnitScale( other.radiusMapUnitScale )
190 , radiusAlphaOnly( other.radiusAlphaOnly )
191 , scale( other.scale )
192 , color( other.color )
193 , opacity( other.opacity )
194 , blendMode( other.blendMode )
198 bool enabled =
false;
200 int offsetAngle = 135;
201 double offsetDist = 1.0;
204 bool offsetGlobal =
true;
208 bool radiusAlphaOnly =
false;
211 double opacity = 0.7;
212 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
215 QgsTextShadowSettingsPrivate &operator=(
const QgsTextShadowSettingsPrivate & ) =
delete;
219 class QgsTextMaskSettingsPrivate :
public QSharedData
223 QgsTextMaskSettingsPrivate()
228 QgsTextMaskSettingsPrivate(
const QgsTextMaskSettingsPrivate &other )
229 : QSharedData( other )
230 , enabled( other.enabled )
233 , sizeUnit( other.sizeUnit )
234 , sizeMapUnitScale( other.sizeMapUnitScale )
235 , joinStyle( other.joinStyle )
236 , opacity( other.opacity )
237 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
238 , maskedSymbolLayers( other.maskedSymbolLayers )
242 bool enabled =
false;
247 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
248 double opacity = 1.0;
249 std::unique_ptr< QgsPaintEffect > paintEffect;
253 QgsTextMaskSettingsPrivate &operator=(
const QgsTextMaskSettingsPrivate & ) =
delete;
257 class QgsTextSettingsPrivate :
public QSharedData
261 QgsTextSettingsPrivate()
262 : textColor( Qt::black )
266 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
267 : QSharedData( other )
268 , isValid( other.isValid )
269 , textFont( other.textFont )
270 , families( other.families )
271 , textNamedStyle( other.textNamedStyle )
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 , orientation( other.orientation )
280 , previewBackgroundColor( other.previewBackgroundColor )
281 , allowHtmlFormatting( other.allowHtmlFormatting )
282 , capitalization( other.capitalization )
283 , mDataDefinedProperties( other.mDataDefinedProperties )
287 bool isValid =
false;
289 QStringList families;
290 QString textNamedStyle;
293 double fontSize = 10 ;
295 double opacity = 1.0;
296 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
297 double multilineHeight = 1.0 ;
299 QColor previewBackgroundColor = Qt::white;
300 bool allowHtmlFormatting =
false;
307 QgsTextSettingsPrivate &operator=(
const QgsTextSettingsPrivate & ) =
delete;
Capitalization
String capitalization options.
@ MixedCase
Mixed case, ie no change.
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.
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