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 , 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 , orientation( other.orientation )
282 , previewBackgroundColor( other.previewBackgroundColor )
283 , allowHtmlFormatting( other.allowHtmlFormatting )
284 , capitalization( other.capitalization )
285 , mDataDefinedProperties( other.mDataDefinedProperties )
289 bool isValid =
false;
291 QStringList families;
292 QString textNamedStyle;
293 bool forcedBold =
false;
294 bool forcedItalic =
false;
297 double fontSize = 10 ;
299 double opacity = 1.0;
300 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
301 double multilineHeight = 1.0 ;
303 QColor previewBackgroundColor = Qt::white;
304 bool allowHtmlFormatting =
false;
311 QgsTextSettingsPrivate &operator=(
const QgsTextSettingsPrivate & ) =
delete;
320 #endif // QGSTEXTRENDERER_PRIVATE_H