QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsMarkerLineSymbolLayer Class Reference

#include <qgslinesymbollayer.h>

Inheritance diagram for QgsMarkerLineSymbolLayer:
Inheritance graph
[legend]

Public Types

enum  Placement {
  Interval, Vertex, LastVertex, FirstVertex,
  CentralPoint, CurvePoint
}
 Defines how/where the marker should be placed on the line. More...
 
- Public Types inherited from QgsLineSymbolLayer
enum  RenderRingFilter { AllRings, ExteriorRingOnly, InteriorRingsOnly }
 Options for filtering rings when the line symbol layer is being used to render a polygon's rings. More...
 
- Public Types inherited from QgsSymbolLayer
enum  Property {
  PropertySize = 0, PropertyAngle, PropertyName, PropertyFillColor,
  PropertyStrokeColor, PropertyStrokeWidth, PropertyStrokeStyle, PropertyOffset,
  PropertyCharacter, PropertyWidth, PropertyHeight, PropertyPreserveAspectRatio,
  PropertyFillStyle, PropertyJoinStyle, PropertySecondaryColor, PropertyLineAngle,
  PropertyLineDistance, PropertyGradientType, PropertyCoordinateMode, PropertyGradientSpread,
  PropertyGradientReference1X, PropertyGradientReference1Y, PropertyGradientReference2X, PropertyGradientReference2Y,
  PropertyGradientReference1IsCentroid, PropertyGradientReference2IsCentroid, PropertyBlurRadius, PropertyShapeburstUseWholeShape,
  PropertyShapeburstMaxDistance, PropertyShapeburstIgnoreRings, PropertyFile, PropertyDistanceX,
  PropertyDistanceY, PropertyDisplacementX, PropertyDisplacementY, PropertyOpacity,
  PropertyCustomDash, PropertyCapStyle, PropertyPlacement, PropertyInterval,
  PropertyOffsetAlongLine, PropertyHorizontalAnchor, PropertyVerticalAnchor, PropertyLayerEnabled,
  PropertyArrowWidth, PropertyArrowStartWidth, PropertyArrowHeadLength, PropertyArrowHeadThickness,
  PropertyArrowHeadType, PropertyArrowType
}
 Data definable properties. More...
 

Public Member Functions

 QgsMarkerLineSymbolLayer (bool rotateMarker=DEFAULT_MARKERLINE_ROTATE, double interval=DEFAULT_MARKERLINE_INTERVAL)
 
QgsMarkerLineSymbolLayerclone () const override
 Shall be reimplemented by subclasses to create a deep copy of the instance. More...
 
QColor color () const override
 The fill color. More...
 
double estimateMaxBleed (const QgsRenderContext &context) const override
 Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when drawn in the specified /a context. More...
 
bool hasDataDefinedProperties () const override
 Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties. More...
 
double interval () const
 Returns the interval between individual markers. More...
 
const QgsMapUnitScaleintervalMapUnitScale () const
 
QgsUnitTypes::RenderUnit intervalUnit () const
 Returns the units for the interval between markers. More...
 
QString layerType () const override
 Returns a string that represents this layer type. More...
 
QgsMapUnitScale mapUnitScale () const override
 
double offsetAlongLine () const
 Returns the offset along the line for the marker placement. More...
 
const QgsMapUnitScaleoffsetAlongLineMapUnitScale () const
 Returns the map unit scale used for calculating the offset in map units along line for markers. More...
 
QgsUnitTypes::RenderUnit offsetAlongLineUnit () const
 Returns the unit used for calculating the offset along line for markers. More...
 
QgsUnitTypes::RenderUnit outputUnit () const override
 Returns the units to use for sizes and widths within the symbol layer. More...
 
Placement placement () const
 The placement of the markers. More...
 
QgsStringMap properties () const override
 Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer. More...
 
void renderPolygonStroke (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolRenderContext &context) override
 
void renderPolyline (const QPolygonF &points, QgsSymbolRenderContext &context) override
 
bool rotateMarker () const
 Shall the marker be rotated. More...
 
void setColor (const QColor &color) override
 The fill color. More...
 
void setDataDefinedProperty (QgsSymbolLayer::Property key, const QgsProperty &property) override
 Sets a data defined property for the layer. More...
 
void setInterval (double interval)
 Sets the interval between individual markers. More...
 
void setIntervalMapUnitScale (const QgsMapUnitScale &scale)
 
void setIntervalUnit (QgsUnitTypes::RenderUnit unit)
 Sets the units for the interval between markers. More...
 
void setMapUnitScale (const QgsMapUnitScale &scale) override
 
void setOffsetAlongLine (double offsetAlongLine)
 Sets the the offset along the line for the marker placement. More...
 
void setOffsetAlongLineMapUnitScale (const QgsMapUnitScale &scale)
 Sets the map unit scale used for calculating the offset in map units along line for markers. More...
 
void setOffsetAlongLineUnit (QgsUnitTypes::RenderUnit unit)
 Sets the unit used for calculating the offset along line for markers. More...
 
void setOutputUnit (QgsUnitTypes::RenderUnit unit) override
 Sets the units to use for sizes and widths within the symbol layer. More...
 
void setPlacement (Placement p)
 The placement of the markers. More...
 
void setRotateMarker (bool rotate)
 Shall the marker be rotated. More...
 
bool setSubSymbol (QgsSymbol *symbol) override
 Sets layer's subsymbol. takes ownership of the passed symbol. More...
 
void setWidth (double width) override
 
void startRender (QgsSymbolRenderContext &context) override
 
void stopRender (QgsSymbolRenderContext &context) override
 
QgsSymbolsubSymbol () override
 Returns the symbol's sub symbol, if present. More...
 
void toSld (QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const override
 
QSet< QString > usedAttributes (const QgsRenderContext &context) const override
 Returns the set of attributes referenced by the layer. More...
 
double width () const override
 Returns the estimated width for the line symbol layer. More...
 
double width (const QgsRenderContext &context) const override
 Returns the line symbol layer width, in painter units. More...
 
- Public Member Functions inherited from QgsLineSymbolLayer
void drawPreviewIcon (QgsSymbolRenderContext &context, QSize size) override
 
double dxfWidth (const QgsDxfExport &e, QgsSymbolRenderContext &context) const override
 Gets line width. More...
 
QgsMapUnitScale mapUnitScale () const override
 
double offset () const
 
const QgsMapUnitScaleoffsetMapUnitScale () const
 
QgsUnitTypes::RenderUnit offsetUnit () const
 Returns the units for the line's offset. More...
 
QgsUnitTypes::RenderUnit outputUnit () const override
 Returns the units to use for sizes and widths within the symbol layer. More...
 
RenderRingFilter ringFilter () const
 Returns the line symbol layer's ring filter, which controls which rings are rendered when the line symbol is being used to draw a polygon's rings. More...
 
void setMapUnitScale (const QgsMapUnitScale &scale) override
 
void setOffset (double offset)
 
void setOffsetMapUnitScale (const QgsMapUnitScale &scale)
 
void setOffsetUnit (QgsUnitTypes::RenderUnit unit)
 Sets the units for the line's offset. More...
 
void setOutputUnit (QgsUnitTypes::RenderUnit unit) override
 Sets the units to use for sizes and widths within the symbol layer. More...
 
void setRingFilter (QgsLineSymbolLayer::RenderRingFilter filter)
 Sets the line symbol layer's ring filter, which controls which rings are rendered when the line symbol is being used to draw a polygon's rings. More...
 
void setWidthMapUnitScale (const QgsMapUnitScale &scale)
 
void setWidthUnit (QgsUnitTypes::RenderUnit unit)
 Sets the units for the line's width. More...
 
const QgsMapUnitScalewidthMapUnitScale () const
 
QgsUnitTypes::RenderUnit widthUnit () const
 Returns the units for the line's width. More...
 
- Public Member Functions inherited from QgsSymbolLayer
virtual ~QgsSymbolLayer ()
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the symbol layer's property collection, used for data defined overrides. More...
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the symbol layer's property collection, used for data defined overrides. More...
 
virtual double dxfAngle (QgsSymbolRenderContext &context) const
 Gets angle. More...
 
virtual QColor dxfBrushColor (QgsSymbolRenderContext &context) const
 Gets brush/fill color. More...
 
virtual Qt::BrushStyle dxfBrushStyle () const
 Gets brush/fill style. More...
 
virtual QColor dxfColor (QgsSymbolRenderContext &context) const
 Gets color. More...
 
virtual QVector< qreal > dxfCustomDashPattern (QgsUnitTypes::RenderUnit &unit) const
 Gets dash pattern. More...
 
virtual double dxfOffset (const QgsDxfExport &e, QgsSymbolRenderContext &context) const
 Gets offset. More...
 
virtual Qt::PenStyle dxfPenStyle () const
 Gets pen style. More...
 
bool enabled () const
 Returns true if symbol layer is enabled and will be drawn. More...
 
virtual QColor fillColor () const
 Gets fill color. More...
 
virtual bool isCompatibleWithSymbol (QgsSymbol *symbol) const
 Returns if the layer can be used below the specified symbol. More...
 
bool isLocked () const
 
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
 
QgsPaintEffectpaintEffect () const
 Returns the current paint effect for the layer. More...
 
virtual void prepareExpressions (const QgsSymbolRenderContext &context)
 Prepares all data defined property expressions for evaluation. More...
 
int renderingPass () const
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the symbol layer's property collection, used for data defined overrides. More...
 
void setEnabled (bool enabled)
 Sets whether symbol layer is enabled and should be drawn. More...
 
virtual void setFillColor (const QColor &color)
 Set fill color. More...
 
void setLocked (bool locked)
 
void setPaintEffect (QgsPaintEffect *effect)
 Sets the current paint effect for the layer. More...
 
void setRenderingPass (int renderingPass)
 
virtual void setStrokeColor (const QColor &color)
 Set stroke color. More...
 
virtual QColor strokeColor () const
 Gets stroke color. More...
 
QgsSymbol::SymbolType type () const
 
virtual bool writeDxf (QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const
 write as DXF More...
 

Static Public Member Functions

static QgsSymbolLayercreate (const QgsStringMap &properties=QgsStringMap())
 Create a new MarkerLineSymbolLayerV2. More...
 
static QgsSymbolLayercreateFromSld (QDomElement &element)
 Create a new MarkerLineSymbolLayerV2 from SLD. More...
 
- Static Public Member Functions inherited from QgsSymbolLayer
static const QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the symbol layer property definitions. More...
 

Protected Member Functions

double markerAngle (const QPolygonF &points, bool isRing, int vertex)
 
void renderPolylineCentral (const QPolygonF &points, QgsSymbolRenderContext &context)
 
void renderPolylineInterval (const QPolygonF &points, QgsSymbolRenderContext &context)
 
void renderPolylineVertex (const QPolygonF &points, QgsSymbolRenderContext &context, Placement placement=Vertex)
 
- Protected Member Functions inherited from QgsLineSymbolLayer
 QgsLineSymbolLayer (bool locked=false)
 
- Protected Member Functions inherited from QgsSymbolLayer
 QgsSymbolLayer (QgsSymbol::SymbolType type, bool locked=false)
 
void copyDataDefinedProperties (QgsSymbolLayer *destLayer) const
 Copies all data defined properties of this layer to another symbol layer. More...
 
void copyPaintEffect (QgsSymbolLayer *destLayer) const
 Copies paint effect of this layer to another symbol layer. More...
 
void restoreOldDataDefinedProperties (const QgsStringMap &stringMap)
 Restores older data defined properties from string map. More...
 

Protected Attributes

double mInterval
 
QgsMapUnitScale mIntervalMapUnitScale
 
QgsUnitTypes::RenderUnit mIntervalUnit
 
std::unique_ptr< QgsMarkerSymbolmMarker
 
double mOffsetAlongLine
 
QgsMapUnitScale mOffsetAlongLineMapUnitScale
 
QgsUnitTypes::RenderUnit mOffsetAlongLineUnit
 
Placement mPlacement
 
bool mRotateMarker
 
- Protected Attributes inherited from QgsLineSymbolLayer
double mOffset = 0
 
QgsMapUnitScale mOffsetMapUnitScale
 
QgsUnitTypes::RenderUnit mOffsetUnit = QgsUnitTypes::RenderMillimeters
 
RenderRingFilter mRingFilter = AllRings
 
double mWidth = 0
 
QgsMapUnitScale mWidthMapUnitScale
 
QgsUnitTypes::RenderUnit mWidthUnit = QgsUnitTypes::RenderMillimeters
 
- Protected Attributes inherited from QgsSymbolLayer
QColor mColor
 
QgsPropertyCollection mDataDefinedProperties
 
bool mEnabled
 True if layer is enabled and should be drawn. More...
 
QgsFields mFields
 
bool mLocked
 
QgsPaintEffectmPaintEffect = nullptr
 
int mRenderingPass
 
QgsSymbol::SymbolType mType
 

Additional Inherited Members

- Static Protected Attributes inherited from QgsSymbolLayer
static const bool SELECT_FILL_BORDER = false
 Whether fill styles for selected features also highlight symbol stroke. More...
 
static const bool SELECT_FILL_STYLE = false
 Whether fill styles for selected features uses symbol layer style. More...
 
static const bool SELECTION_IS_OPAQUE = true
 Whether styles for selected features ignore symbol alpha. More...
 

Detailed Description

Definition at line 172 of file qgslinesymbollayer.h.

Member Enumeration Documentation

Defines how/where the marker should be placed on the line.

Enumerator
Interval 
Vertex 
LastVertex 
FirstVertex 
CentralPoint 
CurvePoint 

Definition at line 181 of file qgslinesymbollayer.h.

Constructor & Destructor Documentation

QgsMarkerLineSymbolLayer::QgsMarkerLineSymbolLayer ( bool  rotateMarker = DEFAULT_MARKERLINE_ROTATE,
double  interval = DEFAULT_MARKERLINE_INTERVAL 
)

Definition at line 741 of file qgslinesymbollayer.cpp.

Member Function Documentation

QgsMarkerLineSymbolLayer * QgsMarkerLineSymbolLayer::clone ( ) const
overridevirtual

Shall be reimplemented by subclasses to create a deep copy of the instance.

Implements QgsSymbolLayer.

Definition at line 1439 of file qgslinesymbollayer.cpp.

QColor QgsMarkerLineSymbolLayer::color ( ) const
overridevirtual

The fill color.

Reimplemented from QgsSymbolLayer.

Definition at line 837 of file qgslinesymbollayer.cpp.

QgsSymbolLayer * QgsMarkerLineSymbolLayer::create ( const QgsStringMap properties = QgsStringMap())
static

Create a new MarkerLineSymbolLayerV2.

Parameters
propertiesA property map to deserialize saved information from properties()
Returns
A new MarkerLineSymbolLayerV2

Definition at line 754 of file qgslinesymbollayer.cpp.

QgsSymbolLayer * QgsMarkerLineSymbolLayer::createFromSld ( QDomElement &  element)
static

Create a new MarkerLineSymbolLayerV2 from SLD.

Parameters
elementAn SLD XML DOM element
Returns
A new MarkerLineSymbolLayerV2

Definition at line 1535 of file qgslinesymbollayer.cpp.

double QgsMarkerLineSymbolLayer::estimateMaxBleed ( const QgsRenderContext context) const
overridevirtual

Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when drawn in the specified /a context.

For example, polygons drawn with an stroke will draw half the width of the stroke outside of the polygon. This amount is estimated, since it may be affected by data defined symbology rules.

Reimplemented from QgsSymbolLayer.

Definition at line 1692 of file qgslinesymbollayer.cpp.

bool QgsMarkerLineSymbolLayer::hasDataDefinedProperties ( ) const
overridevirtual

Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.

Since
QGIS 3.4.5

Reimplemented from QgsSymbolLayer.

Definition at line 1683 of file qgslinesymbollayer.cpp.

double QgsMarkerLineSymbolLayer::interval ( ) const
inline

Returns the interval between individual markers.

Units are specified through intervalUnits().

See also
setInterval()
intervalUnit()

Definition at line 260 of file qgslinesymbollayer.h.

const QgsMapUnitScale& QgsMarkerLineSymbolLayer::intervalMapUnitScale ( ) const
inline

Definition at line 351 of file qgslinesymbollayer.h.

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::intervalUnit ( ) const
inline

Returns the units for the interval between markers.

See also
setIntervalUnit()
interval()

Definition at line 348 of file qgslinesymbollayer.h.

QString QgsMarkerLineSymbolLayer::layerType ( ) const
overridevirtual

Returns a string that represents this layer type.

Used for serialization. Should match with the string used to register this symbol layer in the registry.

Implements QgsSymbolLayer.

Definition at line 826 of file qgslinesymbollayer.cpp.

QgsMapUnitScale QgsMarkerLineSymbolLayer::mapUnitScale ( ) const
overridevirtual

Reimplemented from QgsSymbolLayer.

Definition at line 1664 of file qgslinesymbollayer.cpp.

double QgsMarkerLineSymbolLayer::markerAngle ( const QPolygonF &  points,
bool  isRing,
int  vertex 
)
protected

Definition at line 1209 of file qgslinesymbollayer.cpp.

double QgsMarkerLineSymbolLayer::offsetAlongLine ( ) const
inline

Returns the offset along the line for the marker placement.

For Interval placements, this is the distance between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements.

Returns
The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit.
See also
setOffsetAlongLine
offsetAlongLineUnit
placement
Since
QGIS 2.3

Definition at line 291 of file qgslinesymbollayer.h.

const QgsMapUnitScale& QgsMarkerLineSymbolLayer::offsetAlongLineMapUnitScale ( ) const
inline

Returns the map unit scale used for calculating the offset in map units along line for markers.

Returns
Offset along line map unit scale.

Definition at line 327 of file qgslinesymbollayer.h.

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::offsetAlongLineUnit ( ) const
inline

Returns the unit used for calculating the offset along line for markers.

Returns
Offset along line unit type.
See also
setOffsetAlongLineUnit
offsetAlongLine

Definition at line 313 of file qgslinesymbollayer.h.

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::outputUnit ( ) const
overridevirtual

Returns the units to use for sizes and widths within the symbol layer.

Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width.

Returns
output unit, or QgsUnitTypes::RenderUnknownUnit if the symbol layer contains mixed units
See also
setOutputUnit()

Reimplemented from QgsSymbolLayer.

Definition at line 1646 of file qgslinesymbollayer.cpp.

Placement QgsMarkerLineSymbolLayer::placement ( ) const
inline

The placement of the markers.

Definition at line 273 of file qgslinesymbollayer.h.

QgsStringMap QgsMarkerLineSymbolLayer::properties ( ) const
overridevirtual

Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer.

This is used to serialize a symbol layer perstistently.

Implements QgsSymbolLayer.

Definition at line 1391 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::renderPolygonStroke ( const QPolygonF &  points,
QList< QPolygonF > *  rings,
QgsSymbolRenderContext context 
)
overridevirtual

Reimplemented from QgsLineSymbolLayer.

Definition at line 942 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::renderPolyline ( const QPolygonF &  points,
QgsSymbolRenderContext context 
)
overridevirtual

Implements QgsLineSymbolLayer.

Definition at line 860 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::renderPolylineCentral ( const QPolygonF &  points,
QgsSymbolRenderContext context 
)
protected

Definition at line 1342 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::renderPolylineInterval ( const QPolygonF &  points,
QgsSymbolRenderContext context 
)
protected

Definition at line 986 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::renderPolylineVertex ( const QPolygonF &  points,
QgsSymbolRenderContext context,
Placement  placement = Vertex 
)
protected

Definition at line 1077 of file qgslinesymbollayer.cpp.

bool QgsMarkerLineSymbolLayer::rotateMarker ( ) const
inline

Shall the marker be rotated.

Returns
True if the marker should be rotated.

Definition at line 248 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setColor ( const QColor &  color)
overridevirtual

The fill color.

Reimplemented from QgsSymbolLayer.

Definition at line 831 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::setDataDefinedProperty ( QgsSymbolLayer::Property  key,
const QgsProperty property 
)
overridevirtual

Sets a data defined property for the layer.

Any existing property with the same key will be overwritten.

See also
dataDefinedProperties()
Property
Since
QGIS 3.0

Reimplemented from QgsSymbolLayer.

Definition at line 1618 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::setInterval ( double  interval)
inline

Sets the interval between individual markers.

Parameters
intervalinterval size. Units are specified through setIntervalUnit()
See also
interval()
setIntervalUnit()

Definition at line 268 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setIntervalMapUnitScale ( const QgsMapUnitScale scale)
inline

Definition at line 350 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setIntervalUnit ( QgsUnitTypes::RenderUnit  unit)
inline

Sets the units for the interval between markers.

Parameters
unitinterval units
See also
intervalUnit()
setInterval()

Definition at line 341 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setMapUnitScale ( const QgsMapUnitScale scale)
overridevirtual

Reimplemented from QgsSymbolLayer.

Definition at line 1656 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::setOffsetAlongLine ( double  offsetAlongLine)
inline

Sets the the offset along the line for the marker placement.

For Interval placements, this is the distance between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements.

Parameters
offsetAlongLineDistance to offset markers along the line. The offset unit is set via setOffsetAlongLineUnit.
See also
offsetAlongLine
setOffsetAlongLineUnit
setPlacement
Since
QGIS 2.3

Definition at line 305 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setOffsetAlongLineMapUnitScale ( const QgsMapUnitScale scale)
inline

Sets the map unit scale used for calculating the offset in map units along line for markers.

Parameters
scaleOffset along line map unit scale.

Definition at line 333 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setOffsetAlongLineUnit ( QgsUnitTypes::RenderUnit  unit)
inline

Sets the unit used for calculating the offset along line for markers.

Parameters
unitOffset along line unit type.
See also
offsetAlongLineUnit
setOffsetAlongLine

Definition at line 321 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setOutputUnit ( QgsUnitTypes::RenderUnit  unit)
overridevirtual

Sets the units to use for sizes and widths within the symbol layer.

Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width.

Parameters
unitoutput units
See also
outputUnit()

Reimplemented from QgsSymbolLayer.

Definition at line 1637 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::setPlacement ( Placement  p)
inline

The placement of the markers.

Definition at line 278 of file qgslinesymbollayer.h.

void QgsMarkerLineSymbolLayer::setRotateMarker ( bool  rotate)
inline

Shall the marker be rotated.

Definition at line 253 of file qgslinesymbollayer.h.

bool QgsMarkerLineSymbolLayer::setSubSymbol ( QgsSymbol symbol)
overridevirtual

Sets layer's subsymbol. takes ownership of the passed symbol.

Reimplemented from QgsSymbolLayer.

Definition at line 1426 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::setWidth ( double  width)
overridevirtual

Reimplemented from QgsLineSymbolLayer.

Definition at line 1613 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::startRender ( QgsSymbolRenderContext context)
overridevirtual

Implements QgsSymbolLayer.

Definition at line 842 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::stopRender ( QgsSymbolRenderContext context)
overridevirtual

Implements QgsSymbolLayer.

Definition at line 855 of file qgslinesymbollayer.cpp.

QgsSymbol * QgsMarkerLineSymbolLayer::subSymbol ( )
overridevirtual

Returns the symbol's sub symbol, if present.

Reimplemented from QgsSymbolLayer.

Definition at line 1421 of file qgslinesymbollayer.cpp.

void QgsMarkerLineSymbolLayer::toSld ( QDomDocument &  doc,
QDomElement &  element,
const QgsStringMap props 
) const
overridevirtual

Reimplemented from QgsSymbolLayer.

Definition at line 1458 of file qgslinesymbollayer.cpp.

QSet< QString > QgsMarkerLineSymbolLayer::usedAttributes ( const QgsRenderContext context) const
overridevirtual

Returns the set of attributes referenced by the layer.

This includes attributes required by any data defined properties associated with the layer.

Reimplemented from QgsSymbolLayer.

Definition at line 1675 of file qgslinesymbollayer.cpp.

double QgsMarkerLineSymbolLayer::width ( ) const
overridevirtual

Returns the estimated width for the line symbol layer.

Warning
This returned value is inaccurate if the symbol layer has sub-symbols with different width units. Use the overload accepting a QgsRenderContext argument instead for accurate sizes in this case.
See also
setWidth()

Reimplemented from QgsLineSymbolLayer.

Definition at line 1627 of file qgslinesymbollayer.cpp.

double QgsMarkerLineSymbolLayer::width ( const QgsRenderContext context) const
overridevirtual

Returns the line symbol layer width, in painter units.

This method returns an accurate width by calculating the actual rendered width of the symbol layer using the provided render context.

See also
setWidth()
Since
QGIS 3.4.5

Reimplemented from QgsLineSymbolLayer.

Definition at line 1632 of file qgslinesymbollayer.cpp.

Member Data Documentation

double QgsMarkerLineSymbolLayer::mInterval
protected

Definition at line 373 of file qgslinesymbollayer.h.

QgsMapUnitScale QgsMarkerLineSymbolLayer::mIntervalMapUnitScale
protected

Definition at line 375 of file qgslinesymbollayer.h.

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::mIntervalUnit
protected

Definition at line 374 of file qgslinesymbollayer.h.

std::unique_ptr< QgsMarkerSymbol > QgsMarkerLineSymbolLayer::mMarker
protected

Definition at line 376 of file qgslinesymbollayer.h.

double QgsMarkerLineSymbolLayer::mOffsetAlongLine
protected

Definition at line 378 of file qgslinesymbollayer.h.

QgsMapUnitScale QgsMarkerLineSymbolLayer::mOffsetAlongLineMapUnitScale
protected

Definition at line 380 of file qgslinesymbollayer.h.

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::mOffsetAlongLineUnit
protected

Definition at line 379 of file qgslinesymbollayer.h.

Placement QgsMarkerLineSymbolLayer::mPlacement
protected

Definition at line 377 of file qgslinesymbollayer.h.

bool QgsMarkerLineSymbolLayer::mRotateMarker
protected

Definition at line 372 of file qgslinesymbollayer.h.


The documentation for this class was generated from the following files: