QGIS API Documentation  3.6.0-Noosa (5873452)
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

◆ Placement

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::QgsMarkerLineSymbolLayer ( bool  rotateMarker = DEFAULT_MARKERLINE_ROTATE,
double  interval = DEFAULT_MARKERLINE_INTERVAL 
)

Definition at line 740 of file qgslinesymbollayer.cpp.

Member Function Documentation

◆ clone()

QgsMarkerLineSymbolLayer * QgsMarkerLineSymbolLayer::clone ( ) const
overridevirtual

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

Implements QgsSymbolLayer.

Definition at line 1429 of file qgslinesymbollayer.cpp.

◆ color()

QColor QgsMarkerLineSymbolLayer::color ( ) const
overridevirtual

The fill color.

Reimplemented from QgsSymbolLayer.

Definition at line 836 of file qgslinesymbollayer.cpp.

◆ create()

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 753 of file qgslinesymbollayer.cpp.

◆ createFromSld()

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 1525 of file qgslinesymbollayer.cpp.

◆ estimateMaxBleed()

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 1682 of file qgslinesymbollayer.cpp.

◆ hasDataDefinedProperties()

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 1673 of file qgslinesymbollayer.cpp.

◆ interval()

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.

◆ intervalMapUnitScale()

const QgsMapUnitScale& QgsMarkerLineSymbolLayer::intervalMapUnitScale ( ) const
inline

Definition at line 351 of file qgslinesymbollayer.h.

◆ intervalUnit()

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.

◆ layerType()

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 825 of file qgslinesymbollayer.cpp.

◆ mapUnitScale()

QgsMapUnitScale QgsMarkerLineSymbolLayer::mapUnitScale ( ) const
overridevirtual

Reimplemented from QgsSymbolLayer.

Definition at line 1654 of file qgslinesymbollayer.cpp.

◆ markerAngle()

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

Definition at line 1199 of file qgslinesymbollayer.cpp.

◆ offsetAlongLine()

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.

◆ offsetAlongLineMapUnitScale()

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.

◆ offsetAlongLineUnit()

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.

◆ outputUnit()

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 1636 of file qgslinesymbollayer.cpp.

◆ placement()

Placement QgsMarkerLineSymbolLayer::placement ( ) const
inline

The placement of the markers.

Definition at line 273 of file qgslinesymbollayer.h.

◆ properties()

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 1381 of file qgslinesymbollayer.cpp.

◆ renderPolygonStroke()

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

Reimplemented from QgsLineSymbolLayer.

Definition at line 941 of file qgslinesymbollayer.cpp.

◆ renderPolyline()

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

Implements QgsLineSymbolLayer.

Definition at line 859 of file qgslinesymbollayer.cpp.

◆ renderPolylineCentral()

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

Definition at line 1332 of file qgslinesymbollayer.cpp.

◆ renderPolylineInterval()

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

Definition at line 985 of file qgslinesymbollayer.cpp.

◆ renderPolylineVertex()

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

Definition at line 1070 of file qgslinesymbollayer.cpp.

◆ rotateMarker()

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.

◆ setColor()

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

The fill color.

Reimplemented from QgsSymbolLayer.

Definition at line 830 of file qgslinesymbollayer.cpp.

◆ setDataDefinedProperty()

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 1608 of file qgslinesymbollayer.cpp.

◆ setInterval()

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.

◆ setIntervalMapUnitScale()

void QgsMarkerLineSymbolLayer::setIntervalMapUnitScale ( const QgsMapUnitScale scale)
inline

Definition at line 350 of file qgslinesymbollayer.h.

◆ setIntervalUnit()

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.

◆ setMapUnitScale()

void QgsMarkerLineSymbolLayer::setMapUnitScale ( const QgsMapUnitScale scale)
overridevirtual

Reimplemented from QgsSymbolLayer.

Definition at line 1646 of file qgslinesymbollayer.cpp.

◆ setOffsetAlongLine()

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.

◆ setOffsetAlongLineMapUnitScale()

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.

◆ setOffsetAlongLineUnit()

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.

◆ setOutputUnit()

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 1627 of file qgslinesymbollayer.cpp.

◆ setPlacement()

void QgsMarkerLineSymbolLayer::setPlacement ( Placement  p)
inline

The placement of the markers.

Definition at line 278 of file qgslinesymbollayer.h.

◆ setRotateMarker()

void QgsMarkerLineSymbolLayer::setRotateMarker ( bool  rotate)
inline

Shall the marker be rotated.

Definition at line 253 of file qgslinesymbollayer.h.

◆ setSubSymbol()

bool QgsMarkerLineSymbolLayer::setSubSymbol ( QgsSymbol symbol)
overridevirtual

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

Reimplemented from QgsSymbolLayer.

Definition at line 1416 of file qgslinesymbollayer.cpp.

◆ setWidth()

void QgsMarkerLineSymbolLayer::setWidth ( double  width)
overridevirtual

Reimplemented from QgsLineSymbolLayer.

Definition at line 1603 of file qgslinesymbollayer.cpp.

◆ startRender()

void QgsMarkerLineSymbolLayer::startRender ( QgsSymbolRenderContext context)
overridevirtual

Implements QgsSymbolLayer.

Definition at line 841 of file qgslinesymbollayer.cpp.

◆ stopRender()

void QgsMarkerLineSymbolLayer::stopRender ( QgsSymbolRenderContext context)
overridevirtual

Implements QgsSymbolLayer.

Definition at line 854 of file qgslinesymbollayer.cpp.

◆ subSymbol()

QgsSymbol * QgsMarkerLineSymbolLayer::subSymbol ( )
overridevirtual

Returns the symbol's sub symbol, if present.

Reimplemented from QgsSymbolLayer.

Definition at line 1411 of file qgslinesymbollayer.cpp.

◆ toSld()

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

Reimplemented from QgsSymbolLayer.

Definition at line 1448 of file qgslinesymbollayer.cpp.

◆ usedAttributes()

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 1665 of file qgslinesymbollayer.cpp.

◆ width() [1/2]

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 1617 of file qgslinesymbollayer.cpp.

◆ width() [2/2]

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 1622 of file qgslinesymbollayer.cpp.

Member Data Documentation

◆ mInterval

double QgsMarkerLineSymbolLayer::mInterval
protected

Definition at line 373 of file qgslinesymbollayer.h.

◆ mIntervalMapUnitScale

QgsMapUnitScale QgsMarkerLineSymbolLayer::mIntervalMapUnitScale
protected

Definition at line 375 of file qgslinesymbollayer.h.

◆ mIntervalUnit

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::mIntervalUnit
protected

Definition at line 374 of file qgslinesymbollayer.h.

◆ mMarker

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

Definition at line 376 of file qgslinesymbollayer.h.

◆ mOffsetAlongLine

double QgsMarkerLineSymbolLayer::mOffsetAlongLine
protected

Definition at line 378 of file qgslinesymbollayer.h.

◆ mOffsetAlongLineMapUnitScale

QgsMapUnitScale QgsMarkerLineSymbolLayer::mOffsetAlongLineMapUnitScale
protected

Definition at line 380 of file qgslinesymbollayer.h.

◆ mOffsetAlongLineUnit

QgsUnitTypes::RenderUnit QgsMarkerLineSymbolLayer::mOffsetAlongLineUnit
protected

Definition at line 379 of file qgslinesymbollayer.h.

◆ mPlacement

Placement QgsMarkerLineSymbolLayer::mPlacement
protected

Definition at line 377 of file qgslinesymbollayer.h.

◆ mRotateMarker

bool QgsMarkerLineSymbolLayer::mRotateMarker
protected

Definition at line 372 of file qgslinesymbollayer.h.


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