QGIS API Documentation
2.0.1-Dufour
|
#include <qgslinesymbollayerv2.h>
Public Types | |
enum | Placement { Interval, Vertex, LastVertex, FirstVertex, CentralPoint } |
Public Member Functions | |
QgsMarkerLineSymbolLayerV2 (bool rotateMarker=DEFAULT_MARKERLINE_ROTATE, double interval=DEFAULT_MARKERLINE_INTERVAL) | |
~QgsMarkerLineSymbolLayerV2 () | |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
void | renderPolyline (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
void | setColor (const QColor &color) |
QgsSymbolV2 * | subSymbol () |
bool | setSubSymbol (QgsSymbolV2 *symbol) |
virtual void | setWidth (double width) |
virtual double | width () const |
bool | rotateMarker () const |
void | setRotateMarker (bool rotate) |
double | interval () const |
void | setInterval (double interval) |
double | offset () const |
void | setOffset (double offset) |
Placement | placement () const |
void | setPlacement (Placement p) |
QgsSymbolV2::OutputUnit | intervalUnit () const |
void | setIntervalUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | offsetUnit () const |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
Public Member Functions inherited from QgsLineSymbolLayerV2 | |
virtual void | renderPolygonOutline (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
void | setWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | widthUnit () const |
void | drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size) |
Public Member Functions inherited from QgsSymbolLayerV2 | |
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 QSet< QString > | usedAttributes () 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) |
Protected Member Functions | |
void | renderPolylineInterval (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
void | renderPolylineVertex (const QPolygonF &points, QgsSymbolV2RenderContext &context, Placement placement=Vertex) |
void | renderPolylineCentral (const QPolygonF &points, QgsSymbolV2RenderContext &context) |
double | markerAngle (const QPolygonF &points, bool isRing, int vertex) |
Protected Member Functions inherited from QgsLineSymbolLayerV2 | |
QgsLineSymbolLayerV2 (bool locked=false) | |
Protected Member Functions inherited from QgsSymbolLayerV2 | |
QgsSymbolLayerV2 (QgsSymbolV2::SymbolType type, bool locked=false) | |
virtual void | prepareExpressions (const QgsVectorLayer *vl) |
virtual QgsExpression * | expression (const QString &property) |
void | saveDataDefinedProperties (QgsStringMap &stringMap) const |
Saves data defined properties to string map. | |
void | copyDataDefinedProperties (QgsSymbolLayerV2 *destLayer) const |
Copies data defined properties of this layer to another symbol layer. |
Protected Attributes | |
bool | mRotateMarker |
double | mInterval |
QgsSymbolV2::OutputUnit | mIntervalUnit |
QgsMarkerSymbolV2 * | mMarker |
double | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
Placement | mPlacement |
Protected Attributes inherited from QgsLineSymbolLayerV2 | |
double | mWidth |
QgsSymbolV2::OutputUnit | mWidthUnit |
Protected Attributes inherited from QgsSymbolLayerV2 | |
QgsSymbolV2::SymbolType | mType |
bool | mLocked |
QColor | mColor |
int | mRenderingPass |
QMap< QString, QgsExpression * > | mDataDefinedProperties |
Additional Inherited Members | |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 118 of file qgslinesymbollayerv2.h.
Definition at line 126 of file qgslinesymbollayerv2.h.
QgsMarkerLineSymbolLayerV2::QgsMarkerLineSymbolLayerV2 | ( | bool | rotateMarker = DEFAULT_MARKERLINE_ROTATE , |
double | interval = DEFAULT_MARKERLINE_INTERVAL |
||
) |
Definition at line 442 of file qgslinesymbollayerv2.cpp.
References Interval, interval(), mInterval, mIntervalUnit, QgsSymbolV2::MM, mMarker, mOffset, mOffsetUnit, mPlacement, mRotateMarker, rotateMarker(), and setSubSymbol().
Referenced by clone(), create(), and createFromSld().
QgsMarkerLineSymbolLayerV2::~QgsMarkerLineSymbolLayerV2 | ( | ) |
Definition at line 455 of file qgslinesymbollayerv2.cpp.
References mMarker.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 904 of file qgslinesymbollayerv2.cpp.
References QgsMarkerSymbolV2::clone(), QgsSymbolLayerV2::copyDataDefinedProperties(), mInterval, mIntervalUnit, mMarker, mOffset, mOffsetUnit, mPlacement, mRotateMarker, QgsMarkerLineSymbolLayerV2(), setIntervalUnit(), setOffset(), setOffsetUnit(), setPlacement(), and setSubSymbol().
|
static |
Definition at line 460 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::decodeOutputUnit(), DEFAULT_MARKERLINE_INTERVAL, DEFAULT_MARKERLINE_ROTATE, FirstVertex, Interval, interval(), LastVertex, QgsMarkerLineSymbolLayerV2(), QgsSymbolLayerV2::setDataDefinedProperty(), setIntervalUnit(), setOffset(), setOffsetUnit(), setPlacement(), and Vertex.
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 991 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::createMarkerLayerFromSld(), FirstVertex, QgsSymbolLayerV2Utils::getVendorOptionList(), Interval, interval(), LastVertex, offset(), placement(), QgsDebugMsg, QgsMarkerLineSymbolLayerV2(), rotateMarker(), setInterval(), setOffset(), setPlacement(), setSubSymbol(), and Vertex.
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
inline |
Definition at line 169 of file qgslinesymbollayerv2.h.
Referenced by create(), createFromSld(), QgsMarkerLineSymbolLayerV2(), and renderPolylineInterval().
|
inline |
Definition at line 178 of file qgslinesymbollayerv2.h.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 515 of file qgslinesymbollayerv2.cpp.
|
protected |
Definition at line 738 of file qgslinesymbollayerv2.cpp.
References _averageAngle(), MathUtils::angle(), and MyLine::angle().
Referenced by renderPolylineVertex().
|
inline |
Definition at line 172 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and renderPolyline().
|
inline |
Definition at line 181 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1080 of file qgslinesymbollayerv2.cpp.
References mIntervalUnit, QgsSymbolV2::Mixed, and mOffsetUnit.
|
inline |
Definition at line 175 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and renderPolyline().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 862 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::encodeOutputUnit(), FirstVertex, LastVertex, mInterval, mIntervalUnit, mOffset, mOffsetUnit, mPlacement, mRotateMarker, QgsSymbolLayerV2::saveDataDefinedProperties(), and Vertex.
|
virtual |
Implements QgsLineSymbolLayerV2.
Definition at line 549 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), FirstVertex, Interval, LastVertex, QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mOffset, mOffsetUnit, mPlacement, offset(), offsetLine(), placement(), QgsSymbolV2RenderContext::renderContext(), renderPolylineCentral(), renderPolylineInterval(), renderPolylineVertex(), and Vertex.
|
protected |
Definition at line 813 of file qgslinesymbollayerv2.cpp.
References QgsMarkerSymbolV2::angle(), MyLine::angle(), QgsSymbolV2RenderContext::feature(), M_PI, mMarker, mRotateMarker, QgsSymbolV2RenderContext::renderContext(), QgsMarkerSymbolV2::renderPoint(), QgsSymbolV2RenderContext::selected(), and QgsMarkerSymbolV2::setAngle().
Referenced by renderPolyline().
|
protected |
Definition at line 606 of file qgslinesymbollayerv2.cpp.
References QgsMarkerSymbolV2::angle(), MyLine::angle(), MyLine::diffForInterval(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), interval(), MyLine::length(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), M_PI, mInterval, mIntervalUnit, mMarker, mRotateMarker, QgsSymbolV2RenderContext::renderContext(), QgsMarkerSymbolV2::renderPoint(), QgsSymbolV2RenderContext::selected(), and QgsMarkerSymbolV2::setAngle().
Referenced by renderPolyline().
|
protected |
Definition at line 689 of file qgslinesymbollayerv2.cpp.
References MathUtils::angle(), QgsMarkerSymbolV2::angle(), QgsSymbolV2RenderContext::feature(), FirstVertex, LastVertex, M_PI, markerAngle(), mMarker, mRotateMarker, QgsSymbolV2RenderContext::renderContext(), QgsMarkerSymbolV2::renderPoint(), QgsSymbolV2RenderContext::selected(), QgsMarkerSymbolV2::setAngle(), and Vertex.
Referenced by renderPolyline().
|
inline |
Definition at line 166 of file qgslinesymbollayerv2.h.
Referenced by createFromSld(), and QgsMarkerLineSymbolLayerV2().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 520 of file qgslinesymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), QgsSymbolLayerV2::mColor, mMarker, and QgsSymbolV2::setColor().
|
inline |
Definition at line 170 of file qgslinesymbollayerv2.h.
Referenced by createFromSld().
|
inline |
Definition at line 179 of file qgslinesymbollayerv2.h.
|
inline |
Definition at line 173 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 182 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1074 of file qgslinesymbollayerv2.cpp.
References mIntervalUnit, and mOffsetUnit.
|
inline |
Definition at line 176 of file qgslinesymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 167 of file qgslinesymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 890 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2::color(), QgsSymbolV2::Marker, QgsSymbolLayerV2::mColor, mMarker, and QgsSymbolV2::type().
Referenced by clone(), createFromSld(), and QgsMarkerLineSymbolLayerV2().
|
virtual |
Reimplemented from QgsLineSymbolLayerV2.
Definition at line 1064 of file qgslinesymbollayerv2.cpp.
References mMarker, and QgsMarkerSymbolV2::setSize().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 526 of file qgslinesymbollayerv2.cpp.
References QgsSymbolV2RenderContext::alpha(), QgsSymbolV2::DataDefinedRotation, QgsSymbolV2::DataDefinedSizeScale, QgsSymbolV2RenderContext::layer(), mMarker, mRotateMarker, QgsSymbolLayerV2::prepareExpressions(), QgsSymbolV2RenderContext::renderContext(), QgsSymbolV2RenderContext::renderHints(), QgsSymbolV2::setAlpha(), QgsSymbolV2::setRenderHints(), and QgsSymbolV2::startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 544 of file qgslinesymbollayerv2.cpp.
References mMarker, QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2::stopRender().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 885 of file qgslinesymbollayerv2.cpp.
References mMarker.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 916 of file qgslinesymbollayerv2.cpp.
References CentralPoint, QgsSymbolLayerV2Utils::createFunctionElement(), QgsSymbolLayerV2Utils::createGeometryElement(), QgsSymbolLayerV2Utils::createVendorOptionElement(), FirstVertex, LastVertex, QgsSymbolLayerV2::layerType(), mInterval, mMarker, mOffset, mPlacement, mRotateMarker, qgsDoubleNear(), QgsSymbolV2::symbolLayer(), QgsSymbolV2::symbolLayerCount(), Vertex, and QgsMarkerSymbolLayerV2::writeSldMarker().
|
virtual |
Reimplemented from QgsLineSymbolLayerV2.
Definition at line 1069 of file qgslinesymbollayerv2.cpp.
References mMarker, and QgsMarkerSymbolV2::size().
|
protected |
Definition at line 195 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolylineInterval(), and toSld().
|
protected |
Definition at line 196 of file qgslinesymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolylineInterval(), and setOutputUnit().
|
protected |
Definition at line 197 of file qgslinesymbollayerv2.h.
Referenced by clone(), QgsMarkerLineSymbolLayerV2(), renderPolylineCentral(), renderPolylineInterval(), renderPolylineVertex(), setColor(), setSubSymbol(), setWidth(), startRender(), stopRender(), subSymbol(), toSld(), width(), and ~QgsMarkerLineSymbolLayerV2().
|
protected |
Definition at line 198 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolyline(), and toSld().
|
protected |
Definition at line 199 of file qgslinesymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolyline(), and setOutputUnit().
|
protected |
Definition at line 200 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolyline(), and toSld().
|
protected |
Definition at line 194 of file qgslinesymbollayerv2.h.
Referenced by clone(), properties(), QgsMarkerLineSymbolLayerV2(), renderPolylineCentral(), renderPolylineInterval(), renderPolylineVertex(), startRender(), and toSld().