QGIS API Documentation  2.0.1-Dufour
 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 | 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
 
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 setLineWidthUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit lineWidthUnit () const
 
void setOffsetUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit offsetUnit () const
 
void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outputUnit () const
 
- Public Member Functions inherited from QgsImageFillSymbolLayer
 QgsImageFillSymbolLayer ()
 
virtual ~QgsImageFillSymbolLayer ()
 
void renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)
 
virtual QgsSymbolV2subSymbol ()
 
virtual bool setSubSymbol (QgsSymbolV2 *symbol)
 
void setOutlineWidthUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outlineWidthUnit () 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 ~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 ()
 

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)
 Default method to render polygon. More...
 
- Protected Member Functions inherited from QgsSymbolLayerV2
 QgsSymbolLayerV2 (QgsSymbolV2::SymbolType type, bool locked=false)
 
virtual void prepareExpressions (const QgsVectorLayer *vl)
 
virtual QgsExpressionexpression (const QString &property)
 
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
 
double mLineWidth
 Line width (in mm or map units) More...
 
QgsSymbolV2::OutputUnit mLineWidthUnit
 
QColor mColor
 
double mLineAngle
 Vector line angle in degrees (0 = horizontal, counterclockwise) More...
 
double mOffset
 Offset perpendicular to line direction. More...
 
QgsSymbolV2::OutputUnit mOffsetUnit
 
- Protected Attributes inherited from QgsImageFillSymbolLayer
QBrush mBrush
 
double mNextAngle
 
double mOutlineWidth
 Outline width. More...
 
QgsSymbolV2::OutputUnit mOutlineWidthUnit
 
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...
 

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

Constructor & Destructor Documentation

QgsLinePatternFillSymbolLayer::QgsLinePatternFillSymbolLayer ( )

Definition at line 859 of file qgsfillsymbollayerv2.cpp.

Referenced by create(), and createFromSld().

QgsLinePatternFillSymbolLayer::~QgsLinePatternFillSymbolLayer ( )

Definition at line 864 of file qgsfillsymbollayerv2.cpp.

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 245 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

Definition at line 241 of file qgsfillsymbollayerv2.h.

Referenced by applyDataDefinedSettings(), and create().

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

Definition at line 250 of file qgsfillsymbollayerv2.h.

QString QgsLinePatternFillSymbolLayer::layerType ( ) const
virtual

Implements QgsSymbolLayerV2.

Definition at line 960 of file qgsfillsymbollayerv2.cpp.

double QgsLinePatternFillSymbolLayer::lineAngle ( ) const
inline

Definition at line 239 of file qgsfillsymbollayerv2.h.

Referenced by applyDataDefinedSettings(), and create().

double QgsLinePatternFillSymbolLayer::lineWidth ( ) const
inline

Definition at line 243 of file qgsfillsymbollayerv2.h.

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

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

Definition at line 253 of file qgsfillsymbollayerv2.h.

double QgsLinePatternFillSymbolLayer::offset ( ) const
inline

Definition at line 247 of file qgsfillsymbollayerv2.h.

Referenced by create(), and createFromSld().

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

Definition at line 256 of file qgsfillsymbollayerv2.h.

QString QgsLinePatternFillSymbolLayer::ogrFeatureStyleWidth ( double  widthScaleFactor) const

Definition at line 1183 of file qgsfillsymbollayerv2.cpp.

References mColor, mDistance, mLineAngle, and mLineWidth.

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::outputUnit ( ) const
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 875 of file qgsfillsymbollayerv2.cpp.

References mDistanceUnit, QgsSymbolV2::Mixed, mLineWidthUnit, and mOffsetUnit.

QgsStringMap QgsLinePatternFillSymbolLayer::properties ( ) const
virtual
void QgsLinePatternFillSymbolLayer::setColor ( const QColor &  c)
inlinevirtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 244 of file qgsfillsymbollayerv2.h.

Referenced by create(), and createFromSld().

void QgsLinePatternFillSymbolLayer::setDistance ( double  d)
inline

Definition at line 240 of file qgsfillsymbollayerv2.h.

Referenced by create(), and createFromSld().

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

Definition at line 249 of file qgsfillsymbollayerv2.h.

Referenced by clone(), and create().

void QgsLinePatternFillSymbolLayer::setLineAngle ( double  a)
inline

Definition at line 238 of file qgsfillsymbollayerv2.h.

Referenced by create(), and createFromSld().

void QgsLinePatternFillSymbolLayer::setLineWidth ( double  w)
inline

Definition at line 242 of file qgsfillsymbollayerv2.h.

Referenced by create(), and createFromSld().

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

Definition at line 252 of file qgsfillsymbollayerv2.h.

Referenced by clone(), and create().

void QgsLinePatternFillSymbolLayer::setOffset ( double  offset)
inline

Definition at line 246 of file qgsfillsymbollayerv2.h.

Referenced by create(), and createFromSld().

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

Definition at line 255 of file qgsfillsymbollayerv2.h.

Referenced by clone(), and create().

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

Reimplemented from QgsSymbolLayerV2.

Definition at line 868 of file qgsfillsymbollayerv2.cpp.

References mDistanceUnit, mLineWidthUnit, and mOffsetUnit.

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

Implements QgsSymbolLayerV2.

Definition at line 1102 of file qgsfillsymbollayerv2.cpp.

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

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

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::mDistanceUnit
protected

Definition at line 264 of file qgsfillsymbollayerv2.h.

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

double QgsLinePatternFillSymbolLayer::mLineAngle
protected

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

Definition at line 270 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 266 of file qgsfillsymbollayerv2.h.

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

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::mLineWidthUnit
protected

Definition at line 267 of file qgsfillsymbollayerv2.h.

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

double QgsLinePatternFillSymbolLayer::mOffset
protected

Offset perpendicular to line direction.

Definition at line 272 of file qgsfillsymbollayerv2.h.

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

QgsSymbolV2::OutputUnit QgsLinePatternFillSymbolLayer::mOffsetUnit
protected

Definition at line 273 of file qgsfillsymbollayerv2.h.

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


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