16 #ifndef QGSARROWSYMBOLLAYERV2_H 17 #define QGSARROWSYMBOLLAYERV2_H 19 #include "qgis_core.h" 144 void setColor(
const QColor &c )
override;
145 QColor
color()
const override;
153 std::unique_ptr<QgsFillSymbol> mSymbol;
155 double mArrowWidth = 1.0;
159 double mArrowStartWidth = 1.0;
163 double mHeadLength = 1.5;
166 double mHeadThickness = 1.5;
172 bool mIsCurved =
true;
173 bool mIsRepeated =
true;
175 double mScaledArrowWidth = 1.0;
176 double mScaledArrowStartWidth = 1.0;
177 double mScaledHeadLength = 1.5;
178 double mScaledHeadThickness = 1.5;
179 double mScaledOffset = 0.0;
180 HeadType mComputedHeadType = HeadSingle;
181 ArrowType mComputedArrowType = ArrowPlain;
183 std::unique_ptr<QgsExpressionContextScope> mExpressionScope;
void setHeadThicknessUnitScale(const QgsMapUnitScale &scale)
Set the scale for the head height.
void setHeadLengthUnit(QgsUnitTypes::RenderUnit unit)
Set the unit for the head length.
QgsUnitTypes::RenderUnit headThicknessUnit() const
Get the unit for the head height.
double arrowStartWidth() const
Get current arrow start width. Only meaningful for single headed arrows.
double arrowWidth() const
Get current arrow width.
void setArrowWidthUnit(QgsUnitTypes::RenderUnit unit)
Set the unit for the arrow width.
QgsMapUnitScale arrowStartWidthUnitScale() const
Get the scale for the arrow start width.
QgsMapUnitScale headLengthUnitScale() const
Get the scale for the head length.
void setHeadThicknessUnit(QgsUnitTypes::RenderUnit unit)
Set the unit for the head height.
ArrowType arrowType() const
Get the current arrow type.
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QMap< QString, QString > QgsStringMap
virtual double width() const
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.
bool isRepeated() const
Return whether the arrow is repeated along the line or not.
virtual bool setSubSymbol(QgsSymbol *symbol)
set layer's subsymbol. takes ownership of the passed symbol
void setHeadLength(double length)
Set the arrow head length.
void setHeadThickness(double thickness)
Set the arrow head height.
QgsUnitTypes::RenderUnit arrowStartWidthUnit() const
Get the unit for the arrow start width.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QColor color() const
The fill color.
void setArrowWidth(double width)
Set the arrow width.
ArrowType
Possible arrow types.
bool isCurved() const
Return whether it is a curved arrow or a straight one.
double headLength() const
Get the current arrow head length.
void setIsRepeated(bool isRepeated)
Set whether the arrow is repeated along the line.
QgsSymbol::SymbolType type() const
QgsMapUnitScale arrowWidthUnitScale() const
Get the scale for the arrow width.
QgsUnitTypes::RenderUnit arrowWidthUnit() const
Get the unit for the arrow width.
void setIsCurved(bool isCurved)
Set whether it is a curved arrow or a straight one.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
Contains information about the context of a rendering operation.
void setHeadLengthUnitScale(const QgsMapUnitScale &scale)
Set the scale for the head length.
void setArrowType(ArrowType type)
Set 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)
Set the scale for the arrow width.
QgsUnitTypes::RenderUnit headLengthUnit() const
Get the unit for the head length.
void setHeadType(HeadType type)
Set the head type.
QgsMapUnitScale headThicknessUnitScale() const
Get the scale for the head height.
Line symbol layer used for representing lines as arrows.
HeadType
Possible head types.
void setArrowStartWidthUnit(QgsUnitTypes::RenderUnit unit)
Set the unit for the arrow start width.
HeadType headType() const
Get the current head type.
void setArrowStartWidth(double width)
Set the arrow start width.
RenderUnit
Rendering size units.
void setArrowStartWidthUnitScale(const QgsMapUnitScale &scale)
Set 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
Get the current arrow head height.