QGIS API Documentation
2.2.0-Valmiera
|
#include <qgslinesymbollayerv2.h>
Public Types | |
enum | Placement { Interval, Vertex, LastVertex, FirstVertex, CentralPoint } |
Public Member Functions | |
QgsMarkerLineSymbolLayerV2 (bool rotateMarker=DEFAULT_MARKERLINE_ROTATE, double interval=DEFAULT_MARKERLINE_INTERVAL) | |
~QgsMarkerLineSymbolLayerV2 () | |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
void | renderPolyline (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
void | setColor (const QColor &color) |
QgsSymbolV2 * | subSymbol () |
bool | setSubSymbol (QgsSymbolV2 *symbol) |
virtual void | setWidth (double width) |
virtual double | width () const |
double | estimateMaxBleed () const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. | |
bool | rotateMarker () const |
void | setRotateMarker (bool rotate) |
double | interval () const |
void | setInterval (double interval) |
double | offset () const |
void | setOffset (double offset) |
Placement | placement () const |
void | setPlacement (Placement p) |
QgsSymbolV2::OutputUnit | intervalUnit () const |
void | setIntervalUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | offsetUnit () const |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
Public Member Functions inherited from QgsLineSymbolLayerV2 | |
virtual void | renderPolygonOutline (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
void | setWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | widthUnit () const |
void | drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size) |
virtual double | dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const |
Public Member Functions inherited from QgsSymbolLayerV2 | |
virtual QColor | color () const |
virtual void | setOutlineColor (const QColor &color) |
Set outline color. | |
virtual QColor | outlineColor () const |
Get outline color. | |
virtual void | setFillColor (const QColor &color) |
Set fill color. | |
virtual QColor | fillColor () const |
Get fill color. | |
virtual | ~QgsSymbolLayerV2 () |
virtual QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
QgsSymbolV2::SymbolType | type () const |
void | setLocked (bool locked) |
bool | isLocked () const |
void | setRenderingPass (int renderingPass) |
int | renderingPass () const |
virtual QSet< QString > | usedAttributes () const |
virtual const QgsExpression * | dataDefinedProperty (const QString &property) const |
virtual QString | dataDefinedPropertyString (const QString &property) const |
virtual void | setDataDefinedProperty (const QString &property, const QString &expressionString) |
virtual void | removeDataDefinedProperty (const QString &property) |
virtual void | removeDataDefinedProperties () |
bool | hasDataDefinedProperties () const |
virtual bool | writeDxf (QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, const QgsSymbolV2RenderContext *context, const QgsFeature *f, const QPointF &shift=QPointF(0.0, 0.0)) const |
virtual QColor | dxfColor (const QgsSymbolV2RenderContext &context) const |
virtual QVector< qreal > | dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const |
virtual Qt::PenStyle | dxfPenStyle () const |
Static Public Member Functions | |
static QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
static QgsSymbolLayerV2 * | createFromSld (QDomElement &element) |
Protected Member Functions | |
void | renderPolylineInterval (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
void | renderPolylineVertex (const QPolygonF &points, QgsSymbolV2RenderContext &context, Placement placement=Vertex) |
void | renderPolylineCentral (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
double | markerAngle (const QPolygonF &points, bool isRing, int vertex) |
Protected Member Functions inherited from QgsLineSymbolLayerV2 | |
QgsLineSymbolLayerV2 (bool locked=false) | |
Protected Member Functions inherited from QgsSymbolLayerV2 | |
QgsSymbolLayerV2 (QgsSymbolV2::SymbolType type, bool locked=false) | |
virtual void | prepareExpressions (const QgsVectorLayer *vl, double scale=-1.0) |
virtual QgsExpression * | expression (const QString &property) const |
void | saveDataDefinedProperties (QgsStringMap &stringMap) const |
Saves data defined properties to string map. | |
void | copyDataDefinedProperties (QgsSymbolLayerV2 *destLayer) const |
Copies data defined properties of this layer to another symbol layer. |
Protected Attributes | |
bool | mRotateMarker |
double | mInterval |
QgsSymbolV2::OutputUnit | mIntervalUnit |
QgsMarkerSymbolV2 * | mMarker |
double | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
Placement | mPlacement |
Protected Attributes inherited from QgsLineSymbolLayerV2 | |
double | mWidth |
QgsSymbolV2::OutputUnit | mWidthUnit |
Protected Attributes inherited from QgsSymbolLayerV2 | |
QgsSymbolV2::SymbolType | mType |
bool | mLocked |
QColor | mColor |
int | mRenderingPass |
QMap< QString, QgsExpression * > | mDataDefinedProperties |
Additional Inherited Members | |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 133 of file qgslinesymbollayerv2.h.
Definition at line 141 of file qgslinesymbollayerv2.h.
QgsMarkerLineSymbolLayerV2::QgsMarkerLineSymbolLayerV2 | ( | bool | rotateMarker = DEFAULT_MARKERLINE_ROTATE , |
double | interval = DEFAULT_MARKERLINE_INTERVAL |
||
) |
Definition at line 523 of file qgslinesymbollayerv2.cpp.
References Interval, interval(), mInterval, mIntervalUnit, QgsSymbolV2::MM, mMarker, mOffset, mOffsetUnit, mPlacement, mRotateMarker, rotateMarker(), and setSubSymbol().
Referenced by clone(), create(), and createFromSld().
QgsMarkerLineSymbolLayerV2::~QgsMarkerLineSymbolLayerV2 | ( | ) |
Definition at line 536 of file qgslinesymbollayerv2.cpp.
References mMarker.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 985 of file qgslinesymbollayerv2.cpp.
References QgsMarkerSymbolV2::clone(), QgsSymbolLayerV2::copyDataDefinedProperties(), mInterval, mIntervalUnit, mMarker, mOffset, mOffsetUnit, mPlacement, mRotateMarker, QgsMarkerLineSymbolLayerV2(), setIntervalUnit(), setOffset(), setOffsetUnit(), setPlacement(), and setSubSymbol().
|
static |
Definition at line 541 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::decodeOutputUnit(), DEFAULT_MARKERLINE_INTERVAL, DEFAULT_MARKERLINE_ROTATE, FirstVertex, Interval, interval(), LastVertex, QgsMarkerLineSymbolLayerV2(), QgsSymbolLayerV2::setDataDefinedProperty(), setIntervalUnit(), setOffset(), setOffsetUnit(), setPlacement(), and Vertex.
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 1072 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::createMarkerLayerFromSld(), FirstVertex, QgsSymbolLayerV2Utils::getVendorOptionList(), Interval, interval(), LastVertex, offset(), placement(), QgsDebugMsg, QgsMarkerLineSymbolLayerV2(), rotateMarker(), setInterval(), setOffset(), setPlacement(), setSubSymbol(), and Vertex.
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
virtual |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape.
Eg, polygons drawn with an outline will draw half the width of the outline outside of the polygon. This amount is estimated, since it may be affected by data defined symbology rules.
Reimplemented from QgsSymbolLayerV2.
Definition at line 1171 of file qgslinesymbollayerv2.cpp.
References mMarker, mOffset, and QgsMarkerSymbolV2::size().
|
inline |
Definition at line 186 of file qgslinesymbollayerv2.h.
Referenced by QgsLinePatternFillSymbolLayer::applyPattern(), create(), createFromSld(), QgsMarkerLineSymbolLayerV2(), and renderPolylineInterval().
|
inline |
Definition at line 195 of file qgslinesymbollayerv2.h.
Referenced by QgsLinePatternFillSymbolLayer::applyPattern().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 596 of file qgslinesymbollayerv2.cpp.
|
protected |
Definition at line 819 of file qgslinesymbollayerv2.cpp.
References _averageAngle(), MathUtils::angle(), and MyLine::angle().
Referenced by renderPolylineVertex().
|
inline |
Definition at line 189 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and renderPolyline().
|
inline |
Definition at line 198 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1161 of file qgslinesymbollayerv2.cpp.
References mIntervalUnit, QgsSymbolV2::Mixed, and mOffsetUnit.
|
inline |
Definition at line 192 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and renderPolyline().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 943 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::encodeOutputUnit(), FirstVertex, LastVertex, mInterval, mIntervalUnit, mOffset, mOffsetUnit, mPlacement, mRotateMarker, QgsSymbolLayerV2::saveDataDefinedProperties(), and Vertex.
|
virtual |
Implements QgsLineSymbolLayerV2.
Definition at line 630 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), FirstVertex, Interval, LastVertex, QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mOffset, mOffsetUnit, mPlacement, offset(), offsetLine(), placement(), QgsSymbolV2RenderContext::renderContext(), renderPolylineCentral(), renderPolylineInterval(), renderPolylineVertex(), and Vertex.
|
protected |
Definition at line 894 of file qgslinesymbollayerv2.cpp.
References QgsMarkerSymbolV2::angle(), MyLine::angle(), QgsSymbolV2RenderContext::feature(), M_PI, mMarker, mRotateMarker, QgsSymbolV2RenderContext::renderContext(), QgsMarkerSymbolV2::renderPoint(), QgsSymbolV2RenderContext::selected(), and QgsMarkerSymbolV2::setAngle().
Referenced by renderPolyline().
|
protected |
Definition at line 687 of file qgslinesymbollayerv2.cpp.
References QgsMarkerSymbolV2::angle(), MyLine::angle(), MyLine::diffForInterval(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), interval(), MyLine::length(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), M_PI, mInterval, mIntervalUnit, mMarker, mRotateMarker, QgsSymbolV2RenderContext::renderContext(), QgsMarkerSymbolV2::renderPoint(), QgsSymbolV2RenderContext::selected(), and QgsMarkerSymbolV2::setAngle().
Referenced by renderPolyline().
|
protected |
Definition at line 770 of file qgslinesymbollayerv2.cpp.
References MathUtils::angle(), QgsMarkerSymbolV2::angle(), QgsSymbolV2RenderContext::feature(), FirstVertex, LastVertex, M_PI, markerAngle(), mMarker, mRotateMarker, QgsSymbolV2RenderContext::renderContext(), QgsMarkerSymbolV2::renderPoint(), QgsSymbolV2RenderContext::selected(), QgsMarkerSymbolV2::setAngle(), and Vertex.
Referenced by renderPolyline().
|
inline |
Definition at line 183 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and QgsMarkerLineSymbolLayerV2().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 601 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), QgsSymbolLayerV2::mColor, mMarker, and QgsSymbolV2::setColor().
|
inline |
Definition at line 187 of file qgslinesymbollayerv2.h.
Referenced by QgsLinePatternFillSymbolLayer::applyPattern(), and createFromSld().
|
inline |
Definition at line 196 of file qgslinesymbollayerv2.h.
|
inline |
Definition at line 190 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 199 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1155 of file qgslinesymbollayerv2.cpp.
References mIntervalUnit, and mOffsetUnit.
|
inline |
Definition at line 193 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 184 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 971 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2::color(), QgsSymbolV2::Marker, QgsSymbolLayerV2::mColor, mMarker, and QgsSymbolV2::type().
Referenced by clone(), createFromSld(), and QgsMarkerLineSymbolLayerV2().
|
virtual |
Reimplemented from QgsLineSymbolLayerV2.
Definition at line 1145 of file qgslinesymbollayerv2.cpp.
References mMarker, and QgsMarkerSymbolV2::setSize().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 607 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2RenderContext::alpha(), QgsSymbolV2::DataDefinedRotation, QgsSymbolV2::DataDefinedSizeScale, QgsSymbolV2RenderContext::layer(), mMarker, mRotateMarker, QgsSymbolLayerV2::prepareExpressions(), QgsSymbolV2RenderContext::renderContext(), QgsRenderContext::rendererScale(), QgsSymbolV2RenderContext::renderHints(), QgsSymbolV2::setAlpha(), QgsSymbolV2::setRenderHints(), and QgsSymbolV2::startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 625 of file qgslinesymbollayerv2.cpp.
References mMarker, QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2::stopRender().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 966 of file qgslinesymbollayerv2.cpp.
References mMarker.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 997 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::createFunctionElement(), QgsSymbolLayerV2Utils::createGeometryElement(), QgsSymbolLayerV2Utils::createVendorOptionElement(), FirstVertex, LastVertex, QgsSymbolLayerV2::layerType(), mInterval, mMarker, mOffset, mPlacement, mRotateMarker, qgsDoubleNear(), QgsSymbolV2::symbolLayer(), QgsSymbolV2::symbolLayerCount(), Vertex, and QgsMarkerSymbolLayerV2::writeSldMarker().
|
virtual |
Reimplemented from QgsLineSymbolLayerV2.
Definition at line 1150 of file qgslinesymbollayerv2.cpp.
References mMarker, and QgsMarkerSymbolV2::size().
|
protected |
Definition at line 212 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolylineInterval(), and toSld().
|
protected |
Definition at line 213 of file qgslinesymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolylineInterval(), and setOutputUnit().
|
protected |
Definition at line 214 of file qgslinesymbollayerv2.h.
Referenced by clone(), estimateMaxBleed(), QgsMarkerLineSymbolLayerV2(), renderPolylineCentral(), renderPolylineInterval(), renderPolylineVertex(), setColor(), setSubSymbol(), setWidth(), startRender(), stopRender(), subSymbol(), toSld(), width(), and ~QgsMarkerLineSymbolLayerV2().
|
protected |
Definition at line 215 of file qgslinesymbollayerv2.h.
Referenced by clone(), estimateMaxBleed(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolyline(), and toSld().
|
protected |
Definition at line 216 of file qgslinesymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolyline(), and setOutputUnit().
|
protected |
Definition at line 217 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolyline(), and toSld().
|
protected |
Definition at line 211 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolylineCentral(), renderPolylineInterval(), renderPolylineVertex(), startRender(), and toSld().