QGIS API Documentation
2.0.1-Dufour
|
A symbol layer class for displaying displacement arrows based on point layer attributes. More...
#include <qgsvectorfieldsymbollayer.h>
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) |
QgsSymbolV2 * | subSymbol () |
void | renderPoint (const QPointF &point, QgsSymbolV2RenderContext &context) |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
QgsSymbolLayerV2 * | clone () 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 QgsExpression * | dataDefinedProperty (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 QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
static QgsSymbolLayerV2 * | createFromSld (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 |
QgsLineSymbolV2 * | mLineSymbol |
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 |
A symbol layer class for displaying displacement arrows based on point layer attributes.
Definition at line 24 of file qgsvectorfieldsymbollayer.h.
Definition at line 34 of file qgsvectorfieldsymbollayer.h.
Definition at line 40 of file qgsvectorfieldsymbollayer.h.
Definition at line 27 of file qgsvectorfieldsymbollayer.h.
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.
|
inline |
Definition at line 80 of file qgsvectorfieldsymbollayer.h.
|
inline |
Definition at line 82 of file qgsvectorfieldsymbollayer.h.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 174 of file qgsvectorfieldsymbollayer.cpp.
References QgsLineSymbolV2::clone(), create(), mLineSymbol, properties(), and QgsSymbolLayerV2::setSubSymbol().
|
private |
Definition at line 231 of file qgsvectorfieldsymbollayer.cpp.
References QgsMarkerSymbolLayerV2::angle(), CounterclockwiseFromEast, Degrees, M_PI, mAngleOrientation, and mAngleUnits.
Referenced by renderPoint().
|
static |
Definition at line 41 of file qgsvectorfieldsymbollayer.cpp.
References QgsSymbolLayerV2Utils::decodeOutputUnit(), QgsVectorFieldSymbolLayer(), setAngleOrientation(), setAngleUnits(), setDistanceUnit(), setScale(), setVectorFieldType(), setXAttribute(), and setYAttribute().
Referenced by clone(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 203 of file qgsvectorfieldsymbollayer.cpp.
|
inline |
Definition at line 88 of file qgsvectorfieldsymbollayer.h.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 209 of file qgsvectorfieldsymbollayer.cpp.
References QgsSymbolV2::drawPreviewIcon(), mLineSymbol, QgsRenderContext::painter(), QgsSymbolV2RenderContext::renderContext(), and QgsMarkerSymbolLayerV2::size().
|
inlinevirtual |
Implements QgsSymbolLayerV2.
Definition at line 52 of file qgsvectorfieldsymbollayer.h.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 36 of file qgsvectorfieldsymbollayer.cpp.
References mDistanceUnit.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 184 of file qgsvectorfieldsymbollayer.cpp.
References QgsSymbolLayerV2Utils::encodeOutputUnit(), mAngleOrientation, mAngleUnits, mDistanceUnit, mScale, mVectorFieldType, mXAttribute, and mYAttribute.
Referenced by clone().
|
virtual |
Implements QgsMarkerSymbolLayerV2.
Definition at line 85 of file qgsvectorfieldsymbollayer.cpp.
References QgsFeature::attribute(), Cartesian, convertPolarToCartesian(), QgsSymbolV2RenderContext::feature(), Height, QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mDistanceUnit, mLineSymbol, mScale, mVectorFieldType, mXIndex, mYIndex, Polar, QgsSymbolV2RenderContext::renderContext(), and QgsLineSymbolV2::renderPolyline().
|
inline |
Definition at line 76 of file qgsvectorfieldsymbollayer.h.
|
inline |
Definition at line 79 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
inline |
Definition at line 81 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
inline |
Definition at line 87 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 31 of file qgsvectorfieldsymbollayer.cpp.
References mDistanceUnit.
|
inline |
Definition at line 75 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 75 of file qgsvectorfieldsymbollayer.cpp.
References QgsSymbolV2::Line, mLineSymbol, and QgsSymbolV2::type().
Referenced by QgsVectorFieldSymbolLayer().
|
inline |
Definition at line 77 of file qgsvectorfieldsymbollayer.h.
References QgsSymbolLayerV2::type().
Referenced by create().
|
inline |
Definition at line 71 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
inline |
Definition at line 73 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 146 of file qgsvectorfieldsymbollayer.cpp.
References QgsVectorLayer::fieldNameIndex(), QgsSymbolV2RenderContext::layer(), mLineSymbol, mXAttribute, mXIndex, mYAttribute, mYIndex, QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2::startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 166 of file qgsvectorfieldsymbollayer.cpp.
References mLineSymbol, QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2::stopRender().
|
inlinevirtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 55 of file qgsvectorfieldsymbollayer.h.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 197 of file qgsvectorfieldsymbollayer.cpp.
References mLineSymbol, and QgsSymbolV2::toSld().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 217 of file qgsvectorfieldsymbollayer.cpp.
References mXAttribute, and mYAttribute.
|
inline |
Definition at line 78 of file qgsvectorfieldsymbollayer.h.
|
inline |
Definition at line 72 of file qgsvectorfieldsymbollayer.h.
|
inline |
Definition at line 74 of file qgsvectorfieldsymbollayer.h.
|
private |
Definition at line 96 of file qgsvectorfieldsymbollayer.h.
Referenced by convertPolarToCartesian(), and properties().
|
private |
Definition at line 97 of file qgsvectorfieldsymbollayer.h.
Referenced by convertPolarToCartesian(), and properties().
|
private |
Definition at line 93 of file qgsvectorfieldsymbollayer.h.
Referenced by outputUnit(), properties(), renderPoint(), and setOutputUnit().
|
private |
Definition at line 99 of file qgsvectorfieldsymbollayer.h.
Referenced by clone(), drawPreviewIcon(), renderPoint(), setSubSymbol(), startRender(), stopRender(), and toSld().
|
private |
Definition at line 94 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), and renderPoint().
|
private |
Definition at line 95 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), and renderPoint().
|
private |
Definition at line 91 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), startRender(), and usedAttributes().
|
private |
Definition at line 102 of file qgsvectorfieldsymbollayer.h.
Referenced by renderPoint(), and startRender().
|
private |
Definition at line 92 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), startRender(), and usedAttributes().
|
private |
Definition at line 103 of file qgsvectorfieldsymbollayer.h.
Referenced by renderPoint(), and startRender().