QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
18 #ifndef QGSVECTORFIELDSYMBOLLAYER_H
19 #define QGSVECTORFIELDSYMBOLLAYER_H
21 #include "qgis_core.h"
40 ClockwiseFromNorth = 0,
41 CounterclockwiseFromEast
55 QString
layerType()
const override {
return QStringLiteral(
"VectorField" ); }
70 void toSld( QDomDocument &doc, QDomElement &element, const
QgsStringMap &props ) const override;
74 QSet<QString> usedAttributes( const
QgsRenderContext &context ) const override;
75 bool hasDataDefinedProperties() const override;
78 void setXAttribute( const QString &attribute ) { mXAttribute = attribute; }
79 QString xAttribute()
const {
return mXAttribute; }
80 void setYAttribute(
const QString &attribute ) { mYAttribute = attribute; }
81 QString yAttribute()
const {
return mYAttribute; }
82 void setScale(
double s ) { mScale = s; }
83 double scale()
const {
return mScale; }
84 void setVectorFieldType( VectorFieldType type ) { mVectorFieldType =
type; }
85 VectorFieldType vectorFieldType()
const {
return mVectorFieldType; }
86 void setAngleOrientation( AngleOrientation orientation ) { mAngleOrientation = orientation; }
87 AngleOrientation angleOrientation()
const {
return mAngleOrientation; }
88 void setAngleUnits( AngleUnits units ) { mAngleUnits = units; }
89 AngleUnits angleUnits()
const {
return mAngleUnits; }
110 void setDistanceMapUnitScale(
const QgsMapUnitScale &scale ) { mDistanceMapUnitScale = scale; }
111 const QgsMapUnitScale &distanceMapUnitScale()
const {
return mDistanceMapUnitScale; }
130 std::unique_ptr< QgsLineSymbol > mLineSymbol;
137 void convertPolarToCartesian(
double length,
double angle,
double &x,
double &y )
const;
140 #endif // QGSVECTORFIELDSYMBOLLAYER_H
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
RenderUnit
Rendering size units.
QgsMapUnitScale mapUnitScale() const override
virtual void setColor(const QColor &color)
The fill color.
virtual QColor color() const
The fill color.
void startRender(QgsSymbolRenderContext &context) override
Called before a set of rendering operations commences on the supplied render context.
@ RenderMillimeters
Millimeters.
Abstract base class for marker symbol layers.
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
Struct for storing maximum and minimum scales for measurements in map units.
virtual QgsSymbol * subSymbol()
Returns the symbol's sub symbol, if present.
QMap< QString, QString > QgsStringMap
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
virtual QRectF bounds(QPointF point, QgsSymbolRenderContext &context)=0
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
QgsSymbol::SymbolType type() const
virtual QString layerType() const =0
Returns a string that represents this layer type.
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
void stopRender(QgsSymbolRenderContext &context) override
Called after a set of rendering operations has finished on the supplied render context.