QGIS API Documentation  2.5.0-Master
 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)
 
void renderPolygonOutline (const QPolygonF &points, QList< QPolygonF > *rings, 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
 
void setMapUnitScale (const QgsMapUnitScale &scale)
 
QgsMapUnitScale mapUnitScale () 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)
 
void setOffsetUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit offsetUnit () const
 
void setOffsetMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScaleoffsetMapUnitScale () const
 
bool useCustomDashPattern () const
 
void setUseCustomDashPattern (bool b)
 
void setCustomDashPatternUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit customDashPatternUnit () const
 
const QgsMapUnitScalecustomDashPatternMapUnitScale () const
 
void setCustomDashPatternMapUnitScale (const QgsMapUnitScale &scale)
 
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 setWidth (double width)
 
virtual double width () const
 
void setWidthUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit widthUnit () const
 
void setWidthMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScalewidthMapUnitScale () const
 
void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outputUnit () const
 
void setMapUnitScale (const QgsMapUnitScale &scale)
 
QgsMapUnitScale mapUnitScale () 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. 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 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
 
QgsMapUnitScale mOffsetMapUnitScale
 
bool mUseCustomDashPattern
 
QgsSymbolV2::OutputUnit mCustomDashPatternUnit
 
QgsMapUnitScale mCustomDashPatternMapUnitScale
 
QVector< qreal > mCustomDashVector
 Vector with an even number of entries for the. More...
 
bool mDrawInsidePolygon
 
- Protected Attributes inherited from QgsLineSymbolLayerV2
double mWidth
 
QgsSymbolV2::OutputUnit mWidthUnit
 
QgsMapUnitScale mWidthMapUnitScale
 
- 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)
 
- Protected Member Functions inherited from QgsSymbolLayerV2
 QgsSymbolLayerV2 (QgsSymbolV2::SymbolType type, bool locked=false)
 
virtual void prepareExpressions (const QgsFields *fields, double scale=-1.0)
 
virtual QgsExpressionexpression (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 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
const QgsMapUnitScale& QgsSimpleLineSymbolLayerV2::customDashPatternMapUnitScale ( ) const
inline
QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::customDashPatternUnit ( ) const
inline
QVector<qreal> QgsSimpleLineSymbolLayerV2::customDashVector ( ) const
inline
bool QgsSimpleLineSymbolLayerV2::drawInsidePolygon ( ) const
inline
QColor QgsSimpleLineSymbolLayerV2::dxfColor ( const QgsSymbolV2RenderContext context) const
virtual
QVector< qreal > QgsSimpleLineSymbolLayerV2::dxfCustomDashPattern ( QgsSymbolV2::OutputUnit unit) const
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 509 of file qgslinesymbollayerv2.cpp.

References mCustomDashPatternUnit, mCustomDashVector, and mUseCustomDashPattern.

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

Reimplemented from QgsSymbolLayerV2.

Definition at line 515 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 496 of file qgslinesymbollayerv2.cpp.

References mDrawInsidePolygon, mOffset, and QgsLineSymbolLayerV2::mWidth.

QString QgsSimpleLineSymbolLayerV2::layerType ( ) const
virtual

Implements QgsSymbolLayerV2.

Definition at line 145 of file qgslinesymbollayerv2.cpp.

QgsMapUnitScale QgsSimpleLineSymbolLayerV2::mapUnitScale ( ) const
virtual
double QgsSimpleLineSymbolLayerV2::offset ( ) const
inline
const QgsMapUnitScale& QgsSimpleLineSymbolLayerV2::offsetMapUnitScale ( ) const
inline
QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::offsetUnit ( ) const
inline
QString QgsSimpleLineSymbolLayerV2::ogrFeatureStyle ( double  mmScaleFactor,
double  mapUnitScaleFactor 
) const
virtual
QgsSymbolV2::OutputUnit QgsSimpleLineSymbolLayerV2::outputUnit ( ) const
virtual
Qt::PenCapStyle QgsSimpleLineSymbolLayerV2::penCapStyle ( ) const
inline
Qt::PenJoinStyle QgsSimpleLineSymbolLayerV2::penJoinStyle ( ) const
inline
Qt::PenStyle QgsSimpleLineSymbolLayerV2::penStyle ( ) const
inline
QgsStringMap QgsSimpleLineSymbolLayerV2::properties ( ) const
virtual
void QgsSimpleLineSymbolLayerV2::renderPolygonOutline ( const QPolygonF &  points,
QList< QPolygonF > *  rings,
QgsSymbolV2RenderContext context 
)
virtual
void QgsSimpleLineSymbolLayerV2::renderPolyline ( const QPolygonF &  points,
QgsSymbolV2RenderContext context 
)
virtual
void QgsSimpleLineSymbolLayerV2::setCustomDashPatternMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsSimpleLineSymbolLayerV2::setCustomDashPatternUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsSimpleLineSymbolLayerV2::setCustomDashVector ( const QVector< qreal > &  vector)
inline
void QgsSimpleLineSymbolLayerV2::setDrawInsidePolygon ( bool  drawInsidePolygon)
inline
void QgsSimpleLineSymbolLayerV2::setMapUnitScale ( const QgsMapUnitScale scale)
virtual
void QgsSimpleLineSymbolLayerV2::setOffset ( double  offset)
inline
void QgsSimpleLineSymbolLayerV2::setOffsetMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsSimpleLineSymbolLayerV2::setOffsetUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsSimpleLineSymbolLayerV2::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual
void QgsSimpleLineSymbolLayerV2::setPenCapStyle ( Qt::PenCapStyle  style)
inline
void QgsSimpleLineSymbolLayerV2::setPenJoinStyle ( Qt::PenJoinStyle  style)
inline
void QgsSimpleLineSymbolLayerV2::setPenStyle ( Qt::PenStyle  style)
inline
void QgsSimpleLineSymbolLayerV2::setUseCustomDashPattern ( bool  b)
inline
void QgsSimpleLineSymbolLayerV2::startRender ( QgsSymbolV2RenderContext context)
virtual
void QgsSimpleLineSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext context)
virtual

Implements QgsSymbolLayerV2.

Definition at line 197 of file qgslinesymbollayerv2.cpp.

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

Member Data Documentation

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

Vector with an even number of entries for the.

Definition at line 133 of file qgslinesymbollayerv2.h.

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

bool QgsSimpleLineSymbolLayerV2::mDrawInsidePolygon
protected

Definition at line 135 of file qgslinesymbollayerv2.h.

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

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

Definition at line 124 of file qgslinesymbollayerv2.h.

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

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

Definition at line 120 of file qgslinesymbollayerv2.h.

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

Qt::PenJoinStyle QgsSimpleLineSymbolLayerV2::mPenJoinStyle
protected

Definition at line 119 of file qgslinesymbollayerv2.h.

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

Qt::PenStyle QgsSimpleLineSymbolLayerV2::mPenStyle
protected

Definition at line 118 of file qgslinesymbollayerv2.h.

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

QPen QgsSimpleLineSymbolLayerV2::mSelPen
protected

Definition at line 122 of file qgslinesymbollayerv2.h.

Referenced by renderPolyline(), and startRender().

bool QgsSimpleLineSymbolLayerV2::mUseCustomDashPattern
protected

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