16 #ifndef QGSARROWSYMBOLLAYERV2_H 17 #define QGSARROWSYMBOLLAYERV2_H 19 #include "qgis_core.h" 145 void setColor(
const QColor &
c )
override;
146 QColor
color()
const override;
154 std::unique_ptr<QgsFillSymbol> mSymbol;
156 double mArrowWidth = 1.0;
160 double mArrowStartWidth = 1.0;
164 double mHeadLength = 1.5;
167 double mHeadThickness = 1.5;
173 bool mIsCurved =
true;
174 bool mIsRepeated =
true;
176 double mScaledArrowWidth = 1.0;
177 double mScaledArrowStartWidth = 1.0;
178 double mScaledHeadLength = 1.5;
179 double mScaledHeadThickness = 1.5;
180 double mScaledOffset = 0.0;
181 HeadType mComputedHeadType = HeadSingle;
182 ArrowType mComputedArrowType = ArrowPlain;
184 std::unique_ptr<QgsExpressionContextScope> mExpressionScope;
double arrowWidth() const
Gets current arrow width.
void setHeadThicknessUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the head height.
void setHeadLengthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the head length.
ArrowType arrowType() const
Gets the current arrow type.
double arrowStartWidth() const
Gets current arrow start width. Only meaningful for single headed arrows.
Abstract base class for all rendered symbols.
void setArrowWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the arrow width.
QgsMapUnitScale arrowWidthUnitScale() const
Gets the scale for the arrow width.
QgsUnitTypes::RenderUnit headLengthUnit() const
Gets the unit for the head length.
void setHeadThicknessUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the head height.
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QgsUnitTypes::RenderUnit arrowStartWidthUnit() const
Gets the unit for the arrow start width.
QMap< QString, QString > QgsStringMap
double headLength() const
Gets the current arrow head length.
virtual void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context)=0
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
virtual void setColor(const QColor &color)
The fill color.
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
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
void setHeadLength(double length)
Sets the arrow head length.
void setHeadThickness(double thickness)
Sets the arrow head height.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties...
QgsSymbol::SymbolType type() const
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
void setArrowWidth(double width)
Sets the arrow width.
ArrowType
Possible arrow types.
void setIsRepeated(bool isRepeated)
Sets whether the arrow is repeated along the line.
HeadType headType() const
Gets the current head type.
QgsMapUnitScale headThicknessUnitScale() const
Gets the scale for the head height.
QgsUnitTypes::RenderUnit arrowWidthUnit() const
Gets the unit for the arrow width.
bool isCurved() const
Returns whether it is a curved arrow or a straight one.
virtual double width() const
Returns the estimated width for the line symbol layer.
void setIsCurved(bool isCurved)
Sets whether it is a curved arrow or a straight one.
QgsUnitTypes::RenderUnit headThicknessUnit() const
Gets the unit for the head height.
Contains information about the context of a rendering operation.
void setHeadLengthUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the head length.
void setArrowType(ArrowType type)
Sets the arrow type.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Struct for storing maximum and minimum scales for measurements in map units.
void setArrowWidthUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the arrow width.
void setHeadType(HeadType type)
Sets the head type.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
bool isRepeated() const
Returns whether the arrow is repeated along the line or not.
Line symbol layer used for representing lines as arrows.
HeadType
Possible head types.
void setArrowStartWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the arrow start width.
QgsMapUnitScale headLengthUnitScale() const
Gets the scale for the head length.
virtual QColor color() const
The fill color.
QgsMapUnitScale arrowStartWidthUnitScale() const
Gets the scale for the arrow start width.
void setArrowStartWidth(double width)
Sets the arrow start width.
RenderUnit
Rendering size units.
void setArrowStartWidthUnitScale(const QgsMapUnitScale &scale)
Sets the scale for the arrow start width.
virtual void startRender(QgsSymbolRenderContext &context)=0
virtual QString layerType() const =0
Returns a string that represents this layer type.
double headThickness() const
Gets the current arrow head height.