QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes | List of all members
QgsMarkerSymbolLayerV2 Class Referenceabstract

#include <qgssymbollayerv2.h>

Inheritance diagram for QgsMarkerSymbolLayerV2:
Inheritance graph
[legend]
Collaboration diagram for QgsMarkerSymbolLayerV2:
Collaboration graph
[legend]

Public Types

enum  HorizontalAnchorPoint { Left, HCenter, Right }
 
enum  VerticalAnchorPoint { Top, VCenter, Bottom }
 

Public Member Functions

void startRender (QgsSymbolV2RenderContext &context)
 
virtual void renderPoint (const QPointF &point, QgsSymbolV2RenderContext &context)=0
 
void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)
 
void setAngle (double angle)
 
double angle () const
 
void setSize (double size)
 
double size () const
 
void setScaleMethod (QgsSymbolV2::ScaleMethod scaleMethod)
 
QgsSymbolV2::ScaleMethod scaleMethod () const
 
void setOffset (QPointF offset)
 
QPointF offset ()
 
virtual void toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
 
virtual void writeSldMarker (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
 
void setOffsetUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit offsetUnit () const
 
void setOffsetMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScaleoffsetMapUnitScale () const
 
void setSizeUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit sizeUnit () const
 
void setSizeMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScalesizeMapUnitScale () const
 
void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outputUnit () const
 
void setMapUnitScale (const QgsMapUnitScale &scale)
 
QgsMapUnitScale mapUnitScale () const
 
void setHorizontalAnchorPoint (HorizontalAnchorPoint h)
 
HorizontalAnchorPoint horizontalAnchorPoint () const
 
void setVerticalAnchorPoint (VerticalAnchorPoint v)
 
VerticalAnchorPoint verticalAnchorPoint () const
 
- Public Member Functions inherited from QgsSymbolLayerV2
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 stopRender (QgsSymbolV2RenderContext &context)=0
 
virtual QgsSymbolLayerV2clone () const =0
 
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
 
virtual QgsStringMap properties () const =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...
 
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

 QgsMarkerSymbolLayerV2 (bool locked=false)
 
void markerOffset (const QgsSymbolV2RenderContext &context, double &offsetX, double &offsetY) const
 
void markerOffset (const QgsSymbolV2RenderContext &context, double width, double height, double &offsetX, double &offsetY) const
 
void markerOffset (const QgsSymbolV2RenderContext &context, double width, double height, QgsSymbolV2::OutputUnit widthUnit, QgsSymbolV2::OutputUnit heightUnit, double &offsetX, double &offsetY, const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale) const
 
- Protected Member Functions inherited from QgsSymbolLayerV2
 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...
 

Static Protected Member Functions

static QPointF _rotatedOffset (const QPointF &offset, double angle)
 

Protected Attributes

double mAngle
 
double mSize
 
QgsSymbolV2::OutputUnit mSizeUnit
 
QgsMapUnitScale mSizeMapUnitScale
 
QPointF mOffset
 
QgsSymbolV2::OutputUnit mOffsetUnit
 
QgsMapUnitScale mOffsetMapUnitScale
 
QgsSymbolV2::ScaleMethod mScaleMethod
 
HorizontalAnchorPoint mHorizontalAnchorPoint
 
VerticalAnchorPoint mVerticalAnchorPoint
 
- Protected Attributes inherited from QgsSymbolLayerV2
QgsSymbolV2::SymbolType mType
 
bool mLocked
 
QColor mColor
 
int mRenderingPass
 
QMap< QString, QgsExpression * > mDataDefinedProperties
 

Static Private Member Functions

static
QgsMarkerSymbolLayerV2::HorizontalAnchorPoint 
decodeHorizontalAnchorPoint (const QString &str)
 
static
QgsMarkerSymbolLayerV2::VerticalAnchorPoint 
decodeVerticalAnchorPoint (const QString &str)
 

Private Attributes

QgsExpressionmOffsetExpression
 
QgsExpressionmHorizontalAnchorExpression
 
QgsExpressionmVerticalAnchorExpression
 

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

Member Enumeration Documentation

Enumerator
Left 
HCenter 
Right 

Definition at line 162 of file qgssymbollayerv2.h.

Enumerator
Top 
VCenter 
Bottom 

Definition at line 169 of file qgssymbollayerv2.h.

Constructor & Destructor Documentation

QgsMarkerSymbolLayerV2::QgsMarkerSymbolLayerV2 ( bool  locked = false)
protected

Member Function Documentation

QPointF QgsMarkerSymbolLayerV2::_rotatedOffset ( const QPointF &  offset,
double  angle 
)
staticprotected
double QgsMarkerSymbolLayerV2::angle ( void  ) const
inline
QgsMarkerSymbolLayerV2::HorizontalAnchorPoint QgsMarkerSymbolLayerV2::decodeHorizontalAnchorPoint ( const QString &  str)
staticprivate

Definition at line 302 of file qgssymbollayerv2.cpp.

References HCenter, Left, and Right.

Referenced by markerOffset().

QgsMarkerSymbolLayerV2::VerticalAnchorPoint QgsMarkerSymbolLayerV2::decodeVerticalAnchorPoint ( const QString &  str)
staticprivate

Definition at line 318 of file qgssymbollayerv2.cpp.

References Bottom, Top, and VCenter.

Referenced by markerOffset().

void QgsMarkerSymbolLayerV2::drawPreviewIcon ( QgsSymbolV2RenderContext context,
QSize  size 
)
virtual

Implements QgsSymbolLayerV2.

Reimplemented in QgsVectorFieldSymbolLayer.

Definition at line 222 of file qgssymbollayerv2.cpp.

References renderPoint(), startRender(), and QgsSymbolLayerV2::stopRender().

HorizontalAnchorPoint QgsMarkerSymbolLayerV2::horizontalAnchorPoint ( ) const
inline

Definition at line 218 of file qgssymbollayerv2.h.

Referenced by markerOffset().

QgsMapUnitScale QgsMarkerSymbolLayerV2::mapUnitScale ( ) const
virtual
void QgsMarkerSymbolLayerV2::markerOffset ( const QgsSymbolV2RenderContext context,
double &  offsetX,
double &  offsetY 
) const
protected
void QgsMarkerSymbolLayerV2::markerOffset ( const QgsSymbolV2RenderContext context,
double  width,
double  height,
double &  offsetX,
double &  offsetY 
) const
protected

Definition at line 234 of file qgssymbollayerv2.cpp.

References markerOffset(), mSizeMapUnitScale, and mSizeUnit.

void QgsMarkerSymbolLayerV2::markerOffset ( const QgsSymbolV2RenderContext context,
double  width,
double  height,
QgsSymbolV2::OutputUnit  widthUnit,
QgsSymbolV2::OutputUnit  heightUnit,
double &  offsetX,
double &  offsetY,
const QgsMapUnitScale widthMapUnitScale,
const QgsMapUnitScale heightMapUnitScale 
) const
protected
QPointF QgsMarkerSymbolLayerV2::offset ( )
inline
const QgsMapUnitScale& QgsMarkerSymbolLayerV2::offsetMapUnitScale ( ) const
inline

Definition at line 203 of file qgssymbollayerv2.h.

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

Definition at line 200 of file qgssymbollayerv2.h.

QgsSymbolV2::OutputUnit QgsMarkerSymbolLayerV2::outputUnit ( ) const
virtual
virtual void QgsMarkerSymbolLayerV2::renderPoint ( const QPointF &  point,
QgsSymbolV2RenderContext context 
)
pure virtual
QgsSymbolV2::ScaleMethod QgsMarkerSymbolLayerV2::scaleMethod ( ) const
inline
void QgsMarkerSymbolLayerV2::setAngle ( double  angle)
inline
void QgsMarkerSymbolLayerV2::setHorizontalAnchorPoint ( HorizontalAnchorPoint  h)
inline
void QgsMarkerSymbolLayerV2::setMapUnitScale ( const QgsMapUnitScale scale)
virtual
void QgsMarkerSymbolLayerV2::setOffset ( QPointF  offset)
inline
void QgsMarkerSymbolLayerV2::setOffsetMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsMarkerSymbolLayerV2::setOffsetUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsMarkerSymbolLayerV2::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual
void QgsMarkerSymbolLayerV2::setScaleMethod ( QgsSymbolV2::ScaleMethod  scaleMethod)
inline

Definition at line 188 of file qgssymbollayerv2.h.

Referenced by QgsMarkerSymbolV2::setScaleMethod().

void QgsMarkerSymbolLayerV2::setSize ( double  size)
inline
void QgsMarkerSymbolLayerV2::setSizeMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsMarkerSymbolLayerV2::setSizeUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsMarkerSymbolLayerV2::setVerticalAnchorPoint ( VerticalAnchorPoint  v)
inline
double QgsMarkerSymbolLayerV2::size ( void  ) const
inline
const QgsMapUnitScale& QgsMarkerSymbolLayerV2::sizeMapUnitScale ( ) const
inline

Definition at line 209 of file qgssymbollayerv2.h.

QgsSymbolV2::OutputUnit QgsMarkerSymbolLayerV2::sizeUnit ( ) const
inline

Definition at line 206 of file qgssymbollayerv2.h.

void QgsMarkerSymbolLayerV2::startRender ( QgsSymbolV2RenderContext context)
virtual
void QgsMarkerSymbolLayerV2::toSld ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
virtual
VerticalAnchorPoint QgsMarkerSymbolLayerV2::verticalAnchorPoint ( ) const
inline

Definition at line 221 of file qgssymbollayerv2.h.

Referenced by markerOffset().

virtual void QgsMarkerSymbolLayerV2::writeSldMarker ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
inlinevirtual

Member Data Documentation

double QgsMarkerSymbolLayerV2::mAngle
protected
QgsExpression* QgsMarkerSymbolLayerV2::mHorizontalAnchorExpression
private

Definition at line 255 of file qgssymbollayerv2.h.

Referenced by markerOffset(), QgsMarkerSymbolLayerV2(), and startRender().

HorizontalAnchorPoint QgsMarkerSymbolLayerV2::mHorizontalAnchorPoint
protected
QPointF QgsMarkerSymbolLayerV2::mOffset
protected
QgsExpression* QgsMarkerSymbolLayerV2::mOffsetExpression
private

Definition at line 254 of file qgssymbollayerv2.h.

Referenced by markerOffset(), QgsMarkerSymbolLayerV2(), and startRender().

QgsMapUnitScale QgsMarkerSymbolLayerV2::mOffsetMapUnitScale
protected
QgsSymbolV2::OutputUnit QgsMarkerSymbolLayerV2::mOffsetUnit
protected
QgsSymbolV2::ScaleMethod QgsMarkerSymbolLayerV2::mScaleMethod
protected
double QgsMarkerSymbolLayerV2::mSize
protected
QgsMapUnitScale QgsMarkerSymbolLayerV2::mSizeMapUnitScale
protected
QgsSymbolV2::OutputUnit QgsMarkerSymbolLayerV2::mSizeUnit
protected
QgsExpression* QgsMarkerSymbolLayerV2::mVerticalAnchorExpression
private

Definition at line 256 of file qgssymbollayerv2.h.

Referenced by markerOffset(), QgsMarkerSymbolLayerV2(), and startRender().

VerticalAnchorPoint QgsMarkerSymbolLayerV2::mVerticalAnchorPoint
protected

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