QGIS/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in
Nyall Dawson fa202795b0 Dox++
2019-03-22 12:16:22 +10:00

529 lines
15 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgslinesymbollayer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSimpleLineSymbolLayer : QgsLineSymbolLayer
{
%Docstring
A simple line symbol layer, which renders lines using a line in a variety of styles (e.g. solid, dotted, dashed).
%End
%TypeHeaderCode
#include "qgslinesymbollayer.h"
%End
public:
QgsSimpleLineSymbolLayer( const QColor &color = DEFAULT_SIMPLELINE_COLOR,
double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );
%Docstring
Constructor for QgsSimpleLineSymbolLayer. Creates a simple line
symbol in the specified ``color``, ``width`` (in millimeters)
and ``penStyle``.
%End
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
%Docstring
Creates a new QgsSimpleLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
QgsSimpleLineSymbolLayer.properties() ).
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
%Docstring
Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM ``element``.
%End
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsSimpleLineSymbolLayer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
virtual QVector<qreal> dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const;
virtual Qt::PenStyle dxfPenStyle() const;
virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
virtual double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
Qt::PenStyle penStyle() const;
%Docstring
Returns the pen style used to render the line (e.g. solid, dashed, etc).
.. seealso:: :py:func:`setPenStyle`
%End
void setPenStyle( Qt::PenStyle style );
%Docstring
Sets the pen ``style`` used to render the line (e.g. solid, dashed, etc).
.. seealso:: :py:func:`penStyle`
%End
Qt::PenJoinStyle penJoinStyle() const;
%Docstring
Returns the pen join style used to render the line (e.g. miter, bevel, round, etc).
.. seealso:: :py:func:`setPenJoinStyle`
%End
void setPenJoinStyle( Qt::PenJoinStyle style );
%Docstring
Sets the pen join ``style`` used to render the line (e.g. miter, bevel, round, etc).
.. seealso:: :py:func:`penJoinStyle`
%End
Qt::PenCapStyle penCapStyle() const;
%Docstring
Returns the pen cap style used to render the line (e.g. flat, square, round, etc).
.. seealso:: :py:func:`setPenCapStyle`
%End
void setPenCapStyle( Qt::PenCapStyle style );
%Docstring
Sets the pen cap ``style`` used to render the line (e.g. flat, square, round, etc).
.. seealso:: :py:func:`penCapStyle`
%End
bool useCustomDashPattern() const;
%Docstring
Returns ``True`` if the line uses a custom dash pattern.
.. seealso:: :py:func:`setUseCustomDashPattern`
.. seealso:: :py:func:`customDashPatternUnit`
.. seealso:: :py:func:`customDashVector`
%End
void setUseCustomDashPattern( bool b );
%Docstring
Sets whether the line uses a custom dash pattern.
.. seealso:: :py:func:`useCustomDashPattern`
.. seealso:: :py:func:`setCustomDashPatternUnit`
.. seealso:: :py:func:`setCustomDashVector`
%End
void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Sets the ``unit`` for lengths used in the custom dash pattern.
.. seealso:: :py:func:`customDashPatternUnit`
%End
QgsUnitTypes::RenderUnit customDashPatternUnit() const;
%Docstring
Returns the units for lengths used in the custom dash pattern.
.. seealso:: :py:func:`setCustomDashPatternUnit`
%End
const QgsMapUnitScale &customDashPatternMapUnitScale() const;
%Docstring
Returns the map unit scale for lengths used in the custom dash pattern.
.. seealso:: :py:func:`setCustomDashPatternMapUnitScale`
%End
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for lengths used in the custom dash pattern.
.. seealso:: :py:func:`customDashPatternMapUnitScale`
%End
QVector<qreal> customDashVector() const;
%Docstring
Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths
used while rendering a custom dash pattern.
Units for the vector are specified by customDashPatternUnit()
This setting is only used when useCustomDashPattern() returns ``True``.
.. seealso:: :py:func:`setCustomDashVector`
.. seealso:: :py:func:`customDashPatternUnit`
.. seealso:: :py:func:`useCustomDashPattern`
%End
void setCustomDashVector( const QVector<qreal> &vector );
%Docstring
Sets the custom dash ``vector``, which is the pattern of alternating drawn/skipped lengths
used while rendering a custom dash pattern.
Units for the vector are specified by customDashPatternUnit()
This setting is only used when useCustomDashPattern() returns ``True``.
.. seealso:: :py:func:`customDashVector`
.. seealso:: :py:func:`setCustomDashPatternUnit`
.. seealso:: :py:func:`setUseCustomDashPattern`
%End
bool drawInsidePolygon() const;
%Docstring
Returns ``True`` if the line should only be drawn inside polygons, and any portion
of the line which falls outside the polygon should be clipped away.
This setting only has an effect when the line symbol is being
used to render polygon rings.
.. seealso:: :py:func:`setDrawInsidePolygon`
%End
void setDrawInsidePolygon( bool drawInsidePolygon );
%Docstring
Sets whether the line should only be drawn inside polygons, and any portion
of the line which falls outside the polygon should be clipped away.
This setting only has an effect when the line symbol is being
used to render polygon rings.
.. seealso:: :py:func:`drawInsidePolygon`
%End
};
class QgsMarkerLineSymbolLayer : QgsLineSymbolLayer
{
%Docstring
Line symbol layer type which draws repeating marker symbols along a line feature.
%End
%TypeHeaderCode
#include "qgslinesymbollayer.h"
%End
public:
QgsMarkerLineSymbolLayer( bool rotateMarker = DEFAULT_MARKERLINE_ROTATE,
double interval = DEFAULT_MARKERLINE_INTERVAL );
%Docstring
Constructor for QgsMarkerLineSymbolLayer. Creates a marker line
with a default marker symbol, placed at the specified ``interval`` (in millimeters).
The ``rotateMarker`` argument specifies whether individual marker symbols
should be rotated to match the line segment alignment.
%End
enum Placement
{
Interval,
Vertex,
LastVertex,
FirstVertex,
CentralPoint,
CurvePoint,
};
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
%Docstring
Creates a new QgsMarkerLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
QgsMarkerLineSymbolLayer.properties() ).
%End
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
%Docstring
Creates a new QgsMarkerLineSymbolLayer from an SLD XML DOM ``element``.
%End
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
virtual QgsMarkerLineSymbolLayer *clone() const /Factory/;
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual void setColor( const QColor &color );
virtual QColor color() const;
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual void setWidth( double width );
virtual double width() const;
virtual double width( const QgsRenderContext &context ) const;
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
bool rotateMarker() const;
%Docstring
Returns ``True`` if the repeating symbols will be rotated to match their line segment orientation.
.. seealso:: :py:func:`setRotateMarker`
%End
void setRotateMarker( bool rotate );
%Docstring
Sets whether the repeating symbols should be rotated to match their line segment orientation.
.. seealso:: :py:func:`rotateMarker`
%End
double interval() const;
%Docstring
Returns the interval between individual markers. Units are specified through intervalUnits().
.. seealso:: :py:func:`setInterval`
.. seealso:: :py:func:`intervalUnit`
%End
void setInterval( double interval );
%Docstring
Sets the interval between individual markers.
:param interval: interval size. Units are specified through setIntervalUnit()
.. seealso:: :py:func:`interval`
.. seealso:: :py:func:`setIntervalUnit`
%End
Placement placement() const;
%Docstring
Returns the placement of the symbols.
.. seealso:: :py:func:`setPlacement`
%End
void setPlacement( Placement p );
%Docstring
Sets the ``placement`` of the symbols.
.. seealso:: :py:func:`placement`
%End
double offsetAlongLine() const;
%Docstring
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.
:return: The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit.
.. seealso:: :py:func:`setOffsetAlongLine`
.. seealso:: :py:func:`offsetAlongLineUnit`
.. seealso:: :py:func:`placement`
.. versionadded:: 2.3
%End
void setOffsetAlongLine( double offsetAlongLine );
%Docstring
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.
:param offsetAlongLine: Distance to offset markers along the line. The offset
unit is set via setOffsetAlongLineUnit.
.. seealso:: :py:func:`offsetAlongLine`
.. seealso:: :py:func:`setOffsetAlongLineUnit`
.. seealso:: :py:func:`setPlacement`
.. versionadded:: 2.3
%End
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const;
%Docstring
Returns the unit used for calculating the offset along line for markers.
:return: Offset along line unit type.
.. seealso:: :py:func:`setOffsetAlongLineUnit`
.. seealso:: :py:func:`offsetAlongLine`
%End
void setOffsetAlongLineUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Sets the unit used for calculating the offset along line for markers.
:param unit: Offset along line unit type.
.. seealso:: :py:func:`offsetAlongLineUnit`
.. seealso:: :py:func:`setOffsetAlongLine`
%End
const QgsMapUnitScale &offsetAlongLineMapUnitScale() const;
%Docstring
Returns the map unit scale used for calculating the offset in map units along line for symbols.
.. seealso:: :py:func:`setOffsetAlongLineMapUnitScale`
%End
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` used for calculating the offset in map units along line for symbols.
.. seealso:: :py:func:`offsetAlongLineMapUnitScale`
%End
void setIntervalUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Sets the units for the interval between symbols.
:param unit: interval units
.. seealso:: :py:func:`intervalUnit`
.. seealso:: :py:func:`setInterval`
%End
QgsUnitTypes::RenderUnit intervalUnit() const;
%Docstring
Returns the units for the interval between symbols.
.. seealso:: :py:func:`setIntervalUnit`
.. seealso:: :py:func:`interval`
%End
void setIntervalMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` for the interval between symbols.
.. seealso:: :py:func:`intervalMapUnitScale`
.. seealso:: :py:func:`setIntervalUnit`
.. seealso:: :py:func:`setInterval`
%End
const QgsMapUnitScale &intervalMapUnitScale() const;
%Docstring
Returns the map unit scale for the interval between symbols.
.. seealso:: :py:func:`setIntervalMapUnitScale`
.. seealso:: :py:func:`intervalUnit`
.. seealso:: :py:func:`interval`
%End
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
virtual void setDataDefinedProperty( QgsSymbolLayer::Property key, const QgsProperty &property );
protected:
void renderPolylineInterval( const QPolygonF &points, QgsSymbolRenderContext &context );
void renderPolylineVertex( const QPolygonF &points, QgsSymbolRenderContext &context, Placement placement = Vertex );
void renderPolylineCentral( const QPolygonF &points, QgsSymbolRenderContext &context );
double markerAngle( const QPolygonF &points, bool isRing, int vertex );
private:
QgsMarkerLineSymbolLayer( const QgsMarkerLineSymbolLayer &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgslinesymbollayer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/