Quantum GIS API Documentation  1.8
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
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]

List of all members.

Public Types

enum  VectorFieldType { Cartesian = 0, Polar, Height }
enum  AngleOrientation { ClockwiseFromNorth = 0, CounterclockwiseFromEast }
enum  AngleUnits { Degrees = 0, Radians }

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

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
double mScale
VectorFieldType mVectorFieldType
AngleOrientation mAngleOrientation
AngleUnits mAngleUnits
QgsLineSymbolV2mLineSymbol
int mXIndex
int mYIndex

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

Definition at line 21 of file qgsvectorfieldsymbollayer.cpp.

References setSubSymbol().

Referenced by create().

Definition at line 27 of file qgsvectorfieldsymbollayer.cpp.


Member Function Documentation

Definition at line 80 of file qgsvectorfieldsymbollayer.h.

Definition at line 82 of file qgsvectorfieldsymbollayer.h.

void QgsVectorFieldSymbolLayer::convertPolarToCartesian ( double  length,
double  angle,
double &  x,
double &  y 
) const [private]
QgsSymbolLayerV2 * QgsVectorFieldSymbolLayer::createFromSld ( QDomElement &  element) [static]

Definition at line 186 of file qgsvectorfieldsymbollayer.cpp.

void QgsVectorFieldSymbolLayer::drawPreviewIcon ( QgsSymbolV2RenderContext context,
QSize  size 
) [virtual]
QString QgsVectorFieldSymbolLayer::layerType ( ) const [inline, virtual]

Implements QgsSymbolLayerV2.

Definition at line 52 of file qgsvectorfieldsymbollayer.h.

Implements QgsSymbolLayerV2.

Definition at line 168 of file qgsvectorfieldsymbollayer.cpp.

References mAngleOrientation, mAngleUnits, mScale, mVectorFieldType, mXAttribute, and mYAttribute.

Referenced by clone().

void QgsVectorFieldSymbolLayer::renderPoint ( const QPointF &  point,
QgsSymbolV2RenderContext context 
) [virtual]
double QgsVectorFieldSymbolLayer::scale ( void  ) const [inline]

Definition at line 76 of file qgsvectorfieldsymbollayer.h.

Definition at line 79 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

Definition at line 81 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setScale ( double  s) [inline]

Definition at line 75 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

Reimplemented from QgsSymbolLayerV2.

Definition at line 61 of file qgsvectorfieldsymbollayer.cpp.

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

Referenced by QgsVectorFieldSymbolLayer().

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().

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 180 of file qgsvectorfieldsymbollayer.cpp.

References mLineSymbol, and QgsSymbolV2::toSld().

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

Reimplemented from QgsSymbolLayerV2.

Definition at line 200 of file qgsvectorfieldsymbollayer.cpp.

References mXAttribute, and mYAttribute.

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

Definition at line 89 of file qgsvectorfieldsymbollayer.h.

Referenced by convertPolarToCartesian(), and properties().

Definition at line 90 of file qgsvectorfieldsymbollayer.h.

Referenced by convertPolarToCartesian(), and properties().

Definition at line 87 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), and renderPoint().

Definition at line 88 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), and renderPoint().

Definition at line 85 of file qgsvectorfieldsymbollayer.h.

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

Definition at line 95 of file qgsvectorfieldsymbollayer.h.

Referenced by renderPoint(), and startRender().

Definition at line 86 of file qgsvectorfieldsymbollayer.h.

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

Definition at line 96 of file qgsvectorfieldsymbollayer.h.

Referenced by renderPoint(), and startRender().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines