QGIS API Documentation  2.9.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
QgsSymbolLayerV2 Class Referenceabstract

#include <qgssymbollayerv2.h>

Inheritance diagram for QgsSymbolLayerV2:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsSymbolLayerV2 ()
 
virtual QgsSymbolLayerV2clone () const =0
 
virtual QColor color () const
 
virtual const QgsExpressiondataDefinedProperty (const QString &property) const
 
virtual QString dataDefinedPropertyString (const QString &property) const
 
virtual void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)=0
 
virtual QColor dxfBrushColor (const QgsSymbolV2RenderContext &context) const
 
virtual Qt::BrushStyle dxfBrushStyle () const
 
virtual QColor dxfColor (const QgsSymbolV2RenderContext &context) const
 
virtual QVector< qreal > dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const
 
virtual double dxfOffset (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const
 
virtual Qt::PenStyle dxfPenStyle () const
 
virtual double dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const
 
virtual double estimateMaxBleed () const
 Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. More...
 
virtual QColor fillColor () const
 Get fill color. More...
 
bool hasDataDefinedProperties () const
 
bool isLocked () const
 
virtual QString layerType () const =0
 
virtual QgsMapUnitScale mapUnitScale () const
 
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
 
virtual QColor outlineColor () const
 Get outline color. More...
 
virtual QgsSymbolV2::OutputUnit outputUnit () const
 
QgsPaintEffectpaintEffect () const
 Returns the current paint effect for the layer. More...
 
virtual QgsStringMap properties () const =0
 
virtual void removeDataDefinedProperties ()
 
virtual void removeDataDefinedProperty (const QString &property)
 
int renderingPass () const
 
virtual void setColor (const QColor &color)
 
virtual void setDataDefinedProperty (const QString &property, const QString &expressionString)
 
virtual void setFillColor (const QColor &color)
 Set fill color. More...
 
void setLocked (bool locked)
 
virtual void setMapUnitScale (const QgsMapUnitScale &scale)
 
virtual void setOutlineColor (const QColor &color)
 Set outline color. More...
 
virtual void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
void setPaintEffect (QgsPaintEffect *effect)
 Sets the current paint effect for the layer. More...
 
void setRenderingPass (int renderingPass)
 
virtual bool setSubSymbol (QgsSymbolV2 *symbol)
 
virtual void startRender (QgsSymbolV2RenderContext &context)=0
 
virtual void stopRender (QgsSymbolV2RenderContext &context)=0
 
virtual QgsSymbolV2subSymbol ()
 
virtual void toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
 
QgsSymbolV2::SymbolType type () const
 
virtual QSet< QString > usedAttributes () 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
 

Protected Member Functions

 QgsSymbolLayerV2 (QgsSymbolV2::SymbolType type, bool locked=false)
 
void copyDataDefinedProperties (QgsSymbolLayerV2 *destLayer) const
 Copies data defined properties of this layer to another symbol layer. More...
 
void copyPaintEffect (QgsSymbolLayerV2 *destLayer) const
 Copies paint effect of this layer to another symbol layer. More...
 
virtual QgsExpressionexpression (const QString &property) const
 
virtual void prepareExpressions (const QgsFields *fields, double scale=-1.0)
 
void saveDataDefinedProperties (QgsStringMap &stringMap) const
 Saves data defined properties to string map. More...
 

Protected Attributes

QColor mColor
 
QMap< QString, QgsExpression * > mDataDefinedProperties
 
bool mLocked
 
QgsPaintEffectmPaintEffect
 
int mRenderingPass
 
QgsSymbolV2::SymbolType mType
 

Static Protected Attributes

static const bool selectFillBorder = false
 
static const bool selectFillStyle = false
 
static const bool selectionIsOpaque = true
 

Detailed Description

Definition at line 45 of file qgssymbollayerv2.h.

Constructor & Destructor Documentation

QgsSymbolLayerV2::~QgsSymbolLayerV2 ( )
virtual

Definition at line 185 of file qgssymbollayerv2.cpp.

QgsSymbolLayerV2::QgsSymbolLayerV2 ( QgsSymbolV2::SymbolType  type,
bool  locked = false 
)
protected

Definition at line 152 of file qgssymbollayerv2.cpp.

Member Function Documentation

virtual QgsSymbolLayerV2* QgsSymbolLayerV2::clone ( ) const
pure virtual
virtual QColor QgsSymbolLayerV2::color ( void  ) const
inlinevirtual

Reimplemented in QgsLinePatternFillSymbolLayer.

Definition at line 52 of file qgssymbollayerv2.h.

void QgsSymbolLayerV2::copyDataDefinedProperties ( QgsSymbolLayerV2 destLayer) const
protected

Copies data defined properties of this layer to another symbol layer.

Definition at line 226 of file qgssymbollayerv2.cpp.

void QgsSymbolLayerV2::copyPaintEffect ( QgsSymbolLayerV2 destLayer) const
protected

Copies paint effect of this layer to another symbol layer.

Parameters
destLayerdestination layer
Note
added in QGIS 2.9

Definition at line 243 of file qgssymbollayerv2.cpp.

const QgsExpression * QgsSymbolLayerV2::dataDefinedProperty ( const QString &  property) const
virtual

Definition at line 31 of file qgssymbollayerv2.cpp.

QString QgsSymbolLayerV2::dataDefinedPropertyString ( const QString &  property) const
virtual

Definition at line 51 of file qgssymbollayerv2.cpp.

virtual void QgsSymbolLayerV2::drawPreviewIcon ( QgsSymbolV2RenderContext context,
QSize  size 
)
pure virtual
QColor QgsSymbolLayerV2::dxfBrushColor ( const QgsSymbolV2RenderContext context) const
virtual

Reimplemented in QgsSimpleFillSymbolLayerV2.

Definition at line 130 of file qgssymbollayerv2.cpp.

Qt::BrushStyle QgsSymbolLayerV2::dxfBrushStyle ( ) const
virtual

Reimplemented in QgsSimpleFillSymbolLayerV2.

Definition at line 136 of file qgssymbollayerv2.cpp.

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

Reimplemented in QgsSimpleLineSymbolLayerV2.

Definition at line 119 of file qgssymbollayerv2.cpp.

double QgsSymbolLayerV2::dxfOffset ( const QgsDxfExport e,
const QgsSymbolV2RenderContext context 
) const
virtual

Reimplemented in QgsSimpleLineSymbolLayerV2.

Definition at line 106 of file qgssymbollayerv2.cpp.

Qt::PenStyle QgsSymbolLayerV2::dxfPenStyle ( ) const
virtual
double QgsSymbolLayerV2::dxfWidth ( const QgsDxfExport e,
const QgsSymbolV2RenderContext context 
) const
virtual
virtual double QgsSymbolLayerV2::estimateMaxBleed ( ) const
inlinevirtual

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 in QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsRasterFillSymbolLayer, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayerV2, QgsGradientFillSymbolLayerV2, QgsMarkerLineSymbolLayerV2, QgsSimpleFillSymbolLayerV2, and QgsSimpleLineSymbolLayerV2.

Definition at line 96 of file qgssymbollayerv2.h.

QgsExpression * QgsSymbolLayerV2::expression ( const QString &  property) const
protectedvirtual

Definition at line 41 of file qgssymbollayerv2.cpp.

virtual QColor QgsSymbolLayerV2::fillColor ( ) const
inlinevirtual

Get fill color.

Supported by marker and fill layers.

Note
added in 2.1

Reimplemented in QgsSvgMarkerSymbolLayerV2, QgsSimpleMarkerSymbolLayerV2, QgsSimpleFillSymbolLayerV2, and QgsEllipseSymbolLayerV2.

Definition at line 65 of file qgssymbollayerv2.h.

bool QgsSymbolLayerV2::hasDataDefinedProperties ( ) const
inline

Definition at line 116 of file qgssymbollayerv2.h.

bool QgsSymbolLayerV2::isLocked ( ) const
inline

Definition at line 90 of file qgssymbollayerv2.h.

virtual QString QgsSymbolLayerV2::layerType ( ) const
pure virtual
virtual QgsMapUnitScale QgsSymbolLayerV2::mapUnitScale ( ) const
inlinevirtual
virtual QString QgsSymbolLayerV2::ogrFeatureStyle ( double  mmScaleFactor,
double  mapUnitScaleFactor 
) const
inlinevirtual
virtual QColor QgsSymbolLayerV2::outlineColor ( ) const
inlinevirtual

Get outline color.

Supported by marker and fill layers.

Note
added in 2.1

Reimplemented in QgsSvgMarkerSymbolLayerV2, QgsSimpleMarkerSymbolLayerV2, QgsSimpleFillSymbolLayerV2, and QgsEllipseSymbolLayerV2.

Definition at line 59 of file qgssymbollayerv2.h.

virtual QgsSymbolV2::OutputUnit QgsSymbolLayerV2::outputUnit ( ) const
inlinevirtual
QgsPaintEffect * QgsSymbolLayerV2::paintEffect ( ) const

Returns the current paint effect for the layer.

Returns
paint effect
Note
added in QGIS 2.9
See also
setPaintEffect

Definition at line 141 of file qgssymbollayerv2.cpp.

void QgsSymbolLayerV2::prepareExpressions ( const QgsFields fields,
double  scale = -1.0 
)
protectedvirtual

Definition at line 164 of file qgssymbollayerv2.cpp.

virtual QgsStringMap QgsSymbolLayerV2::properties ( ) const
pure virtual
void QgsSymbolLayerV2::removeDataDefinedProperties ( )
virtual

Definition at line 73 of file qgssymbollayerv2.cpp.

void QgsSymbolLayerV2::removeDataDefinedProperty ( const QString &  property)
virtual

Definition at line 63 of file qgssymbollayerv2.cpp.

int QgsSymbolLayerV2::renderingPass ( ) const
inline

Definition at line 106 of file qgssymbollayerv2.h.

void QgsSymbolLayerV2::saveDataDefinedProperties ( QgsStringMap stringMap) const
protected

Saves data defined properties to string map.

Definition at line 214 of file qgssymbollayerv2.cpp.

virtual void QgsSymbolLayerV2::setColor ( const QColor &  color)
inlinevirtual
void QgsSymbolLayerV2::setDataDefinedProperty ( const QString &  property,
const QString &  expressionString 
)
virtual

Definition at line 57 of file qgssymbollayerv2.cpp.

virtual void QgsSymbolLayerV2::setFillColor ( const QColor &  color)
inlinevirtual

Set fill color.

Supported by marker and fill layers.

Note
added in 2.1

Reimplemented in QgsSvgMarkerSymbolLayerV2, QgsSimpleMarkerSymbolLayerV2, QgsSimpleFillSymbolLayerV2, and QgsEllipseSymbolLayerV2.

Definition at line 62 of file qgssymbollayerv2.h.

void QgsSymbolLayerV2::setLocked ( bool  locked)
inline

Definition at line 89 of file qgssymbollayerv2.h.

virtual void QgsSymbolLayerV2::setMapUnitScale ( const QgsMapUnitScale scale)
inlinevirtual
virtual void QgsSymbolLayerV2::setOutlineColor ( const QColor &  color)
inlinevirtual

Set outline color.

Supported by marker and fill layers.

Note
added in 2.1

Reimplemented in QgsSvgMarkerSymbolLayerV2, QgsSimpleMarkerSymbolLayerV2, QgsSimpleFillSymbolLayerV2, and QgsEllipseSymbolLayerV2.

Definition at line 56 of file qgssymbollayerv2.h.

virtual void QgsSymbolLayerV2::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
inlinevirtual
void QgsSymbolLayerV2::setPaintEffect ( QgsPaintEffect effect)

Sets the current paint effect for the layer.

Parameters
effectpaint effect. Ownership is transferred to the layer.
Note
added in QGIS 2.9
See also
paintEffect

Definition at line 146 of file qgssymbollayerv2.cpp.

void QgsSymbolLayerV2::setRenderingPass ( int  renderingPass)
inline

Definition at line 105 of file qgssymbollayerv2.h.

virtual bool QgsSymbolLayerV2::setSubSymbol ( QgsSymbolV2 symbol)
inlinevirtual
virtual void QgsSymbolLayerV2::startRender ( QgsSymbolV2RenderContext context)
pure virtual
virtual void QgsSymbolLayerV2::stopRender ( QgsSymbolV2RenderContext context)
pure virtual
virtual QgsSymbolV2* QgsSymbolLayerV2::subSymbol ( )
inlinevirtual
virtual void QgsSymbolLayerV2::toSld ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
inlinevirtual
QgsSymbolV2::SymbolType QgsSymbolLayerV2::type ( ) const
inline

Definition at line 87 of file qgssymbollayerv2.h.

QSet< QString > QgsSymbolLayerV2::usedAttributes ( ) const
virtual
bool QgsSymbolLayerV2::writeDxf ( QgsDxfExport e,
double  mmMapUnitScaleFactor,
const QString &  layerName,
const QgsSymbolV2RenderContext context,
const QgsFeature f,
const QPointF &  shift = QPointF( 0.0, 0.0 ) 
) const
virtual

Member Data Documentation

QColor QgsSymbolLayerV2::mColor
protected

Definition at line 154 of file qgssymbollayerv2.h.

QMap< QString, QgsExpression* > QgsSymbolLayerV2::mDataDefinedProperties
protected

Definition at line 157 of file qgssymbollayerv2.h.

bool QgsSymbolLayerV2::mLocked
protected

Definition at line 153 of file qgssymbollayerv2.h.

QgsPaintEffect* QgsSymbolLayerV2::mPaintEffect
protected

Definition at line 158 of file qgssymbollayerv2.h.

int QgsSymbolLayerV2::mRenderingPass
protected

Definition at line 155 of file qgssymbollayerv2.h.

QgsSymbolV2::SymbolType QgsSymbolLayerV2::mType
protected

Definition at line 152 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectFillBorder = false
staticprotected

Definition at line 162 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectFillStyle = false
staticprotected

Definition at line 163 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectionIsOpaque = true
staticprotected

Definition at line 161 of file qgssymbollayerv2.h.


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