QGIS API Documentation  2.0.1-Dufour
 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 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 setDistanceUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit distanceUnit () 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 setSizeUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit sizeUnit () const
- Public Member Functions inherited from QgsSymbolLayerV2
virtual void setColor (const QColor &color)
virtual QColor color () const
virtual ~QgsSymbolLayerV2 ()
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
QgsSymbolV2::SymbolType type () const
void setLocked (bool locked)
bool isLocked () const
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 ()

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
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 (QgsSymbolV2RenderContext &context, double &offsetX, double &offsetY)
- 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
QPointF mOffset
QgsSymbolV2::OutputUnit mOffsetUnit
QgsSymbolV2::ScaleMethod mScaleMethod
- 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 203 of file qgsvectorfieldsymbollayer.cpp.

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

Definition at line 88 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.

QgsSymbolV2::OutputUnit QgsVectorFieldSymbolLayer::outputUnit ( ) const
virtual

Reimplemented from QgsMarkerSymbolLayerV2.

Definition at line 36 of file qgsvectorfieldsymbollayer.cpp.

References mDistanceUnit.

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.

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::setDistanceUnit ( QgsSymbolV2::OutputUnit  unit)
inline

Definition at line 87 of file qgsvectorfieldsymbollayer.h.

Referenced by create().

void QgsVectorFieldSymbolLayer::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual

Reimplemented from QgsMarkerSymbolLayerV2.

Definition at line 31 of file qgsvectorfieldsymbollayer.cpp.

References mDistanceUnit.

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

References mLineSymbol, and QgsSymbolV2::toSld().

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

Reimplemented from QgsSymbolLayerV2.

Definition at line 217 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 96 of file qgsvectorfieldsymbollayer.h.

Referenced by convertPolarToCartesian(), and properties().

AngleUnits QgsVectorFieldSymbolLayer::mAngleUnits
private

Definition at line 97 of file qgsvectorfieldsymbollayer.h.

Referenced by convertPolarToCartesian(), and properties().

QgsSymbolV2::OutputUnit QgsVectorFieldSymbolLayer::mDistanceUnit
private

Definition at line 93 of file qgsvectorfieldsymbollayer.h.

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

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

Definition at line 94 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), and renderPoint().

VectorFieldType QgsVectorFieldSymbolLayer::mVectorFieldType
private

Definition at line 95 of file qgsvectorfieldsymbollayer.h.

Referenced by properties(), and renderPoint().

QString QgsVectorFieldSymbolLayer::mXAttribute
private

Definition at line 91 of file qgsvectorfieldsymbollayer.h.

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

int QgsVectorFieldSymbolLayer::mXIndex
private

Definition at line 102 of file qgsvectorfieldsymbollayer.h.

Referenced by renderPoint(), and startRender().

QString QgsVectorFieldSymbolLayer::mYAttribute
private

Definition at line 92 of file qgsvectorfieldsymbollayer.h.

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

int QgsVectorFieldSymbolLayer::mYIndex
private

Definition at line 103 of file qgsvectorfieldsymbollayer.h.

Referenced by renderPoint(), and startRender().


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