QGIS API Documentation
2.2.0-Valmiera
|
#include <qgsmarkersymbollayerv2.h>
Public Member Functions | |
QgsSvgMarkerSymbolLayerV2 (QString name=DEFAULT_SVGMARKER_NAME, double size=DEFAULT_SVGMARKER_SIZE, double angle=DEFAULT_SVGMARKER_ANGLE) | |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
void | renderPoint (const QPointF &point, QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
void | writeSldMarker (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
QString | path () const |
void | setPath (QString path) |
QColor | fillColor () const |
Get fill color. | |
void | setFillColor (const QColor &c) |
Set fill color. | |
QColor | outlineColor () const |
Get outline color. | |
void | setOutlineColor (const QColor &c) |
Set outline color. | |
double | outlineWidth () const |
void | setOutlineWidth (double w) |
void | setOutlineWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outlineWidthUnit () const |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
bool | writeDxf (QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, const QgsSymbolV2RenderContext *context, const QgsFeature *f, const QPointF &shift=QPointF(0.0, 0.0)) const |
Public Member Functions inherited from QgsMarkerSymbolLayerV2 | |
void | drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size) |
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 | toSld (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 |
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 | ~QgsSymbolLayerV2 () |
virtual QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
virtual QgsSymbolV2 * | subSymbol () |
virtual bool | setSubSymbol (QgsSymbolV2 *symbol) |
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. | |
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 () |
bool | hasDataDefinedProperties () 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) |
Protected Attributes | |
QString | mPath |
QColor | mFillColor |
QColor | mOutlineColor |
double | mOutlineWidth |
QgsSymbolV2::OutputUnit | mOutlineWidthUnit |
double | mOrigSize |
Protected Attributes inherited from QgsMarkerSymbolLayerV2 | |
double | mAngle |
double | mSize |
QgsSymbolV2::OutputUnit | mSizeUnit |
QPointF | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
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 |
Additional Inherited Members | |
Public Types inherited from QgsMarkerSymbolLayerV2 | |
enum | HorizontalAnchorPoint { Left, HCenter, Right } |
enum | VerticalAnchorPoint { Top, VCenter, Bottom } |
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, QgsSymbolV2::OutputUnit widthUnit, QgsSymbolV2::OutputUnit heightUnit, double &offsetX, double &offsetY) const |
Static Protected Member Functions inherited from QgsMarkerSymbolLayerV2 | |
static QPointF | _rotatedOffset (const QPointF &offset, double angle) |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 138 of file qgsmarkersymbollayerv2.h.
QgsSvgMarkerSymbolLayerV2::QgsSvgMarkerSymbolLayerV2 | ( | QString | name = DEFAULT_SVGMARKER_NAME , |
double | size = DEFAULT_SVGMARKER_SIZE , |
||
double | angle = DEFAULT_SVGMARKER_ANGLE |
||
) |
Definition at line 920 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::angle(), QgsMarkerSymbolLayerV2::mAngle, mFillColor, QgsSymbolV2::MM, QgsMarkerSymbolLayerV2::mOffset, mOutlineColor, mOutlineWidth, mOutlineWidthUnit, mPath, QgsMarkerSymbolLayerV2::mSize, QgsMarkerSymbolLayerV2::size(), and QgsSymbolLayerV2Utils::symbolNameToPath().
Referenced by clone(), create(), and createFromSld().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1239 of file qgsmarkersymbollayerv2.cpp.
References QgsSymbolLayerV2::copyDataDefinedProperties(), QgsMarkerSymbolLayerV2::mAngle, mFillColor, QgsMarkerSymbolLayerV2::mHorizontalAnchorPoint, QgsMarkerSymbolLayerV2::mOffset, QgsMarkerSymbolLayerV2::mOffsetUnit, mOutlineColor, mOutlineWidth, mOutlineWidthUnit, mPath, QgsMarkerSymbolLayerV2::mSize, QgsMarkerSymbolLayerV2::mSizeUnit, QgsMarkerSymbolLayerV2::mVerticalAnchorPoint, QgsSvgMarkerSymbolLayerV2(), setFillColor(), QgsMarkerSymbolLayerV2::setHorizontalAnchorPoint(), QgsMarkerSymbolLayerV2::setOffset(), QgsMarkerSymbolLayerV2::setOffsetUnit(), setOutlineColor(), setOutlineWidth(), setOutlineWidthUnit(), QgsMarkerSymbolLayerV2::setSizeUnit(), and QgsMarkerSymbolLayerV2::setVerticalAnchorPoint().
|
static |
Definition at line 933 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::angle(), QgsSvgCache::containsParams(), QgsSymbolLayerV2Utils::decodeOutputUnit(), QgsSymbolLayerV2Utils::decodePoint(), DEFAULT_SVGMARKER_ANGLE, DEFAULT_SVGMARKER_NAME, DEFAULT_SVGMARKER_SIZE, fillColor(), QgsSvgCache::instance(), outlineColor(), outlineWidth(), QgsSvgMarkerSymbolLayerV2(), QgsSymbolLayerV2::setDataDefinedProperty(), setFillColor(), QgsMarkerSymbolLayerV2::setHorizontalAnchorPoint(), QgsMarkerSymbolLayerV2::setOffset(), QgsMarkerSymbolLayerV2::setOffsetUnit(), setOutlineColor(), setOutlineWidth(), setOutlineWidthUnit(), QgsMarkerSymbolLayerV2::setSizeUnit(), QgsMarkerSymbolLayerV2::setVerticalAnchorPoint(), and QgsMarkerSymbolLayerV2::size().
Referenced by QgsPalLabeling::drawLabelBackground(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 1299 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::angle(), QgsSymbolLayerV2Utils::displacementFromSldElement(), QgsSymbolLayerV2Utils::externalGraphicFromSld(), fillColor(), QgsMarkerSymbolLayerV2::offset(), path(), QgsDebugMsg, QgsSvgMarkerSymbolLayerV2(), QgsSymbolLayerV2Utils::rotationFromSldElement(), QgsMarkerSymbolLayerV2::setAngle(), setFillColor(), QgsMarkerSymbolLayerV2::setOffset(), and QgsMarkerSymbolLayerV2::size().
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
inlinevirtual |
Get fill color.
Supported by marker and fill layers.
Reimplemented from QgsSymbolLayerV2.
Definition at line 169 of file qgsmarkersymbollayerv2.h.
Referenced by create(), createFromSld(), renderPoint(), and setPath().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1055 of file qgsmarkersymbollayerv2.cpp.
|
inlinevirtual |
Get outline color.
Supported by marker and fill layers.
Reimplemented from QgsSymbolLayerV2.
Definition at line 172 of file qgsmarkersymbollayerv2.h.
Referenced by create(), renderPoint(), and setPath().
|
inline |
Definition at line 175 of file qgsmarkersymbollayerv2.h.
Referenced by create(), renderPoint(), and setPath().
|
inline |
Definition at line 179 of file qgsmarkersymbollayerv2.h.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 1262 of file qgsmarkersymbollayerv2.cpp.
References QgsSymbolV2::Mixed, QgsMarkerSymbolLayerV2::mOffsetUnit, mOutlineWidthUnit, and QgsMarkerSymbolLayerV2::mSizeUnit.
|
inline |
Definition at line 166 of file qgsmarkersymbollayerv2.h.
Referenced by createFromSld(), renderPoint(), and setPath().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1219 of file qgsmarkersymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::encodeOutputUnit(), QgsSymbolLayerV2Utils::encodePoint(), QgsMarkerSymbolLayerV2::mAngle, mFillColor, QgsMarkerSymbolLayerV2::mHorizontalAnchorPoint, QgsMarkerSymbolLayerV2::mOffset, QgsMarkerSymbolLayerV2::mOffsetUnit, mOutlineColor, mOutlineWidth, mOutlineWidthUnit, mPath, QgsMarkerSymbolLayerV2::mSize, QgsMarkerSymbolLayerV2::mSizeUnit, QgsMarkerSymbolLayerV2::mVerticalAnchorPoint, QgsSymbolLayerV2::saveDataDefinedProperties(), and QgsSymbolLayerV2Utils::symbolPathToName().
|
virtual |
Implements QgsMarkerSymbolLayerV2.
Definition at line 1072 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::_rotatedOffset(), QgsSymbolV2RenderContext::alpha(), QgsMarkerSymbolLayerV2::angle(), QgsSymbolV2::DataDefinedSizeScale, QgsSymbolLayerV2Utils::decodeColor(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), fillColor(), QgsRenderContext::forceVectorOutput(), QgsSvgCache::instance(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), QgsMarkerSymbolLayerV2::mAngle, QgsMarkerSymbolLayerV2::markerOffset(), mFillColor, QgsSymbolV2::MM, mOutlineColor, mOutlineWidth, mPath, QgsMarkerSymbolLayerV2::mScaleMethod, QgsMarkerSymbolLayerV2::mSize, QgsMarkerSymbolLayerV2::mSizeUnit, QgsSymbolLayerV2Utils::multiplyImageOpacity(), outlineColor(), outlineWidth(), QgsRenderContext::painter(), path(), qgsDoubleNear(), QgsRenderContext::rasterScaleFactor(), QgsSymbolV2RenderContext::renderContext(), QgsSymbolV2RenderContext::renderHints(), QgsSymbolV2::ScaleArea, QgsSymbolV2::ScaleDiameter, QgsRenderContext::scaleFactor(), QgsSymbolV2RenderContext::selected(), QgsRenderContext::selectionColor(), QgsMarkerSymbolLayerV2::size(), QgsSvgCache::svgAsImage(), and QgsSvgCache::svgAsPicture().
Referenced by QgsPalLabeling::drawLabelBackground().
|
inlinevirtual |
Set fill color.
Supported by marker and fill layers.
Reimplemented from QgsSymbolLayerV2.
Definition at line 170 of file qgsmarkersymbollayerv2.h.
Referenced by clone(), create(), createFromSld(), and setPath().
|
inlinevirtual |
Set outline color.
Supported by marker and fill layers.
Reimplemented from QgsSymbolLayerV2.
Definition at line 173 of file qgsmarkersymbollayerv2.h.
|
inline |
Definition at line 176 of file qgsmarkersymbollayerv2.h.
|
inline |
Definition at line 178 of file qgsmarkersymbollayerv2.h.
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 1255 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::mOffsetUnit, mOutlineWidthUnit, and QgsMarkerSymbolLayerV2::mSizeUnit.
void QgsSvgMarkerSymbolLayerV2::setPath | ( | QString | path | ) |
Definition at line 1033 of file qgsmarkersymbollayerv2.cpp.
References QgsSvgCache::containsParams(), fillColor(), QgsSvgCache::instance(), mPath, outlineColor(), outlineWidth(), path(), setFillColor(), setOutlineColor(), and setOutlineWidth().
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 1060 of file qgsmarkersymbollayerv2.cpp.
References QgsSymbolV2RenderContext::layer(), mOrigSize, QgsMarkerSymbolLayerV2::mSize, QgsSymbolLayerV2::prepareExpressions(), QgsSymbolV2RenderContext::renderContext(), and QgsRenderContext::rendererScale().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1067 of file qgsmarkersymbollayerv2.cpp.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1339 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::_rotatedOffset(), QgsMarkerSymbolLayerV2::angle(), QgsSymbolV2::DataDefinedSizeScale, QgsSymbolLayerV2Utils::decodePoint(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsMarkerSymbolLayerV2::mAngle, QgsSymbolV2::MM, QgsMarkerSymbolLayerV2::mOffset, mPath, QgsMarkerSymbolLayerV2::mScaleMethod, QgsMarkerSymbolLayerV2::mSize, QgsMarkerSymbolLayerV2::mSizeUnit, QgsMarkerSymbolLayerV2::offset(), qgsDoubleNear(), QgsSymbolV2RenderContext::renderHints(), QgsSymbolV2::ScaleArea, QgsSymbolV2::ScaleDiameter, and QgsMarkerSymbolLayerV2::size().
|
virtual |
Reimplemented from QgsMarkerSymbolLayerV2.
Definition at line 1272 of file qgsmarkersymbollayerv2.cpp.
References QgsMarkerSymbolLayerV2::angle(), QgsSymbolLayerV2Utils::createDisplacementElement(), QgsSymbolLayerV2Utils::createRotationElement(), QgsSymbolLayerV2Utils::externalGraphicToSld(), QgsMarkerSymbolLayerV2::mAngle, mFillColor, QgsMarkerSymbolLayerV2::mOffset, mPath, and QgsMarkerSymbolLayerV2::mSize.
|
protected |
Definition at line 191 of file qgsmarkersymbollayerv2.h.
Referenced by clone(), properties(), QgsSvgMarkerSymbolLayerV2(), renderPoint(), and writeSldMarker().
|
protected |
Definition at line 195 of file qgsmarkersymbollayerv2.h.
Referenced by startRender().
|
protected |
Definition at line 192 of file qgsmarkersymbollayerv2.h.
Referenced by clone(), properties(), QgsSvgMarkerSymbolLayerV2(), and renderPoint().
|
protected |
Definition at line 193 of file qgsmarkersymbollayerv2.h.
Referenced by clone(), properties(), QgsSvgMarkerSymbolLayerV2(), and renderPoint().
|
protected |
Definition at line 194 of file qgsmarkersymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), QgsSvgMarkerSymbolLayerV2(), and setOutputUnit().
|
protected |
Definition at line 187 of file qgsmarkersymbollayerv2.h.
Referenced by clone(), properties(), QgsSvgMarkerSymbolLayerV2(), renderPoint(), setPath(), writeDxf(), and writeSldMarker().