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

#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.
virtual QColor fillColor () const
 Get fill color.
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.
virtual QgsSymbolV2::OutputUnit outputUnit () const
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.
void setLocked (bool locked)
virtual void setMapUnitScale (const QgsMapUnitScale &scale)
virtual void setOutlineColor (const QColor &color)
 Set outline color.
virtual void setOutputUnit (QgsSymbolV2::OutputUnit unit)
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.
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.

Protected Attributes

QColor mColor
QMap< QString, QgsExpression * > mDataDefinedProperties
bool mLocked
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

virtual QgsSymbolLayerV2::~QgsSymbolLayerV2 ( )
inlinevirtual

Definition at line 65 of file qgssymbollayerv2.h.

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

Definition at line 136 of file qgssymbollayerv2.h.

Member Function Documentation

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

Reimplemented in QgsLinePatternFillSymbolLayer.

Definition at line 50 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 195 of file qgssymbollayerv2.cpp.

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

Definition at line 29 of file qgssymbollayerv2.cpp.

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

Definition at line 49 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 128 of file qgssymbollayerv2.cpp.

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

Reimplemented in QgsSimpleFillSymbolLayerV2.

Definition at line 134 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 117 of file qgssymbollayerv2.cpp.

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

Reimplemented in QgsSimpleLineSymbolLayerV2.

Definition at line 104 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 39 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 63 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 57 of file qgssymbollayerv2.h.

virtual QgsSymbolV2::OutputUnit QgsSymbolLayerV2::outputUnit ( ) const
inlinevirtual
void QgsSymbolLayerV2::prepareExpressions ( const QgsFields fields,
double  scale = -1.0 
)
protectedvirtual

Definition at line 139 of file qgssymbollayerv2.cpp.

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

Definition at line 71 of file qgssymbollayerv2.cpp.

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

Definition at line 61 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 183 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 55 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 60 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 54 of file qgssymbollayerv2.h.

virtual void QgsSymbolLayerV2::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
inlinevirtual
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 141 of file qgssymbollayerv2.h.

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

Definition at line 144 of file qgssymbollayerv2.h.

bool QgsSymbolLayerV2::mLocked
protected

Definition at line 140 of file qgssymbollayerv2.h.

int QgsSymbolLayerV2::mRenderingPass
protected

Definition at line 142 of file qgssymbollayerv2.h.

QgsSymbolV2::SymbolType QgsSymbolLayerV2::mType
protected

Definition at line 139 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectFillBorder = false
staticprotected

Definition at line 148 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectFillStyle = false
staticprotected

Definition at line 149 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectionIsOpaque = true
staticprotected

Definition at line 147 of file qgssymbollayerv2.h.


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