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 Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
QgsLinePatternFillSymbolLayer Class Reference

#include <qgsfillsymbollayerv2.h>

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

Public Member Functions

 QgsLinePatternFillSymbolLayer ()
 
 ~QgsLinePatternFillSymbolLayer ()
 
QString layerType () const
 
void startRender (QgsSymbolV2RenderContext &context)
 
void stopRender (QgsSymbolV2RenderContext &context)
 
QgsStringMap properties () const
 
QgsSymbolLayerV2clone () const
 
void toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
 
double estimateMaxBleed () const
 Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. More...
 
QString ogrFeatureStyleWidth (double widthScaleFactor) const
 
void setLineAngle (double a)
 
double lineAngle () const
 
void setDistance (double d)
 
double distance () const
 
void setLineWidth (double w)
 
double lineWidth () const
 
void setColor (const QColor &c)
 
QColor color () const
 
void setOffset (double offset)
 
double offset () const
 
void setDistanceUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit distanceUnit () const
 
void setDistanceMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScaledistanceMapUnitScale () const
 
void setLineWidthUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit lineWidthUnit () const
 
void setLineWidthMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScalelineWidthMapUnitScale () const
 
void setOffsetUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit offsetUnit () const
 
void setOffsetMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScaleoffsetMapUnitScale () const
 
void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outputUnit () const
 
void setMapUnitScale (const QgsMapUnitScale &scale)
 
QgsMapUnitScale mapUnitScale () const
 
bool setSubSymbol (QgsSymbolV2 *symbol)
 
QgsSymbolV2subSymbol ()
 
- Public Member Functions inherited from QgsImageFillSymbolLayer
 QgsImageFillSymbolLayer ()
 
virtual ~QgsImageFillSymbolLayer ()
 
void renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)
 
void setOutlineWidthUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outlineWidthUnit () const
 
void setOutlineWidthMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScaleoutlineWidthMapUnitScale () const
 
virtual double dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const
 
virtual QColor dxfColor (const QgsSymbolV2RenderContext &context) const
 
virtual Qt::PenStyle dxfPenStyle () const
 
- Public Member Functions inherited from QgsFillSymbolLayerV2
void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)
 
void setAngle (double angle)
 
double angle () const
 
- Public Member Functions inherited from QgsSymbolLayerV2
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 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 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
 
virtual QVector< qreal > dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const
 

Static Public Member Functions

static QgsSymbolLayerV2create (const QgsStringMap &properties=QgsStringMap())
 
static QgsSymbolLayerV2createFromSld (QDomElement &element)
 

Protected Member Functions

void applyDataDefinedSettings (const QgsSymbolV2RenderContext &context)
 
- Protected Member Functions inherited from QgsFillSymbolLayerV2
 QgsFillSymbolLayerV2 (bool locked=false)
 
void _renderPolygon (QPainter *p, const QPolygonF &points, const QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)
 Default method to render polygon. More...
 
- 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...
 

Protected Attributes

double mDistance
 Distance (in mm or map units) between lines. More...
 
QgsSymbolV2::OutputUnit mDistanceUnit
 
QgsMapUnitScale mDistanceMapUnitScale
 
double mLineWidth
 Line width (in mm or map units) More...
 
QgsSymbolV2::OutputUnit mLineWidthUnit
 
QgsMapUnitScale mLineWidthMapUnitScale
 
QColor mColor
 
double mLineAngle
 Vector line angle in degrees (0 = horizontal, counterclockwise) More...
 
double mOffset
 Offset perpendicular to line direction. More...
 
QgsSymbolV2::OutputUnit mOffsetUnit
 
QgsMapUnitScale mOffsetMapUnitScale
 
- Protected Attributes inherited from QgsImageFillSymbolLayer
QBrush mBrush
 
double mNextAngle
 
double mOutlineWidth
 Outline width. More...
 
QgsSymbolV2::OutputUnit mOutlineWidthUnit
 
QgsMapUnitScale mOutlineWidthMapUnitScale
 
QgsLineSymbolV2mOutline
 Custom outline. More...
 
- Protected Attributes inherited from QgsFillSymbolLayerV2
double mAngle
 
- Protected Attributes inherited from QgsSymbolLayerV2
QgsSymbolV2::SymbolType mType
 
bool mLocked
 
QColor mColor
 
int mRenderingPass
 
QMap< QString, QgsExpression * > mDataDefinedProperties
 

Private Member Functions

void applyPattern (const QgsSymbolV2RenderContext &context, QBrush &brush, double lineAngle, double distance, double lineWidth, const QColor &color)
 Applies the svg pattern to the brush. More...
 

Private Attributes

QgsLineSymbolV2mFillLineSymbol
 Fill line. More...
 

Additional Inherited Members

- 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 683 of file qgsfillsymbollayerv2.h.

Constructor & Destructor Documentation

QgsLinePatternFillSymbolLayer::QgsLinePatternFillSymbolLayer ( )

Definition at line 2092 of file qgsfillsymbollayerv2.cpp.

References QgsImageFillSymbolLayer::setSubSymbol(), and setSubSymbol().

Referenced by create(), and createFromSld().

QgsLinePatternFillSymbolLayer::~QgsLinePatternFillSymbolLayer ( )

Definition at line 2111 of file qgsfillsymbollayerv2.cpp.

References mFillLineSymbol.

Member Function Documentation

void QgsLinePatternFillSymbolLayer::applyDataDefinedSettings ( const QgsSymbolV2RenderContext context)
protectedvirtual
void QgsLinePatternFillSymbolLayer::applyPattern ( const QgsSymbolV2RenderContext context,
QBrush &  brush,
double  lineAngle,
double  distance,
double  lineWidth,
const QColor &  color 
)
private
QgsSymbolLayerV2 * QgsLinePatternFillSymbolLayer::clone ( ) const
virtual
QColor QgsLinePatternFillSymbolLayer::color ( void  ) const
inlinevirtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 716 of file qgsfillsymbollayerv2.h.

References QgsSymbolLayerV2::mColor.

Referenced by applyDataDefinedSettings(), and create().

QgsSymbolLayerV2 * QgsLinePatternFillSymbolLayer::create ( const QgsStringMap properties = QgsStringMap())
static
QgsSymbolLayerV2 * QgsLinePatternFillSymbolLayer::createFromSld ( QDomElement &  element)
static
double QgsLinePatternFillSymbolLayer::distance ( ) const
inline
const QgsMapUnitScale& QgsLinePatternFillSymbolLayer::distanceMapUnitScale ( ) const
inline
QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::distanceUnit ( ) const
inline
double QgsLinePatternFillSymbolLayer::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 QgsImageFillSymbolLayer.

Definition at line 2143 of file qgsfillsymbollayerv2.cpp.

QString QgsLinePatternFillSymbolLayer::layerType ( ) const
virtual

Implements QgsSymbolLayerV2.

Definition at line 2281 of file qgsfillsymbollayerv2.cpp.

double QgsLinePatternFillSymbolLayer::lineAngle ( ) const
inline
double QgsLinePatternFillSymbolLayer::lineWidth ( ) const
inline

Definition at line 714 of file qgsfillsymbollayerv2.h.

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

const QgsMapUnitScale& QgsLinePatternFillSymbolLayer::lineWidthMapUnitScale ( ) const
inline

Definition at line 730 of file qgsfillsymbollayerv2.h.

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::lineWidthUnit ( ) const
inline

Definition at line 727 of file qgsfillsymbollayerv2.h.

QgsMapUnitScale QgsLinePatternFillSymbolLayer::mapUnitScale ( ) const
virtual
double QgsLinePatternFillSymbolLayer::offset ( ) const
inline
const QgsMapUnitScale& QgsLinePatternFillSymbolLayer::offsetMapUnitScale ( ) const
inline
QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::offsetUnit ( ) const
inline
QString QgsLinePatternFillSymbolLayer::ogrFeatureStyleWidth ( double  widthScaleFactor) const

Definition at line 2663 of file qgsfillsymbollayerv2.cpp.

References mColor, mDistance, mLineAngle, and mLineWidth.

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::outputUnit ( ) const
virtual
QgsStringMap QgsLinePatternFillSymbolLayer::properties ( ) const
virtual
void QgsLinePatternFillSymbolLayer::setColor ( const QColor &  c)
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 2105 of file qgsfillsymbollayerv2.cpp.

References mColor, mFillLineSymbol, and QgsSymbolV2::setColor().

Referenced by create(), and createFromSld().

void QgsLinePatternFillSymbolLayer::setDistance ( double  d)
inline
void QgsLinePatternFillSymbolLayer::setDistanceMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsLinePatternFillSymbolLayer::setDistanceUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsLinePatternFillSymbolLayer::setLineAngle ( double  a)
inline
void QgsLinePatternFillSymbolLayer::setLineWidth ( double  w)

Definition at line 2099 of file qgsfillsymbollayerv2.cpp.

References mFillLineSymbol, mLineWidth, and QgsLineSymbolV2::setWidth().

Referenced by create(), and createFromSld().

void QgsLinePatternFillSymbolLayer::setLineWidthMapUnitScale ( const QgsMapUnitScale scale)
inline

Definition at line 729 of file qgsfillsymbollayerv2.h.

Referenced by create().

void QgsLinePatternFillSymbolLayer::setLineWidthUnit ( QgsSymbolV2::OutputUnit  unit)
inline

Definition at line 726 of file qgsfillsymbollayerv2.h.

Referenced by create().

void QgsLinePatternFillSymbolLayer::setMapUnitScale ( const QgsMapUnitScale scale)
virtual
void QgsLinePatternFillSymbolLayer::setOffset ( double  offset)
inline
void QgsLinePatternFillSymbolLayer::setOffsetMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsLinePatternFillSymbolLayer::setOffsetUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsLinePatternFillSymbolLayer::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual
bool QgsLinePatternFillSymbolLayer::setSubSymbol ( QgsSymbolV2 symbol)
virtual
void QgsLinePatternFillSymbolLayer::startRender ( QgsSymbolV2RenderContext context)
virtual
void QgsLinePatternFillSymbolLayer::stopRender ( QgsSymbolV2RenderContext context)
virtual

Implements QgsSymbolLayerV2.

Definition at line 2586 of file qgsfillsymbollayerv2.cpp.

QgsSymbolV2 * QgsLinePatternFillSymbolLayer::subSymbol ( )
virtual

Reimplemented from QgsImageFillSymbolLayer.

Definition at line 2138 of file qgsfillsymbollayerv2.cpp.

References mFillLineSymbol.

void QgsLinePatternFillSymbolLayer::toSld ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
virtual

Member Data Documentation

QColor QgsLinePatternFillSymbolLayer::mColor
protected
double QgsLinePatternFillSymbolLayer::mDistance
protected

Distance (in mm or map units) between lines.

Definition at line 749 of file qgsfillsymbollayerv2.h.

Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), startRender(), and toSld().

QgsMapUnitScale QgsLinePatternFillSymbolLayer::mDistanceMapUnitScale
protected

Definition at line 751 of file qgsfillsymbollayerv2.h.

Referenced by applyPattern(), mapUnitScale(), properties(), and setMapUnitScale().

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::mDistanceUnit
protected

Definition at line 750 of file qgsfillsymbollayerv2.h.

Referenced by applyPattern(), outputUnit(), properties(), and setOutputUnit().

QgsLineSymbolV2* QgsLinePatternFillSymbolLayer::mFillLineSymbol
private
double QgsLinePatternFillSymbolLayer::mLineAngle
protected

Vector line angle in degrees (0 = horizontal, counterclockwise)

Definition at line 758 of file qgsfillsymbollayerv2.h.

Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), startRender(), and toSld().

double QgsLinePatternFillSymbolLayer::mLineWidth
protected

Line width (in mm or map units)

Definition at line 753 of file qgsfillsymbollayerv2.h.

Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), setLineWidth(), and startRender().

QgsMapUnitScale QgsLinePatternFillSymbolLayer::mLineWidthMapUnitScale
protected

Definition at line 755 of file qgsfillsymbollayerv2.h.

Referenced by mapUnitScale(), properties(), and setMapUnitScale().

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::mLineWidthUnit
protected

Definition at line 754 of file qgsfillsymbollayerv2.h.

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

double QgsLinePatternFillSymbolLayer::mOffset
protected

Offset perpendicular to line direction.

Definition at line 760 of file qgsfillsymbollayerv2.h.

Referenced by applyPattern(), properties(), and toSld().

QgsMapUnitScale QgsLinePatternFillSymbolLayer::mOffsetMapUnitScale
protected

Definition at line 762 of file qgsfillsymbollayerv2.h.

Referenced by applyPattern(), mapUnitScale(), properties(), and setMapUnitScale().

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::mOffsetUnit
protected

Definition at line 761 of file qgsfillsymbollayerv2.h.

Referenced by applyPattern(), outputUnit(), properties(), and setOutputUnit().


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