QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSARROWSYMBOLLAYER_H
17 #define QGSARROWSYMBOLLAYER_H
19 #include "qgis_core.h"
150 void setColor(
const QColor &
c )
override;
151 QColor
color()
const override;
160 std::unique_ptr<QgsFillSymbol> mSymbol;
162 double mArrowWidth = 1.0;
166 double mArrowStartWidth = 1.0;
170 double mHeadLength = 1.5;
173 double mHeadThickness = 1.5;
177 HeadType mHeadType = HeadSingle;
178 ArrowType mArrowType = ArrowPlain;
179 bool mIsCurved =
true;
180 bool mIsRepeated =
true;
182 double mScaledArrowWidth = 1.0;
183 double mScaledArrowStartWidth = 1.0;
184 double mScaledHeadLength = 1.5;
185 double mScaledHeadThickness = 1.5;
186 double mScaledOffset = 0.0;
187 HeadType mComputedHeadType = HeadSingle;
188 ArrowType mComputedArrowType = ArrowPlain;
190 std::unique_ptr<QgsExpressionContextScope> mExpressionScope;
QgsMapUnitScale headThicknessUnitScale() const
Gets the scale for the head height.
ArrowType
Possible arrow types.
HeadType headType() const
Gets the current head type.
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
RenderUnit
Rendering size units.
virtual void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context)=0
Renders the line symbol layer along the line joining points, using the given render context.
virtual double width() const
Returns the estimated width for the line symbol layer.
QgsUnitTypes::RenderUnit arrowStartWidthUnit() const
Gets the unit for the arrow start width.
void setArrowStartWidth(double width)
Sets the arrow start width.
void setHeadThicknessUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the head height.
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
void setHeadLengthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the head length.
QgsUnitTypes::RenderUnit arrowWidthUnit() const
Gets the unit for the arrow width.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
Contains information about the context of a rendering operation.
QgsUnitTypes::RenderUnit headLengthUnit() const
Gets the unit for the head length.
@ RenderMillimeters
Millimeters.
Abstract base class for all rendered symbols.
void setArrowStartWidthUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the arrow start width.
double headLength() const
Gets the current arrow head length.
void setIsRepeated(bool isRepeated)
Sets whether the arrow is repeated along the line.
void setHeadThicknessUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the head height.
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
void setHeadThickness(double thickness)
Sets the arrow head height.
Line symbol layer used for representing lines as arrows.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
HeadType
Possible head types.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
double arrowStartWidth() const
Gets current arrow start width. Only meaningful for single headed arrows.
double headThickness() const
Gets the current arrow head height.
void setHeadLengthUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the head length.
virtual QVariantMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QgsMapUnitScale arrowStartWidthUnitScale() const
Gets the scale for the arrow start width.
QgsUnitTypes::RenderUnit headThicknessUnit() const
Gets the unit for the head height.
Struct for storing maximum and minimum scales for measurements in map units.
QgsMapUnitScale arrowWidthUnitScale() const
Gets the scale for the arrow width.
void setHeadType(HeadType type)
Sets the head type.
virtual bool canCauseArtifactsBetweenAdjacentTiles() const
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when t...
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
void setArrowWidthUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the arrow width.
bool isCurved() const
Returns whether it is a curved arrow or a straight one.
void setArrowType(ArrowType type)
Sets the arrow type.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
Qgis::SymbolType type() const
void setArrowStartWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the arrow start width.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
virtual QString layerType() const =0
Returns a string that represents this layer type.
void setArrowWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the arrow width.
virtual QColor color() const
Returns the "representative" color of the symbol layer.
void setArrowWidth(double width)
Sets the arrow width.
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
bool isRepeated() const
Returns whether the arrow is repeated along the line or not.
ArrowType arrowType() const
Gets the current arrow type.
void setHeadLength(double length)
Sets the arrow head length.
double arrowWidth() const
Gets current arrow width.
void setIsCurved(bool isCurved)
Sets whether it is a curved arrow or a straight one.
QgsMapUnitScale headLengthUnitScale() const
Gets the scale for the head length.