QGIS API Documentation
2.2.0-Valmiera
|
#include <qgslinesymbollayerv2.h>
Public Member Functions | |
QgsSimpleLineSymbolLayerV2 (QColor color=DEFAULT_SIMPLELINE_COLOR, double width=DEFAULT_SIMPLELINE_WIDTH, Qt::PenStyle penStyle=DEFAULT_SIMPLELINE_PENSTYLE) | |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
void | renderPolyline (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
void | renderPolygonOutline (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
double | estimateMaxBleed () const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. More... | |
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) |
double | offset () const |
void | setOffset (double offset) |
QgsSymbolV2::OutputUnit | offsetUnit () const |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
bool | useCustomDashPattern () const |
void | setUseCustomDashPattern (bool b) |
QgsSymbolV2::OutputUnit | customDashPatternUnit () const |
void | setCustomDashPatternUnit (QgsSymbolV2::OutputUnit unit) |
QVector< qreal > | customDashVector () const |
void | setCustomDashVector (const QVector< qreal > &vector) |
bool | drawInsidePolygon () const |
void | setDrawInsidePolygon (bool drawInsidePolygon) |
QVector< qreal > | dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const |
Qt::PenStyle | dxfPenStyle () const |
double | dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const |
QColor | dxfColor (const QgsSymbolV2RenderContext &context) const |
![]() | |
virtual void | setWidth (double width) |
virtual double | width () const |
void | setWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | widthUnit () const |
void | drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size) |
![]() | |
virtual QColor | color () const |
virtual void | setColor (const QColor &color) |
virtual void | setOutlineColor (const QColor &color) |
Set outline color. More... | |
virtual QColor | outlineColor () const |
Get outline color. More... | |
virtual void | setFillColor (const QColor &color) |
Set fill color. More... | |
virtual QColor | fillColor () const |
Get fill color. More... | |
virtual | ~QgsSymbolLayerV2 () |
virtual QgsSymbolV2 * | subSymbol () |
virtual bool | setSubSymbol (QgsSymbolV2 *symbol) |
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 |
Static Public Member Functions | |
static QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
static QgsSymbolLayerV2 * | createFromSld (QDomElement &element) |
Protected Attributes | |
Qt::PenStyle | mPenStyle |
Qt::PenJoinStyle | mPenJoinStyle |
Qt::PenCapStyle | mPenCapStyle |
QPen | mPen |
QPen | mSelPen |
double | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
bool | mUseCustomDashPattern |
QgsSymbolV2::OutputUnit | mCustomDashPatternUnit |
QVector< qreal > | mCustomDashVector |
Vector with an even number of entries for the. More... | |
bool | mDrawInsidePolygon |
![]() | |
double | mWidth |
QgsSymbolV2::OutputUnit | mWidthUnit |
![]() | |
QgsSymbolV2::SymbolType | mType |
bool | mLocked |
QColor | mColor |
int | mRenderingPass |
QMap< QString, QgsExpression * > | mDataDefinedProperties |
Private Member Functions | |
void | applyDataDefinedSymbology (QgsSymbolV2RenderContext &context, QPen &pen, QPen &selPen, double &offset) |
Additional Inherited Members | |
![]() | |
QgsLineSymbolLayerV2 (bool locked=false) | |
![]() | |
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. More... | |
void | copyDataDefinedProperties (QgsSymbolLayerV2 *destLayer) const |
Copies data defined properties of this layer to another symbol layer. More... | |
![]() | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 33 of file qgslinesymbollayerv2.h.
QgsSimpleLineSymbolLayerV2::QgsSimpleLineSymbolLayerV2 | ( | QColor | color = DEFAULT_SIMPLELINE_COLOR , |
double | width = DEFAULT_SIMPLELINE_WIDTH , |
||
Qt::PenStyle | penStyle = DEFAULT_SIMPLELINE_PENSTYLE |
||
) |
Definition at line 31 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), QgsSymbolLayerV2::mColor, mCustomDashVector, QgsLineSymbolLayerV2::mWidth, and QgsLineSymbolLayerV2::width().
Referenced by clone(), create(), and createFromSld().
|
private |
Definition at line 375 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2::DataDefinedSizeScale, QgsSymbolLayerV2Utils::decodeColor(), QgsSymbolLayerV2Utils::decodePenCapStyle(), QgsSymbolLayerV2Utils::decodePenJoinStyle(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mCustomDashPatternUnit, mOffset, mPen, QgsLineSymbolLayerV2::mWidth, QgsLineSymbolLayerV2::mWidthUnit, QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2RenderContext::renderHints().
Referenced by renderPolyline().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 274 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2::copyDataDefinedProperties(), QgsSymbolLayerV2::mColor, mCustomDashPatternUnit, mCustomDashVector, mDrawInsidePolygon, mOffset, mOffsetUnit, mPenCapStyle, mPenJoinStyle, mPenStyle, mUseCustomDashPattern, QgsLineSymbolLayerV2::mWidth, QgsLineSymbolLayerV2::mWidthUnit, QgsSimpleLineSymbolLayerV2(), setCustomDashPatternUnit(), setCustomDashVector(), setDrawInsidePolygon(), setOffset(), setOffsetUnit(), setPenCapStyle(), setPenJoinStyle(), setUseCustomDashPattern(), and QgsLineSymbolLayerV2::setWidthUnit().
|
static |
Definition at line 58 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), QgsSymbolLayerV2Utils::decodeColor(), QgsSymbolLayerV2Utils::decodeOutputUnit(), QgsSymbolLayerV2Utils::decodePenCapStyle(), QgsSymbolLayerV2Utils::decodePenJoinStyle(), QgsSymbolLayerV2Utils::decodePenStyle(), QgsSymbolLayerV2Utils::decodeRealVector(), DEFAULT_SIMPLELINE_COLOR, DEFAULT_SIMPLELINE_PENSTYLE, DEFAULT_SIMPLELINE_WIDTH, penStyle(), QgsSimpleLineSymbolLayerV2(), setCustomDashPatternUnit(), setCustomDashVector(), QgsSymbolLayerV2::setDataDefinedProperty(), setDrawInsidePolygon(), setOffset(), setOffsetUnit(), setPenCapStyle(), setPenJoinStyle(), setUseCustomDashPattern(), QgsLineSymbolLayerV2::setWidthUnit(), and QgsLineSymbolLayerV2::width().
Referenced by QgsLineSymbolV2::createSimple(), QgsSymbolLayerV2Registry::defaultSymbolLayer(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 335 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), customDashVector(), QgsSymbolLayerV2Utils::lineFromSld(), offset(), penCapStyle(), penJoinStyle(), penStyle(), QgsDebugMsg, QgsSimpleLineSymbolLayerV2(), setCustomDashVector(), setOffset(), setPenCapStyle(), setPenJoinStyle(), setUseCustomDashPattern(), and QgsLineSymbolLayerV2::width().
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
inline |
Definition at line 91 of file qgslinesymbollayerv2.h.
|
inline |
Definition at line 94 of file qgslinesymbollayerv2.h.
Referenced by createFromSld().
|
inline |
Definition at line 98 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 480 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::decodeColor(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), and QgsSymbolLayerV2::mColor.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 453 of file qgslinesymbollayerv2.cpp.
References mCustomDashPatternUnit, mCustomDashVector, and mUseCustomDashPattern.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 459 of file qgslinesymbollayerv2.cpp.
References mPenStyle.
|
virtual |
Reimplemented from QgsLineSymbolLayerV2.
Definition at line 464 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2::DataDefinedSizeScale, QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), QgsLineSymbolLayerV2::mWidth, QgsLineSymbolLayerV2::mWidthUnit, QgsSymbolV2RenderContext::renderContext(), QgsSymbolV2RenderContext::renderHints(), QgsLineSymbolLayerV2::width(), and QgsLineSymbolLayerV2::widthUnit().
|
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 440 of file qgslinesymbollayerv2.cpp.
References mDrawInsidePolygon, mOffset, and QgsLineSymbolLayerV2::mWidth.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 120 of file qgslinesymbollayerv2.cpp.
|
inline |
Definition at line 82 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and renderPolyline().
|
inline |
Definition at line 85 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 320 of file qgslinesymbollayerv2.cpp.
References mCustomDashVector, mOffset, mPen, mPenCapStyle, mPenJoinStyle, mUseCustomDashPattern, QgsLineSymbolLayerV2::mWidth, and QgsSymbolLayerV2Utils::ogrFeatureStylePen().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 47 of file qgslinesymbollayerv2.cpp.
References mCustomDashPatternUnit, QgsSymbolV2::Mixed, mOffsetUnit, and QgsLineSymbolLayerV2::mWidthUnit.
|
inline |
Definition at line 79 of file qgslinesymbollayerv2.h.
Referenced by createFromSld().
|
inline |
Definition at line 76 of file qgslinesymbollayerv2.h.
Referenced by createFromSld().
|
inline |
Definition at line 73 of file qgslinesymbollayerv2.h.
Referenced by create(), createFromSld(), and toSld().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 255 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::encodeColor(), QgsSymbolLayerV2Utils::encodeOutputUnit(), QgsSymbolLayerV2Utils::encodePenCapStyle(), QgsSymbolLayerV2Utils::encodePenJoinStyle(), QgsSymbolLayerV2Utils::encodePenStyle(), QgsSymbolLayerV2Utils::encodeRealVector(), QgsSymbolLayerV2::mColor, mCustomDashPatternUnit, mCustomDashVector, mDrawInsidePolygon, mOffset, mOffsetUnit, mPenCapStyle, mPenJoinStyle, mPenStyle, mUseCustomDashPattern, QgsLineSymbolLayerV2::mWidth, QgsLineSymbolLayerV2::mWidthUnit, and QgsSymbolLayerV2::saveDataDefinedProperties().
|
virtual |
Reimplemented from QgsLineSymbolLayerV2.
Definition at line 177 of file qgslinesymbollayerv2.cpp.
References mDrawInsidePolygon, QgsRenderContext::painter(), QgsSymbolV2RenderContext::renderContext(), and renderPolyline().
|
virtual |
Implements QgsLineSymbolLayerV2.
Definition at line 222 of file qgslinesymbollayerv2.cpp.
References QgsVectorSimplifyMethod::AntialiasingSimplification, applyDataDefinedSymbology(), QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox(), QgsSymbolV2RenderContext::layer(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mOffsetUnit, mPen, mSelPen, offset(), offsetLine(), QgsRenderContext::painter(), QgsSymbolV2RenderContext::renderContext(), QgsSymbolV2RenderContext::selected(), QgsVectorLayer::simplifyDrawingCanbeApplied(), QgsVectorLayer::simplifyMethod(), and QgsVectorSimplifyMethod::threshold().
Referenced by renderPolygonOutline().
|
inline |
Definition at line 92 of file qgslinesymbollayerv2.h.
|
inline |
Definition at line 95 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 100 of file qgslinesymbollayerv2.h.
|
inline |
Definition at line 83 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 86 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 40 of file qgslinesymbollayerv2.cpp.
References mCustomDashPatternUnit, mOffsetUnit, and QgsLineSymbolLayerV2::mWidthUnit.
|
inline |
Definition at line 80 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 77 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 74 of file qgslinesymbollayerv2.h.
|
inline |
Definition at line 89 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 125 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2RenderContext::alpha(), QgsSymbolV2RenderContext::layer(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), QgsSymbolLayerV2::mColor, mCustomDashPatternUnit, mCustomDashVector, mPen, mPenCapStyle, mPenJoinStyle, mPenStyle, mSelPen, mUseCustomDashPattern, QgsLineSymbolLayerV2::mWidth, QgsLineSymbolLayerV2::mWidthUnit, QgsSymbolLayerV2::prepareExpressions(), QgsRenderContext::rasterScaleFactor(), QgsSymbolV2RenderContext::renderContext(), QgsRenderContext::rendererScale(), QgsRenderContext::selectionColor(), and QgsSymbolLayerV2::selectionIsOpaque.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 172 of file qgslinesymbollayerv2.cpp.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 290 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::createGeometryElement(), QgsSymbolLayerV2Utils::lineToSld(), QgsSymbolLayerV2::mColor, mCustomDashVector, mOffset, mPenCapStyle, mPenJoinStyle, mPenStyle, mUseCustomDashPattern, QgsLineSymbolLayerV2::mWidth, and penStyle().
|
inline |
Definition at line 88 of file qgslinesymbollayerv2.h.
|
protected |
Definition at line 119 of file qgslinesymbollayerv2.h.
Referenced by applyDataDefinedSymbology(), clone(), dxfCustomDashPattern(), outputUnit(), properties(), setOutputUnit(), and startRender().
|
protected |
Vector with an even number of entries for the.
Definition at line 122 of file qgslinesymbollayerv2.h.
Referenced by clone(), dxfCustomDashPattern(), ogrFeatureStyle(), properties(), QgsSimpleLineSymbolLayerV2(), startRender(), and toSld().
|
protected |
Definition at line 124 of file qgslinesymbollayerv2.h.
Referenced by clone(), estimateMaxBleed(), properties(), and renderPolygonOutline().
|
protected |
Definition at line 114 of file qgslinesymbollayerv2.h.
Referenced by applyDataDefinedSymbology(), clone(), estimateMaxBleed(), ogrFeatureStyle(), properties(), and toSld().
|
protected |
Definition at line 115 of file qgslinesymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), renderPolyline(), and setOutputUnit().
|
protected |
Definition at line 112 of file qgslinesymbollayerv2.h.
Referenced by applyDataDefinedSymbology(), ogrFeatureStyle(), renderPolyline(), and startRender().
|
protected |
Definition at line 111 of file qgslinesymbollayerv2.h.
Referenced by clone(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 110 of file qgslinesymbollayerv2.h.
Referenced by clone(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 109 of file qgslinesymbollayerv2.h.
Referenced by clone(), dxfPenStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 113 of file qgslinesymbollayerv2.h.
Referenced by renderPolyline(), and startRender().
|
protected |
Definition at line 118 of file qgslinesymbollayerv2.h.
Referenced by clone(), dxfCustomDashPattern(), ogrFeatureStyle(), properties(), startRender(), and toSld().