17 #ifndef QGSTEXTRENDERER_PRIVATE_H
18 #define QGSTEXTRENDERER_PRIVATE_H
22 #include "qgis_core.h"
31 #include <QSharedData>
46 class QgsTextBufferSettingsPrivate :
public QSharedData
50 QgsTextBufferSettingsPrivate()
55 QgsTextBufferSettingsPrivate(
const QgsTextBufferSettingsPrivate &other )
56 : QSharedData( other )
57 , enabled( other.enabled )
59 , sizeUnit( other.sizeUnit )
60 , sizeMapUnitScale( other.sizeMapUnitScale )
61 , color( other.color )
62 , opacity( other.opacity )
63 , fillBufferInterior( other.fillBufferInterior )
64 , joinStyle( other.joinStyle )
65 , blendMode( other.blendMode )
66 , paintEffect( other.paintEffect ? other.paintEffect->clone() :
nullptr )
76 bool fillBufferInterior =
false;
77 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
78 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
79 std::unique_ptr< QgsPaintEffect > paintEffect;
82 QgsTextBufferSettingsPrivate &operator=(
const QgsTextBufferSettingsPrivate & ) =
delete;
86 class 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 )
99 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
100 : QSharedData( other )
101 , enabled( other.enabled )
103 , svgFile( other.svgFile )
104 , sizeType( other.sizeType )
106 , sizeUnits( other.sizeUnits )
107 , sizeMapUnitScale( other.sizeMapUnitScale )
108 , rotationType( other.rotationType )
109 , rotation( other.rotation )
110 , offset( other.offset )
111 , offsetUnits( other.offsetUnits )
112 , offsetMapUnitScale( other.offsetMapUnitScale )
113 , radii( other.radii )
114 , radiiUnits( other.radiiUnits )
115 , radiiMapUnitScale( other.radiiMapUnitScale )
116 , blendMode( other.blendMode )
117 , fillColor( other.fillColor )
118 , strokeColor( other.strokeColor )
119 , opacity( other.opacity )
120 , strokeWidth( other.strokeWidth )
121 , strokeWidthUnits( other.strokeWidthUnits )
122 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
123 , joinStyle( other.joinStyle )
124 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
125 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
129 bool enabled =
false;
137 double rotation = 0.0;
144 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
147 double opacity = 1.0;
148 double strokeWidth = 0.0;
151 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
152 std::unique_ptr< QgsPaintEffect > paintEffect;
153 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
156 QgsTextBackgroundSettingsPrivate &operator=(
const QgsTextBackgroundSettingsPrivate & ) =
delete;
161 class QgsTextShadowSettingsPrivate :
public QSharedData
165 QgsTextShadowSettingsPrivate()
166 : color( QColor( 0, 0, 0 ) )
171 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
172 : QSharedData( other )
173 , enabled( other.enabled )
174 , shadowUnder( other.shadowUnder )
175 , offsetAngle( other.offsetAngle )
176 , offsetDist( other.offsetDist )
177 , offsetUnits( other.offsetUnits )
178 , offsetMapUnitScale( other.offsetMapUnitScale )
179 , offsetGlobal( other.offsetGlobal )
180 , radius( other.radius )
181 , radiusUnits( other.radiusUnits )
182 , radiusMapUnitScale( other.radiusMapUnitScale )
183 , radiusAlphaOnly( other.radiusAlphaOnly )
184 , scale( other.scale )
185 , color( other.color )
186 , opacity( other.opacity )
187 , blendMode( other.blendMode )
191 bool enabled =
false;
193 int offsetAngle = 135;
194 double offsetDist = 1.0;
197 bool offsetGlobal =
true;
201 bool radiusAlphaOnly =
false;
204 double opacity = 0.7;
205 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
208 QgsTextShadowSettingsPrivate &operator=(
const QgsTextShadowSettingsPrivate & ) =
delete;
212 class QgsTextMaskSettingsPrivate :
public QSharedData
216 QgsTextMaskSettingsPrivate()
221 QgsTextMaskSettingsPrivate(
const QgsTextMaskSettingsPrivate &other )
222 : QSharedData( other )
223 , enabled( other.enabled )
226 , sizeUnit( other.sizeUnit )
227 , sizeMapUnitScale( other.sizeMapUnitScale )
228 , joinStyle( other.joinStyle )
229 , opacity( other.opacity )
230 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
231 , maskedSymbolLayers( other.maskedSymbolLayers )
235 bool enabled =
false;
240 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
241 double opacity = 1.0;
242 std::unique_ptr< QgsPaintEffect > paintEffect;
246 QgsTextMaskSettingsPrivate &operator=(
const QgsTextMaskSettingsPrivate & ) =
delete;
250 class QgsTextSettingsPrivate :
public QSharedData
254 QgsTextSettingsPrivate()
255 : textColor( Qt::black )
259 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
260 : QSharedData( other )
261 , textFont( other.textFont )
262 , textNamedStyle( other.textNamedStyle )
263 , fontSizeUnits( other.fontSizeUnits )
264 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
265 , fontSize( other.fontSize )
266 , textColor( other.textColor )
267 , opacity( other.opacity )
268 , blendMode( other.blendMode )
269 , multilineHeight( other.multilineHeight )
270 , orientation( other.orientation )
271 , previewBackgroundColor( other.previewBackgroundColor )
272 , allowHtmlFormatting( other.allowHtmlFormatting )
273 , mDataDefinedProperties( other.mDataDefinedProperties )
278 QString textNamedStyle;
281 double fontSize = 10 ;
283 double opacity = 1.0;
284 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
285 double multilineHeight = 1.0 ;
287 QColor previewBackgroundColor = Qt::white;
289 bool allowHtmlFormatting =
false;
295 QgsTextSettingsPrivate &operator=(
const QgsTextSettingsPrivate & ) =
delete;
304 #endif // QGSTEXTRENDERER_PRIVATE_H