QGIS API Documentation  2.6.0-Brighton
 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 QColor color () const
virtual void setColor (const QColor &color)
virtual void setOutlineColor (const QColor &color)
 Set outline color.
virtual QColor outlineColor () const
 Get outline color.
virtual void setFillColor (const QColor &color)
 Set fill color.
virtual QColor fillColor () const
 Get fill color.
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.
virtual void setOutputUnit (QgsSymbolV2::OutputUnit unit)
virtual QgsSymbolV2::OutputUnit outputUnit () const
virtual void setMapUnitScale (const QgsMapUnitScale &scale)
virtual QgsMapUnitScale mapUnitScale () 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
virtual QColor dxfBrushColor (const QgsSymbolV2RenderContext &context) const
virtual Qt::BrushStyle dxfBrushStyle () 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.
void copyDataDefinedProperties (QgsSymbolLayerV2 *destLayer) const
 Copies data defined properties of this layer to another symbol layer.

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented in QgsLinePatternFillSymbolLayer.

void QgsSymbolLayerV2::copyDataDefinedProperties ( QgsSymbolLayerV2 destLayer) const
protected

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

const QgsExpression * QgsSymbolLayerV2::dataDefinedProperty ( const QString &  property) const
virtual
QString QgsSymbolLayerV2::dataDefinedPropertyString ( const QString &  property) const
virtual
virtual void QgsSymbolLayerV2::drawPreviewIcon ( QgsSymbolV2RenderContext context,
QSize  size 
)
pure virtual
QColor QgsSymbolLayerV2::dxfBrushColor ( const QgsSymbolV2RenderContext context) const
virtual

Reimplemented in QgsSimpleFillSymbolLayerV2.

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

Reimplemented in QgsSimpleFillSymbolLayerV2.

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

Reimplemented in QgsSimpleLineSymbolLayerV2.

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.

QgsExpression * QgsSymbolLayerV2::expression ( const QString &  property) const
protectedvirtual
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.

bool QgsSymbolLayerV2::hasDataDefinedProperties ( ) const
inline
bool QgsSymbolLayerV2::isLocked ( ) const
inline
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.

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
void QgsSymbolLayerV2::removeDataDefinedProperty ( const QString &  property)
virtual
int QgsSymbolLayerV2::renderingPass ( ) const
inline
void QgsSymbolLayerV2::saveDataDefinedProperties ( QgsStringMap stringMap) const
protected

Saves data defined properties to string map.

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.

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

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
QMap< QString, QgsExpression* > QgsSymbolLayerV2::mDataDefinedProperties
protected
bool QgsSymbolLayerV2::mLocked
protected
int QgsSymbolLayerV2::mRenderingPass
protected
QgsSymbolV2::SymbolType QgsSymbolLayerV2::mType
protected
const bool QgsSymbolLayerV2::selectFillBorder = false
staticprotected
const bool QgsSymbolLayerV2::selectFillStyle = false
staticprotected
const bool QgsSymbolLayerV2::selectionIsOpaque = true
staticprotected

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