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 | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
QgsVectorFieldSymbolLayer Class Reference

A symbol layer class for displaying displacement arrows based on point layer attributes. More...

#include <qgsvectorfieldsymbollayer.h>

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

Public Types

enum  VectorFieldType { Cartesian = 0, Polar, Height }
 
enum  AngleOrientation { ClockwiseFromNorth = 0, CounterclockwiseFromEast }
 
enum  AngleUnits { Degrees = 0, Radians }
 
- Public Types inherited from QgsMarkerSymbolLayerV2
enum  HorizontalAnchorPoint { Left, HCenter, Right }
 
enum  VerticalAnchorPoint { Top, VCenter, Bottom }
 

Public Member Functions

 QgsVectorFieldSymbolLayer ()
 
 ~QgsVectorFieldSymbolLayer ()
 
QString layerType () const
 
bool setSubSymbol (QgsSymbolV2 *symbol)
 
QgsSymbolV2subSymbol ()
 
void renderPoint (const QPointF &point, QgsSymbolV2RenderContext &context)
 
void startRender (QgsSymbolV2RenderContext &context)
 
void stopRender (QgsSymbolV2RenderContext &context)
 
QgsSymbolLayerV2clone () const
 
QgsStringMap properties () const
 
void toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
 
void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)
 
QSet< QString > usedAttributes () const
 
void setXAttribute (const QString &attribute)
 
QString xAttribute () const
 
void setYAttribute (const QString &attribute)
 
QString yAttribute () const
 
void setScale (double s)
 
double scale () const
 
void setVectorFieldType (VectorFieldType type)
 
VectorFieldType vectorFieldType () const
 
void setAngleOrientation (AngleOrientation orientation)
 
AngleOrientation angleOrientation () const
 
void setAngleUnits (AngleUnits units)
 
AngleUnits angleUnits () const
 
void setOutputUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit outputUnit () const
 
void setMapUnitScale (const QgsMapUnitScale &scale)
 
QgsMapUnitScale mapUnitScale () const
 
void setDistanceUnit (QgsSymbolV2::OutputUnit unit)
 
QgsSymbolV2::OutputUnit distanceUnit () const
 
void setDistanceMapUnitScale (const QgsMapUnitScale &scale)
 
const QgsMapUnitScaledistanceMapUnitScale () const
 
- Public Member Functions inherited from QgsMarkerSymbolLayerV2
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 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 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 ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
 
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 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
 

Static Public Member Functions

static QgsSymbolLayerV2create (const QgsStringMap &properties=QgsStringMap())
 
static QgsSymbolLayerV2createFromSld (QDomElement &element)
 

Private Member Functions

void convertPolarToCartesian (double length, double angle, double &x, double &y) const
 

Private Attributes

QString mXAttribute
 
QString mYAttribute
 
QgsSymbolV2::OutputUnit mDistanceUnit
 
QgsMapUnitScale mDistanceMapUnitScale
 
double mScale
 
VectorFieldType mVectorFieldType
 
AngleOrientation mAngleOrientation
 
AngleUnits mAngleUnits
 
QgsLineSymbolV2mLineSymbol
 
int mXIndex
 
int mYIndex
 

Additional Inherited Members

- Protected Member Functions inherited from QgsMarkerSymbolLayerV2
 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 inherited from QgsMarkerSymbolLayerV2
static QPointF _rotatedOffset (const QPointF &offset, double angle)
 
- Protected Attributes inherited from QgsMarkerSymbolLayerV2
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 Protected Attributes inherited from QgsSymbolLayerV2
static const bool selectionIsOpaque = true
 
static const bool selectFillBorder = false
 
static const bool selectFillStyle = false
 

Detailed Description

A symbol layer class for displaying displacement arrows based on point layer attributes.

Definition at line 24 of file qgsvectorfieldsymbollayer.h.

Member Enumeration Documentation

Enumerator
ClockwiseFromNorth 
CounterclockwiseFromEast 

Definition at line 34 of file qgsvectorfieldsymbollayer.h.

Enumerator
Degrees 
Radians 

Definition at line 40 of file qgsvectorfieldsymbollayer.h.

Enumerator
Cartesian 
Polar 
Height 

Definition at line 27 of file qgsvectorfieldsymbollayer.h.

Constructor & Destructor Documentation

QgsVectorFieldSymbolLayer::QgsVectorFieldSymbolLayer ( )

Definition at line 21 of file qgsvectorfieldsymbollayer.cpp.

References setSubSymbol().

Referenced by create().

QgsVectorFieldSymbolLayer::~QgsVectorFieldSymbolLayer ( )

Definition at line 27 of file qgsvectorfieldsymbollayer.cpp.

Member Function Documentation

AngleOrientation QgsVectorFieldSymbolLayer::angleOrientation ( ) const
inline

Definition at line 80 of file qgsvectorfieldsymbollayer.h.

AngleUnits QgsVectorFieldSymbolLayer::angleUnits ( ) const
inline

Definition at line 82 of file qgsvectorfieldsymbollayer.h.

QgsSymbolLayerV2 * QgsVectorFieldSymbolLayer::clone ( ) const
virtual
void QgsVectorFieldSymbolLayer::convertPolarToCartesian ( double  length,
double  angle,
double &  x,
double &  y 
) const
private
QgsSymbolLayerV2 * QgsVectorFieldSymbolLayer::create ( const QgsStringMap properties = QgsStringMap())
static
QgsSymbolLayerV2 * QgsVectorFieldSymbolLayer::createFromSld ( QDomElement &  element)
static

Definition at line 258 of file qgsvectorfieldsymbollayer.cpp.

const QgsMapUnitScale& QgsVectorFieldSymbolLayer::distanceMapUnitScale ( ) const
inline

Definition at line 94 of file qgsvectorfieldsymbollayer.h.

QgsSymbolV2::OutputUnit QgsVectorFieldSymbolLayer::distanceUnit ( ) const
inline

Definition at line 91 of file qgsvectorfieldsymbollayer.h.

void QgsVectorFieldSymbolLayer::drawPreviewIcon ( QgsSymbolV2RenderContext context,
QSize  size 
)
virtual
QString QgsVectorFieldSymbolLayer::layerType ( ) const
inlinevirtual

Implements QgsSymbolLayerV2.

Definition at line 52 of file qgsvectorfieldsymbollayer.h.

QgsMapUnitScale QgsVectorFieldSymbolLayer::mapUnitScale ( ) const
virtual
QgsSymbolV2::OutputUnit QgsVectorFieldSymbolLayer::outputUnit ( ) const
virtual
QgsStringMap QgsVectorFieldSymbolLayer::properties ( ) const
virtual
void QgsVectorFieldSymbolLayer::renderPoint ( const QPointF &  point,
QgsSymbolV2RenderContext context 
)
virtual
double QgsVectorFieldSymbolLayer::scale ( ) const
inline

Definition at line 76 of file qgsvectorfieldsymbollayer.h.

Referenced by setMapUnitScale().

void QgsVectorFieldSymbolLayer::setAngleOrientation ( AngleOrientation  orientation)
inline

Definition at line 79 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setAngleUnits ( AngleUnits  units)
inline

Definition at line 81 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setDistanceMapUnitScale ( const QgsMapUnitScale scale)
inline

Definition at line 93 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setDistanceUnit ( QgsSymbolV2::OutputUnit  unit)
inline

Definition at line 90 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setMapUnitScale ( const QgsMapUnitScale scale)
virtual
void QgsVectorFieldSymbolLayer::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual

Reimplemented from QgsMarkerSymbolLayerV2.

Definition at line 31 of file qgsvectorfieldsymbollayer.cpp.

References mDistanceUnit, and QgsMarkerSymbolLayerV2::setOutputUnit().

void QgsVectorFieldSymbolLayer::setScale ( double  s)
inline

Definition at line 75 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

bool QgsVectorFieldSymbolLayer::setSubSymbol ( QgsSymbolV2 symbol)
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 123 of file qgsvectorfieldsymbollayer.cpp.

References QgsSymbolV2::Line, mLineSymbol, and QgsSymbolV2::type().

Referenced by QgsVectorFieldSymbolLayer().

void QgsVectorFieldSymbolLayer::setVectorFieldType ( VectorFieldType  type)
inline

Definition at line 77 of file qgsvectorfieldsymbollayer.h.

References QgsSymbolLayerV2::type().

Referenced by create().

void QgsVectorFieldSymbolLayer::setXAttribute ( const QString &  attribute)
inline

Definition at line 71 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setYAttribute ( const QString &  attribute)
inline

Definition at line 73 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::startRender ( QgsSymbolV2RenderContext context)
virtual
void QgsVectorFieldSymbolLayer::stopRender ( QgsSymbolV2RenderContext context)
virtual
QgsSymbolV2* QgsVectorFieldSymbolLayer::subSymbol ( )
inlinevirtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 55 of file qgsvectorfieldsymbollayer.h.

void QgsVectorFieldSymbolLayer::toSld ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
virtual

Reimplemented from QgsMarkerSymbolLayerV2.

Definition at line 252 of file qgsvectorfieldsymbollayer.cpp.

References mLineSymbol, and QgsSymbolV2::toSld().

QSet< QString > QgsVectorFieldSymbolLayer::usedAttributes ( ) const
virtual

Reimplemented from QgsSymbolLayerV2.

Definition at line 272 of file qgsvectorfieldsymbollayer.cpp.

References mXAttribute, and mYAttribute.

VectorFieldType QgsVectorFieldSymbolLayer::vectorFieldType ( ) const
inline

Definition at line 78 of file qgsvectorfieldsymbollayer.h.

QString QgsVectorFieldSymbolLayer::xAttribute ( ) const
inline

Definition at line 72 of file qgsvectorfieldsymbollayer.h.

QString QgsVectorFieldSymbolLayer::yAttribute ( ) const
inline

Definition at line 74 of file qgsvectorfieldsymbollayer.h.

Member Data Documentation

AngleOrientation QgsVectorFieldSymbolLayer::mAngleOrientation
private

Definition at line 103 of file qgsvectorfieldsymbollayer.h.

Referenced by convertPolarToCartesian(), and properties().

AngleUnits QgsVectorFieldSymbolLayer::mAngleUnits
private

Definition at line 104 of file qgsvectorfieldsymbollayer.h.

Referenced by convertPolarToCartesian(), and properties().

QgsMapUnitScale QgsVectorFieldSymbolLayer::mDistanceMapUnitScale
private
QgsSymbolV2::OutputUnit QgsVectorFieldSymbolLayer::mDistanceUnit
private

Definition at line 99 of file qgsvectorfieldsymbollayer.h.

Referenced by outputUnit(), properties(), renderPoint(), and setOutputUnit().

QgsLineSymbolV2* QgsVectorFieldSymbolLayer::mLineSymbol
private
double QgsVectorFieldSymbolLayer::mScale
private

Definition at line 101 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), and renderPoint().

VectorFieldType QgsVectorFieldSymbolLayer::mVectorFieldType
private

Definition at line 102 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), and renderPoint().

QString QgsVectorFieldSymbolLayer::mXAttribute
private

Definition at line 97 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), startRender(), and usedAttributes().

int QgsVectorFieldSymbolLayer::mXIndex
private

Definition at line 109 of file qgsvectorfieldsymbollayer.h.

Referenced by renderPoint(), and startRender().

QString QgsVectorFieldSymbolLayer::mYAttribute
private

Definition at line 98 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), startRender(), and usedAttributes().

int QgsVectorFieldSymbolLayer::mYIndex
private

Definition at line 110 of file qgsvectorfieldsymbollayer.h.

Referenced by renderPoint(), and startRender().


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