QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members
QgsSimpleLineSymbolLayerV2 Class Reference

#include <qgslinesymbollayerv2.h>

Inheritance diagram for QgsSimpleLineSymbolLayerV2:
Inheritance graph
[legend]
Collaboration diagram for QgsSimpleLineSymbolLayerV2:
Collaboration graph
[legend]

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)
QgsStringMap properties () const
QgsSymbolLayerV2clone () 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.
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
- Public Member Functions inherited from QgsLineSymbolLayerV2
virtual void renderPolygonOutline (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)
virtual void setWidth (double width)
virtual double width () const
void setWidthUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit widthUnit () const
void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)
- Public Member Functions inherited from QgsSymbolLayerV2
virtual QColor color () const
virtual void setColor (const QColor &color)
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 QgsSymbolV2subSymbol ()
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 QgsExpressiondataDefinedProperty (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 QgsSymbolLayerV2create (const QgsStringMap &properties=QgsStringMap())
static QgsSymbolLayerV2createFromSld (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.
bool mDrawInsidePolygon
- 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

Private Member Functions

void applyDataDefinedSymbology (QgsSymbolV2RenderContext &context, QPen &pen, QPen &selPen, double &offset)

Additional Inherited Members

- Protected Member Functions inherited from QgsLineSymbolLayerV2
 QgsLineSymbolLayerV2 (bool locked=false)
- Static Protected Attributes inherited from QgsSymbolLayerV2
static const bool selectionIsOpaque = true
static const bool selectFillBorder = false
static const bool selectFillStyle = false

Detailed Description

Definition at line 33 of file qgslinesymbollayerv2.h.

Constructor & Destructor Documentation

QgsSimpleLineSymbolLayerV2::QgsSimpleLineSymbolLayerV2 ( QColor  color = DEFAULT_SIMPLELINE_COLOR,
double  width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle  penStyle = DEFAULT_SIMPLELINE_PENSTYLE 
)

Member Function Documentation

void QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology ( QgsSymbolV2RenderContext context,
QPen &  pen,
QPen &  selPen,
double &  offset 
)
private
QgsSymbolLayerV2 * QgsSimpleLineSymbolLayerV2::clone ( ) const
virtual
QgsSymbolLayerV2 * QgsSimpleLineSymbolLayerV2::create ( const QgsStringMap properties = QgsStringMap())
static
QgsSymbolLayerV2 * QgsSimpleLineSymbolLayerV2::createFromSld ( QDomElement &  element)
static
QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::customDashPatternUnit ( ) const
inline

Definition at line 88 of file qgslinesymbollayerv2.h.

QVector<qreal> QgsSimpleLineSymbolLayerV2::customDashVector ( ) const
inline

Definition at line 91 of file qgslinesymbollayerv2.h.

Referenced by createFromSld().

bool QgsSimpleLineSymbolLayerV2::drawInsidePolygon ( ) const
inline

Definition at line 95 of file qgslinesymbollayerv2.h.

QColor QgsSimpleLineSymbolLayerV2::dxfColor ( const QgsSymbolV2RenderContext context) const
virtual
QVector< qreal > QgsSimpleLineSymbolLayerV2::dxfCustomDashPattern ( QgsSymbolV2::OutputUnit unit) const
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 423 of file qgslinesymbollayerv2.cpp.

References mCustomDashPatternUnit, mCustomDashVector, and mUseCustomDashPattern.

Qt::PenStyle QgsSimpleLineSymbolLayerV2::dxfPenStyle ( ) const
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 429 of file qgslinesymbollayerv2.cpp.

References mPenStyle.

double QgsSimpleLineSymbolLayerV2::dxfWidth ( const QgsDxfExport &  e,
const QgsSymbolV2RenderContext context 
) const
virtual
double QgsSimpleLineSymbolLayerV2::estimateMaxBleed ( ) const
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 410 of file qgslinesymbollayerv2.cpp.

References mDrawInsidePolygon, mOffset, and QgsLineSymbolLayerV2::mWidth.

QString QgsSimpleLineSymbolLayerV2::layerType ( ) const
virtual

Implements QgsSymbolLayerV2.

Definition at line 120 of file qgslinesymbollayerv2.cpp.

double QgsSimpleLineSymbolLayerV2::offset ( ) const
inline

Definition at line 79 of file qgslinesymbollayerv2.h.

Referenced by createFromSld(), and renderPolyline().

QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::offsetUnit ( ) const
inline

Definition at line 82 of file qgslinesymbollayerv2.h.

QString QgsSimpleLineSymbolLayerV2::ogrFeatureStyle ( double  mmScaleFactor,
double  mapUnitScaleFactor 
) const
virtual
QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::outputUnit ( ) const
virtual
Qt::PenCapStyle QgsSimpleLineSymbolLayerV2::penCapStyle ( ) const
inline

Definition at line 76 of file qgslinesymbollayerv2.h.

Referenced by createFromSld().

Qt::PenJoinStyle QgsSimpleLineSymbolLayerV2::penJoinStyle ( ) const
inline

Definition at line 73 of file qgslinesymbollayerv2.h.

Referenced by createFromSld().

Qt::PenStyle QgsSimpleLineSymbolLayerV2::penStyle ( ) const
inline

Definition at line 70 of file qgslinesymbollayerv2.h.

Referenced by create(), createFromSld(), and toSld().

QgsStringMap QgsSimpleLineSymbolLayerV2::properties ( ) const
virtual
void QgsSimpleLineSymbolLayerV2::renderPolyline ( const QPolygonF &  points,
QgsSymbolV2RenderContext context 
)
virtual
void QgsSimpleLineSymbolLayerV2::setCustomDashPatternUnit ( QgsSymbolV2::OutputUnit  unit)
inline

Definition at line 89 of file qgslinesymbollayerv2.h.

Referenced by clone(), and create().

void QgsSimpleLineSymbolLayerV2::setCustomDashVector ( const QVector< qreal > &  vector)
inline

Definition at line 92 of file qgslinesymbollayerv2.h.

Referenced by clone(), create(), and createFromSld().

void QgsSimpleLineSymbolLayerV2::setDrawInsidePolygon ( bool  drawInsidePolygon)
inline

Definition at line 97 of file qgslinesymbollayerv2.h.

Referenced by clone(), and create().

void QgsSimpleLineSymbolLayerV2::setOffset ( double  offset)
inline

Definition at line 80 of file qgslinesymbollayerv2.h.

Referenced by clone(), create(), and createFromSld().

void QgsSimpleLineSymbolLayerV2::setOffsetUnit ( QgsSymbolV2::OutputUnit  unit)
inline

Definition at line 83 of file qgslinesymbollayerv2.h.

Referenced by clone(), and create().

void QgsSimpleLineSymbolLayerV2::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 40 of file qgslinesymbollayerv2.cpp.

References mCustomDashPatternUnit, mOffsetUnit, and QgsLineSymbolLayerV2::mWidthUnit.

void QgsSimpleLineSymbolLayerV2::setPenCapStyle ( Qt::PenCapStyle  style)
inline

Definition at line 77 of file qgslinesymbollayerv2.h.

Referenced by clone(), create(), and createFromSld().

void QgsSimpleLineSymbolLayerV2::setPenJoinStyle ( Qt::PenJoinStyle  style)
inline

Definition at line 74 of file qgslinesymbollayerv2.h.

Referenced by clone(), create(), and createFromSld().

void QgsSimpleLineSymbolLayerV2::setPenStyle ( Qt::PenStyle  style)
inline

Definition at line 71 of file qgslinesymbollayerv2.h.

void QgsSimpleLineSymbolLayerV2::setUseCustomDashPattern ( bool  b)
inline

Definition at line 86 of file qgslinesymbollayerv2.h.

Referenced by clone(), create(), and createFromSld().

void QgsSimpleLineSymbolLayerV2::startRender ( QgsSymbolV2RenderContext context)
virtual
void QgsSimpleLineSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext context)
virtual

Implements QgsSymbolLayerV2.

Definition at line 172 of file qgslinesymbollayerv2.cpp.

void QgsSimpleLineSymbolLayerV2::toSld ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
virtual
bool QgsSimpleLineSymbolLayerV2::useCustomDashPattern ( ) const
inline

Definition at line 85 of file qgslinesymbollayerv2.h.

Member Data Documentation

QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::mCustomDashPatternUnit
protected
QVector<qreal> QgsSimpleLineSymbolLayerV2::mCustomDashVector
protected

Vector with an even number of entries for the.

Definition at line 119 of file qgslinesymbollayerv2.h.

Referenced by clone(), dxfCustomDashPattern(), ogrFeatureStyle(), properties(), QgsSimpleLineSymbolLayerV2(), startRender(), and toSld().

bool QgsSimpleLineSymbolLayerV2::mDrawInsidePolygon
protected

Definition at line 121 of file qgslinesymbollayerv2.h.

Referenced by clone(), estimateMaxBleed(), properties(), and renderPolyline().

double QgsSimpleLineSymbolLayerV2::mOffset
protected
QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::mOffsetUnit
protected

Definition at line 112 of file qgslinesymbollayerv2.h.

Referenced by clone(), outputUnit(), properties(), renderPolyline(), and setOutputUnit().

QPen QgsSimpleLineSymbolLayerV2::mPen
protected
Qt::PenCapStyle QgsSimpleLineSymbolLayerV2::mPenCapStyle
protected

Definition at line 108 of file qgslinesymbollayerv2.h.

Referenced by clone(), ogrFeatureStyle(), properties(), startRender(), and toSld().

Qt::PenJoinStyle QgsSimpleLineSymbolLayerV2::mPenJoinStyle
protected

Definition at line 107 of file qgslinesymbollayerv2.h.

Referenced by clone(), ogrFeatureStyle(), properties(), startRender(), and toSld().

Qt::PenStyle QgsSimpleLineSymbolLayerV2::mPenStyle
protected

Definition at line 106 of file qgslinesymbollayerv2.h.

Referenced by clone(), dxfPenStyle(), properties(), startRender(), and toSld().

QPen QgsSimpleLineSymbolLayerV2::mSelPen
protected

Definition at line 110 of file qgslinesymbollayerv2.h.

Referenced by renderPolyline(), and startRender().

bool QgsSimpleLineSymbolLayerV2::mUseCustomDashPattern
protected

The documentation for this class was generated from the following files: