QGIS API Documentation  2.3.0-Master
 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 Referenceabstract

#include <qgssymbollayerv2.h>

Inheritance diagram for QgsSymbolLayerV2:
Inheritance graph
[legend]

Public Member Functions

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 QString layerType () const =0
 
virtual void startRender (QgsSymbolV2RenderContext &context)=0
 
virtual void stopRender (QgsSymbolV2RenderContext &context)=0
 
virtual QgsSymbolLayerV2clone () const =0
 
virtual void toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
 
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
 
virtual QgsStringMap properties () const =0
 
virtual void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)=0
 
virtual QgsSymbolV2subSymbol ()
 
virtual bool setSubSymbol (QgsSymbolV2 *symbol)
 
QgsSymbolV2::SymbolType type () const
 
void setLocked (bool locked)
 
bool isLocked () const
 
virtual double estimateMaxBleed () const
 Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. More...
 
virtual void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
virtual QgsSymbolV2::OutputUnit outputUnit () 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 double dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const
 
virtual QColor dxfColor (const QgsSymbolV2RenderContext &context) const
 
virtual QVector< qreal > dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const
 
virtual Qt::PenStyle dxfPenStyle () const
 

Protected Member Functions

 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

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

Static Protected Attributes

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

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 130 of file qgssymbollayerv2.h.

Member Function Documentation

virtual QgsSymbolLayerV2* QgsSymbolLayerV2::clone ( ) const
pure virtual
virtual QColor QgsSymbolLayerV2::color ( void  ) const
inlinevirtual
void QgsSymbolLayerV2::copyDataDefinedProperties ( QgsSymbolLayerV2 destLayer) const
protected
const QgsExpression * QgsSymbolLayerV2::dataDefinedProperty ( const QString &  property) const
virtual
QString QgsSymbolLayerV2::dataDefinedPropertyString ( const QString &  property) const
virtual

Definition at line 49 of file qgssymbollayerv2.cpp.

References dataDefinedProperty(), and QgsExpression::expression().

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

Reimplemented in QgsImageFillSymbolLayer, QgsSimpleFillSymbolLayerV2, and QgsSimpleLineSymbolLayerV2.

Definition at line 104 of file qgssymbollayerv2.cpp.

References color().

QVector< qreal > QgsSymbolLayerV2::dxfCustomDashPattern ( QgsSymbolV2::OutputUnit unit) const
virtual

Reimplemented in QgsSimpleLineSymbolLayerV2.

Definition at line 110 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, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayerV2, QgsGradientFillSymbolLayerV2, QgsMarkerLineSymbolLayerV2, QgsSimpleFillSymbolLayerV2, and QgsSimpleLineSymbolLayerV2.

Definition at line 96 of file qgssymbollayerv2.h.

Referenced by QgsLinePatternFillSymbolLayer::applyPattern(), QgsImageFillSymbolLayer::estimateMaxBleed(), and QgsSymbolLayerV2Utils::estimateMaxSymbolBleed().

QgsExpression * QgsSymbolLayerV2::expression ( const QString &  property) const
protectedvirtual
virtual QColor QgsSymbolLayerV2::fillColor ( ) const
inlinevirtual
bool QgsSymbolLayerV2::hasDataDefinedProperties ( ) const
inline

Definition at line 113 of file qgssymbollayerv2.h.

bool QgsSymbolLayerV2::isLocked ( ) const
inline

Definition at line 90 of file qgssymbollayerv2.h.

Referenced by QgsSymbolLayerV2Utils::saveSymbol().

virtual QString QgsSymbolLayerV2::layerType ( ) const
pure virtual
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
virtual QgsStringMap QgsSymbolLayerV2::properties ( ) const
pure virtual
void QgsSymbolLayerV2::removeDataDefinedProperties ( )
virtual

Definition at line 71 of file qgssymbollayerv2.cpp.

References mDataDefinedProperties.

Referenced by copyDataDefinedProperties().

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

Definition at line 61 of file qgssymbollayerv2.cpp.

References mDataDefinedProperties.

Referenced by setDataDefinedProperty(), and QgsHighlight::setSymbol().

int QgsSymbolLayerV2::renderingPass ( ) const
inline
void QgsSymbolLayerV2::saveDataDefinedProperties ( QgsStringMap stringMap) const
protected
virtual void QgsSymbolLayerV2::setColor ( const QColor &  color)
inlinevirtual
void QgsSymbolLayerV2::setDataDefinedProperty ( const QString &  property,
const QString &  expressionString 
)
virtual
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.

Referenced by QgsHighlight::setSymbol().

void QgsSymbolLayerV2::setLocked ( bool  locked)
inline
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.

Referenced by QgsHighlight::setSymbol().

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

Referenced by QgsGradientFillSymbolLayerV2::applyDataDefinedSymbology(), QgsShapeburstFillSymbolLayerV2::applyDataDefinedSymbology(), QgsSimpleLineSymbolLayerV2::clone(), QgsSimpleFillSymbolLayerV2::clone(), QgsSimpleMarkerSymbolLayerV2::clone(), QgsGradientFillSymbolLayerV2::clone(), QgsFontMarkerSymbolLayerV2::clone(), QgsShapeburstFillSymbolLayerV2::clone(), QgsLinePatternFillSymbolLayer::color(), QgsSimpleLineSymbolLayerV2::dxfColor(), QgsSimpleFillSymbolLayerV2::dxfColor(), QgsSimpleMarkerSymbolLayerV2::ogrFeatureStyle(), QgsSimpleFillSymbolLayerV2::ogrFeatureStyle(), QgsSimpleLineSymbolLayerV2::properties(), QgsSimpleFillSymbolLayerV2::properties(), QgsSimpleMarkerSymbolLayerV2::properties(), QgsGradientFillSymbolLayerV2::properties(), QgsFontMarkerSymbolLayerV2::properties(), QgsShapeburstFillSymbolLayerV2::properties(), QgsFontMarkerSymbolLayerV2::QgsFontMarkerSymbolLayerV2(), QgsGradientFillSymbolLayerV2::QgsGradientFillSymbolLayerV2(), QgsShapeburstFillSymbolLayerV2::QgsShapeburstFillSymbolLayerV2(), QgsSimpleFillSymbolLayerV2::QgsSimpleFillSymbolLayerV2(), QgsSimpleLineSymbolLayerV2::QgsSimpleLineSymbolLayerV2(), QgsSimpleMarkerSymbolLayerV2::QgsSimpleMarkerSymbolLayerV2(), QgsFontMarkerSymbolLayerV2::renderPoint(), QgsMarkerLineSymbolLayerV2::setColor(), QgsCentroidFillSymbolLayerV2::setColor(), QgsMarkerLineSymbolLayerV2::setSubSymbol(), QgsCentroidFillSymbolLayerV2::setSubSymbol(), QgsSimpleLineSymbolLayerV2::startRender(), QgsSimpleMarkerSymbolLayerV2::startRender(), QgsSimpleFillSymbolLayerV2::startRender(), QgsSimpleLineSymbolLayerV2::toSld(), QgsSimpleFillSymbolLayerV2::toSld(), QgsSimpleMarkerSymbolLayerV2::writeSldMarker(), and QgsFontMarkerSymbolLayerV2::writeSldMarker().

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

Definition at line 134 of file qgssymbollayerv2.h.

int QgsSymbolLayerV2::mRenderingPass
protected

Definition at line 136 of file qgssymbollayerv2.h.

QgsSymbolV2::SymbolType QgsSymbolLayerV2::mType
protected

Definition at line 133 of file qgssymbollayerv2.h.

const bool QgsSymbolLayerV2::selectFillBorder = false
staticprotected

Definition at line 142 of file qgssymbollayerv2.h.

Referenced by QgsImageFillSymbolLayer::renderPolygon().

const bool QgsSymbolLayerV2::selectFillStyle = false
staticprotected

Definition at line 143 of file qgssymbollayerv2.h.

Referenced by QgsSimpleFillSymbolLayerV2::startRender().

const bool QgsSymbolLayerV2::selectionIsOpaque = true
staticprotected

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