QGIS/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in

388 lines
10 KiB
Plaintext
Raw Normal View History

2017-06-07 16:07:17 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgslinesymbollayer.h *
2017-06-07 16:07:17 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-08-06 11:01:42 +02:00
class QgsSimpleLineSymbolLayer : QgsLineSymbolLayer
{
2017-06-07 16:07:17 +02:00
%TypeHeaderCode
2017-06-07 16:07:17 +02:00
#include "qgslinesymbollayer.h"
%End
public:
2017-06-07 16:07:17 +02:00
QgsSimpleLineSymbolLayer( const QColor &color = DEFAULT_SIMPLELINE_COLOR,
double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-07 16:07:17 +02:00
virtual QString layerType() const;
2017-06-07 16:07:17 +02:00
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
2014-05-27 23:22:50 +02:00
virtual QgsSimpleLineSymbolLayer *clone() const /Factory/;
2017-06-07 16:07:17 +02:00
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;
2014-01-27 09:22:24 +01:00
2017-06-07 16:07:17 +02:00
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
Qt::PenStyle penStyle() const;
void setPenStyle( Qt::PenStyle style );
Qt::PenJoinStyle penJoinStyle() const;
void setPenJoinStyle( Qt::PenJoinStyle style );
Qt::PenCapStyle penCapStyle() const;
void setPenCapStyle( Qt::PenCapStyle style );
bool useCustomDashPattern() const;
void setUseCustomDashPattern( bool b );
void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for lengths used in the custom dash pattern.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: length units
.. seealso:: :py:func:`customDashPatternUnit`
2017-06-07 16:07:17 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit customDashPatternUnit() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for lengths used in the custom dash pattern.
.. seealso:: :py:func:`setCustomDashPatternUnit`
2017-06-07 16:07:17 +02:00
%End
const QgsMapUnitScale &customDashPatternMapUnitScale() const;
2017-06-07 16:07:17 +02:00
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale &scale );
QVector<qreal> customDashVector() const;
void setCustomDashVector( const QVector<qreal> &vector );
2014-01-27 09:22:24 +01:00
bool drawInsidePolygon() const;
void setDrawInsidePolygon( bool drawInsidePolygon );
2014-01-27 09:22:24 +01:00
2017-06-07 16:07:17 +02:00
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;
protected:
2014-01-27 09:22:24 +01:00
};
2017-06-07 16:07:17 +02:00
2016-08-06 11:01:42 +02:00
class QgsMarkerLineSymbolLayer : QgsLineSymbolLayer
{
2017-06-07 16:07:17 +02:00
%TypeHeaderCode
2017-06-07 16:07:17 +02:00
#include "qgslinesymbollayer.h"
%End
public:
2016-08-06 11:01:42 +02:00
QgsMarkerLineSymbolLayer( bool rotateMarker = DEFAULT_MARKERLINE_ROTATE,
2017-06-07 16:07:17 +02:00
double interval = DEFAULT_MARKERLINE_INTERVAL );
enum Placement
{
Interval,
Vertex,
LastVertex,
FirstVertex,
2016-02-14 03:50:23 +01:00
CentralPoint,
CurvePoint
};
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Create a new MarkerLineSymbolLayerV2
2017-06-07 16:07:17 +02:00
2017-12-15 10:36:55 -04:00
:param properties: A property map to deserialize saved information from properties()
:return: A new MarkerLineSymbolLayerV2
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Create a new MarkerLineSymbolLayerV2 from SLD
:param element: An SLD XML DOM element
2017-06-07 16:07:17 +02:00
2017-12-15 10:36:55 -04:00
:return: A new MarkerLineSymbolLayerV2
2017-06-07 16:07:17 +02:00
%End
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual QgsStringMap properties() const;
2017-06-07 16:07:17 +02:00
virtual QgsMarkerLineSymbolLayer *clone() const /Factory/;
2017-06-07 16:07:17 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual void setColor( const QColor &color );
virtual QColor color() const;
2017-06-07 16:07:17 +02:00
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual void setWidth( double width );
virtual double width() const;
2017-06-07 16:07:17 +02:00
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
bool rotateMarker() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Shall the marker be rotated.
:return: True if the marker should be rotated.
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
void setRotateMarker( bool rotate );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Shall the marker be rotated.
2017-06-07 16:07:17 +02:00
%End
double interval() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval between individual markers. Units are specified through intervalUnits().
.. seealso:: :py:func:`setInterval`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`intervalUnit`
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
void setInterval( double interval );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval between individual markers.
2017-12-15 21:36:08 -04:00
2018-05-25 09:00:58 +10:00
:param interval: interval size. Units are specified through setIntervalUnit()
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`interval`
2017-12-15 10:36:55 -04:00
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`setIntervalUnit`
2017-06-07 16:07:17 +02:00
%End
2014-01-27 09:22:24 +01:00
Placement placement() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The placement of the markers.
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
2014-01-27 09:22:24 +01:00
void setPlacement( Placement p );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The placement of the markers.
2017-06-07 16:07:17 +02:00
%End
double offsetAlongLine() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLine`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`placement`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-07 16:07:17 +02:00
%End
void setOffsetAlongLine( double offsetAlongLine );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param offsetAlongLine: Distance to offset markers along the line. The offset
unit is set via setOffsetAlongLineUnit.
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLine`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setPlacement`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-07 16:07:17 +02:00
%End
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the unit used for calculating the offset along line for markers.
:return: Offset along line unit type.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLine`
2017-06-07 16:07:17 +02:00
%End
void setOffsetAlongLineUnit( QgsUnitTypes::RenderUnit unit );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the unit used for calculating the offset along line for markers.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: Offset along line unit type.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLine`
2017-06-07 16:07:17 +02:00
%End
const QgsMapUnitScale &offsetAlongLineMapUnitScale() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the map unit scale used for calculating the offset in map units along line for markers.
:return: Offset along line map unit scale.
2017-06-07 16:07:17 +02:00
%End
2014-04-06 21:14:02 +02:00
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale &scale );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the map unit scale used for calculating the offset in map units along line for markers.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param scale: Offset along line map unit scale.
2017-06-07 16:07:17 +02:00
%End
2014-01-27 09:22:24 +01:00
void setIntervalUnit( QgsUnitTypes::RenderUnit unit );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the units for the interval between markers.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: interval units
.. seealso:: :py:func:`intervalUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setInterval`
2017-06-07 16:07:17 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit intervalUnit() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for the interval between markers.
.. seealso:: :py:func:`setIntervalUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`interval`
2017-06-07 16:07:17 +02:00
%End
void setIntervalMapUnitScale( const QgsMapUnitScale &scale );
const QgsMapUnitScale &intervalMapUnitScale() const;
2017-06-07 16:07:17 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
2017-06-07 16:07:17 +02:00
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) 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 );
2017-06-07 16:07:17 +02:00
private:
QgsMarkerLineSymbolLayer( const QgsMarkerLineSymbolLayer &other );
};
2017-06-07 16:07:17 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgslinesymbollayer.h *
2017-06-07 16:07:17 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/