QGIS API Documentation
2.4.0-Chugiak
|
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 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) |
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 | setMapUnitScale (const QgsMapUnitScale &scale) |
QgsMapUnitScale | mapUnitScale () const |
void | setDistanceUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | distanceUnit () const |
void | setDistanceMapUnitScale (const QgsMapUnitScale &scale) |
const QgsMapUnitScale & | distanceMapUnitScale () 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 QgsMapUnitScale & | offsetMapUnitScale () const |
void | setSizeUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | sizeUnit () const |
void | setSizeMapUnitScale (const QgsMapUnitScale &scale) |
const QgsMapUnitScale & | sizeMapUnitScale () 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 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 () |
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 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 |
QgsMapUnitScale | mDistanceMapUnitScale |
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 (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 QgsExpression * | expression (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 |
A symbol layer class for displaying displacement arrows based on point layer attributes.
Definition at line 24 of file qgsvectorfieldsymbollayer.h.
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.
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 222 of file qgsvectorfieldsymbollayer.cpp.
References QgsLineSymbolV2::clone(), create(), mLineSymbol, properties(), and QgsSymbolLayerV2::setSubSymbol().
|
private |
Definition at line 286 of file qgsvectorfieldsymbollayer.cpp.
References QgsMarkerSymbolLayerV2::angle(), CounterclockwiseFromEast, Degrees, M_PI, mAngleOrientation, and mAngleUnits.
Referenced by renderPoint().
|
static |
Definition at line 61 of file qgsvectorfieldsymbollayer.cpp.
References QgsSymbolLayerV2Utils::decodeMapUnitScale(), QgsSymbolLayerV2Utils::decodeOutputUnit(), QgsSymbolLayerV2Utils::decodePoint(), QgsVectorFieldSymbolLayer(), setAngleOrientation(), setAngleUnits(), setDistanceMapUnitScale(), setDistanceUnit(), QgsMarkerSymbolLayerV2::setOffset(), QgsMarkerSymbolLayerV2::setOffsetMapUnitScale(), QgsMarkerSymbolLayerV2::setOffsetUnit(), setScale(), QgsMarkerSymbolLayerV2::setSize(), QgsMarkerSymbolLayerV2::setSizeMapUnitScale(), QgsMarkerSymbolLayerV2::setSizeUnit(), setVectorFieldType(), setXAttribute(), and setYAttribute().
Referenced by clone(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 258 of file qgsvectorfieldsymbollayer.cpp.
|
inline |
Definition at line 94 of file qgsvectorfieldsymbollayer.h.
|
inline |
Definition at line 91 of file qgsvectorfieldsymbollayer.h.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 264 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 52 of file qgsvectorfieldsymbollayer.cpp.
References QgsMarkerSymbolLayerV2::mapUnitScale(), and mDistanceMapUnitScale.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 37 of file qgsvectorfieldsymbollayer.cpp.
References mDistanceUnit, QgsSymbolV2::Mixed, and QgsMarkerSymbolLayerV2::outputUnit().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 232 of file qgsvectorfieldsymbollayer.cpp.
References QgsSymbolLayerV2Utils::encodeMapUnitScale(), QgsSymbolLayerV2Utils::encodeOutputUnit(), QgsSymbolLayerV2Utils::encodePoint(), mAngleOrientation, mAngleUnits, mDistanceMapUnitScale, mDistanceUnit, QgsMarkerSymbolLayerV2::mOffset, QgsMarkerSymbolLayerV2::mOffsetMapUnitScale, QgsMarkerSymbolLayerV2::mOffsetUnit, mScale, QgsMarkerSymbolLayerV2::mSize, QgsMarkerSymbolLayerV2::mSizeMapUnitScale, QgsMarkerSymbolLayerV2::mSizeUnit, mVectorFieldType, mXAttribute, and mYAttribute.
Referenced by clone().
|
virtual |
Implements QgsMarkerSymbolLayerV2.
Definition at line 133 of file qgsvectorfieldsymbollayer.cpp.
References QgsFeature::attribute(), Cartesian, convertPolarToCartesian(), QgsSymbolV2RenderContext::feature(), Height, QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mDistanceMapUnitScale, mDistanceUnit, mLineSymbol, mScale, mVectorFieldType, mXIndex, mYIndex, Polar, QgsSymbolV2RenderContext::renderContext(), and QgsLineSymbolV2::renderPolyline().
|
inline |
Definition at line 76 of file qgsvectorfieldsymbollayer.h.
Referenced by setMapUnitScale().
|
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 93 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
inline |
Definition at line 90 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 46 of file qgsvectorfieldsymbollayer.cpp.
References mDistanceMapUnitScale, scale(), and QgsMarkerSymbolLayerV2::setMapUnitScale().
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 31 of file qgsvectorfieldsymbollayer.cpp.
References mDistanceUnit, and QgsMarkerSymbolLayerV2::setOutputUnit().
|
inline |
Definition at line 75 of file qgsvectorfieldsymbollayer.h.
Referenced by create().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 123 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 |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 194 of file qgsvectorfieldsymbollayer.cpp.
References QgsFields::fieldNameIndex(), QgsSymbolV2RenderContext::fields(), mLineSymbol, mXAttribute, mXIndex, mYAttribute, mYIndex, QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2::startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 214 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 252 of file qgsvectorfieldsymbollayer.cpp.
References mLineSymbol, and QgsSymbolV2::toSld().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 272 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 103 of file qgsvectorfieldsymbollayer.h.
Referenced by convertPolarToCartesian(), and properties().
|
private |
Definition at line 104 of file qgsvectorfieldsymbollayer.h.
Referenced by convertPolarToCartesian(), and properties().
|
private |
Definition at line 100 of file qgsvectorfieldsymbollayer.h.
Referenced by mapUnitScale(), properties(), renderPoint(), and setMapUnitScale().
|
private |
Definition at line 99 of file qgsvectorfieldsymbollayer.h.
Referenced by outputUnit(), properties(), renderPoint(), and setOutputUnit().
|
private |
Definition at line 106 of file qgsvectorfieldsymbollayer.h.
Referenced by clone(), drawPreviewIcon(), renderPoint(), setSubSymbol(), startRender(), stopRender(), and toSld().
|
private |
Definition at line 101 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), and renderPoint().
|
private |
Definition at line 102 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), and renderPoint().
|
private |
Definition at line 97 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), startRender(), and usedAttributes().
|
private |
Definition at line 109 of file qgsvectorfieldsymbollayer.h.
Referenced by renderPoint(), and startRender().
|
private |
Definition at line 98 of file qgsvectorfieldsymbollayer.h.
Referenced by properties(), startRender(), and usedAttributes().
|
private |
Definition at line 110 of file qgsvectorfieldsymbollayer.h.
Referenced by renderPoint(), and startRender().