QGIS API Documentation
2.4.0-Chugiak
|
#include <qgsfillsymbollayerv2.h>
Public Member Functions | |
QgsSimpleFillSymbolLayerV2 (QColor color=DEFAULT_SIMPLEFILL_COLOR, Qt::BrushStyle style=DEFAULT_SIMPLEFILL_STYLE, QColor borderColor=DEFAULT_SIMPLEFILL_BORDERCOLOR, Qt::PenStyle borderStyle=DEFAULT_SIMPLEFILL_BORDERSTYLE, double borderWidth=DEFAULT_SIMPLEFILL_BORDERWIDTH, Qt::PenJoinStyle penJoinStyle=DEFAULT_SIMPLEFILL_JOINSTYLE) | |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
void | renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
Qt::BrushStyle | brushStyle () const |
void | setBrushStyle (Qt::BrushStyle style) |
QColor | borderColor () const |
void | setBorderColor (QColor borderColor) |
QColor | outlineColor () const |
Get outline color. More... | |
void | setOutlineColor (const QColor &color) |
Set outline color. More... | |
QColor | fillColor () const |
Get fill color. More... | |
void | setFillColor (const QColor &color) |
Set fill color. More... | |
Qt::PenStyle | borderStyle () const |
void | setBorderStyle (Qt::PenStyle borderStyle) |
double | borderWidth () const |
void | setBorderWidth (double borderWidth) |
Qt::PenJoinStyle | penJoinStyle () const |
void | setPenJoinStyle (Qt::PenJoinStyle style) |
void | setOffset (QPointF offset) |
QPointF | offset () |
void | setBorderWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | borderWidthUnit () const |
void | setBorderWidthMapUnitScale (const QgsMapUnitScale &scale) |
const QgsMapUnitScale & | borderWidthMapUnitScale () const |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | offsetUnit () const |
void | setOffsetMapUnitScale (const QgsMapUnitScale &scale) |
const QgsMapUnitScale & | offsetMapUnitScale () const |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
void | setMapUnitScale (const QgsMapUnitScale &scale) |
QgsMapUnitScale | mapUnitScale () const |
double | estimateMaxBleed () const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. More... | |
double | dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const |
QColor | dxfColor (const QgsSymbolV2RenderContext &context) const |
Qt::PenStyle | dxfPenStyle () const |
Public Member Functions inherited from QgsFillSymbolLayerV2 | |
void | drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size) |
void | setAngle (double angle) |
double | angle () const |
Public Member Functions inherited from QgsSymbolLayerV2 | |
virtual QColor | color () const |
virtual void | setColor (const QColor &color) |
virtual | ~QgsSymbolLayerV2 () |
virtual QgsSymbolV2 * | subSymbol () |
virtual bool | setSubSymbol (QgsSymbolV2 *symbol) |
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 () |
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 QVector< qreal > | dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const |
Static Public Member Functions | |
static QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
static QgsSymbolLayerV2 * | createFromSld (QDomElement &element) |
Protected Attributes | |
QBrush | mBrush |
QBrush | mSelBrush |
Qt::BrushStyle | mBrushStyle |
QColor | mBorderColor |
Qt::PenStyle | mBorderStyle |
double | mBorderWidth |
QgsSymbolV2::OutputUnit | mBorderWidthUnit |
QgsMapUnitScale | mBorderWidthMapUnitScale |
Qt::PenJoinStyle | mPenJoinStyle |
QPen | mPen |
QPen | mSelPen |
QPointF | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
QgsMapUnitScale | mOffsetMapUnitScale |
Protected Attributes inherited from QgsFillSymbolLayerV2 | |
double | mAngle |
Protected Attributes inherited from QgsSymbolLayerV2 | |
QgsSymbolV2::SymbolType | mType |
bool | mLocked |
QColor | mColor |
int | mRenderingPass |
QMap< QString, QgsExpression * > | mDataDefinedProperties |
Private Member Functions | |
void | applyDataDefinedSymbology (QgsSymbolV2RenderContext &context, QBrush &brush, QPen &pen, QPen &selPen) |
Additional Inherited Members | |
Protected Member Functions inherited from QgsFillSymbolLayerV2 | |
QgsFillSymbolLayerV2 (bool locked=false) | |
void | _renderPolygon (QPainter *p, const QPolygonF &points, const QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
Default method to render polygon. More... | |
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 Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 33 of file qgsfillsymbollayerv2.h.
QgsSimpleFillSymbolLayerV2::QgsSimpleFillSymbolLayerV2 | ( | QColor | color = DEFAULT_SIMPLEFILL_COLOR , |
Qt::BrushStyle | style = DEFAULT_SIMPLEFILL_STYLE , |
||
QColor | borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR , |
||
Qt::PenStyle | borderStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE , |
||
double | borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH , |
||
Qt::PenJoinStyle | penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE |
||
) |
Definition at line 34 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), and QgsSymbolLayerV2::mColor.
Referenced by clone(), create(), and createFromSld().
|
private |
Definition at line 78 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::decodeColor(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mBorderWidthMapUnitScale, mBorderWidthUnit, and QgsSymbolV2RenderContext::renderContext().
Referenced by renderPolygon().
|
inline |
Definition at line 70 of file qgsfillsymbollayerv2.h.
Referenced by create(), createFromSld(), and startRender().
|
inline |
Definition at line 87 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
|
inline |
Definition at line 90 of file qgsfillsymbollayerv2.h.
Referenced by create(), createFromSld(), and QgsHighlight::setSymbol().
|
inline |
Definition at line 103 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 100 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 67 of file qgsfillsymbollayerv2.h.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 243 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2::copyDataDefinedProperties(), mBorderColor, mBorderStyle, mBorderWidth, mBorderWidthMapUnitScale, mBorderWidthUnit, mBrushStyle, QgsSymbolLayerV2::mColor, mOffset, mOffsetMapUnitScale, mOffsetUnit, mPenJoinStyle, QgsSimpleFillSymbolLayerV2(), setBorderWidthMapUnitScale(), setBorderWidthUnit(), setOffset(), setOffsetMapUnitScale(), and setOffsetUnit().
|
static |
Definition at line 101 of file qgsfillsymbollayerv2.cpp.
References borderColor(), borderStyle(), borderWidth(), QgsSymbolLayerV2::color(), QgsSymbolLayerV2Utils::decodeBrushStyle(), QgsSymbolLayerV2Utils::decodeColor(), QgsSymbolLayerV2Utils::decodeMapUnitScale(), QgsSymbolLayerV2Utils::decodeOutputUnit(), QgsSymbolLayerV2Utils::decodePenJoinStyle(), QgsSymbolLayerV2Utils::decodePenStyle(), QgsSymbolLayerV2Utils::decodePoint(), DEFAULT_SIMPLEFILL_BORDERCOLOR, DEFAULT_SIMPLEFILL_BORDERSTYLE, DEFAULT_SIMPLEFILL_BORDERWIDTH, DEFAULT_SIMPLEFILL_COLOR, DEFAULT_SIMPLEFILL_JOINSTYLE, DEFAULT_SIMPLEFILL_STYLE, offset(), penJoinStyle(), QgsSimpleFillSymbolLayerV2(), setBorderWidthMapUnitScale(), setBorderWidthUnit(), QgsSymbolLayerV2::setDataDefinedProperty(), setOffset(), setOffsetMapUnitScale(), and setOffsetUnit().
Referenced by QgsFillSymbolV2::createSimple(), QgsSymbolLayerV2Registry::defaultSymbolLayer(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 299 of file qgsfillsymbollayerv2.cpp.
References borderColor(), borderStyle(), borderWidth(), QgsSymbolLayerV2::color(), QgsSymbolLayerV2Utils::displacementFromSldElement(), QgsSymbolLayerV2Utils::fillFromSld(), QgsSymbolLayerV2Utils::lineFromSld(), offset(), QgsDebugMsg, QgsSimpleFillSymbolLayerV2(), and setOffset().
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 340 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::decodeColor(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), and mBorderColor.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 350 of file qgsfillsymbollayerv2.cpp.
References mBorderStyle.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 329 of file qgsfillsymbollayerv2.cpp.
References QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), mBorderWidth, and mBorderWidthUnit.
|
virtual |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape.
Eg, polygons drawn with an outline will draw half the width of the outline outside of the polygon. This amount is estimated, since it may be affected by data defined symbology rules.
Reimplemented from QgsSymbolLayerV2.
Definition at line 322 of file qgsfillsymbollayerv2.cpp.
References mBorderStyle, mBorderWidth, and mOffset.
|
inlinevirtual |
Get fill color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 82 of file qgsfillsymbollayerv2.h.
References QgsSymbolLayerV2::color().
Referenced by startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 154 of file qgsfillsymbollayerv2.cpp.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 69 of file qgsfillsymbollayerv2.cpp.
References mBorderWidthMapUnitScale, and mOffsetMapUnitScale.
|
inline |
Definition at line 97 of file qgsfillsymbollayerv2.h.
Referenced by create(), createFromSld(), and renderPolygon().
|
inline |
Definition at line 109 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 106 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 288 of file qgsfillsymbollayerv2.cpp.
References mBorderColor, mBorderWidth, QgsSymbolLayerV2::mColor, mPenJoinStyle, QgsSymbolLayerV2Utils::ogrFeatureStyleBrush(), and QgsSymbolLayerV2Utils::ogrFeatureStylePen().
|
inlinevirtual |
Get outline color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 75 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 53 of file qgsfillsymbollayerv2.cpp.
References mBorderWidthUnit, QgsSymbolV2::Mixed, and mOffsetUnit.
Referenced by QgsHighlight::setSymbol().
|
inline |
Definition at line 93 of file qgsfillsymbollayerv2.h.
Referenced by create().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 225 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::encodeBrushStyle(), QgsSymbolLayerV2Utils::encodeColor(), QgsSymbolLayerV2Utils::encodeMapUnitScale(), QgsSymbolLayerV2Utils::encodeOutputUnit(), QgsSymbolLayerV2Utils::encodePenJoinStyle(), QgsSymbolLayerV2Utils::encodePenStyle(), QgsSymbolLayerV2Utils::encodePoint(), mBorderColor, mBorderStyle, mBorderWidth, mBorderWidthMapUnitScale, mBorderWidthUnit, mBrushStyle, QgsSymbolLayerV2::mColor, mOffset, mOffsetMapUnitScale, mOffsetUnit, mPenJoinStyle, and QgsSymbolLayerV2::saveDataDefinedProperties().
|
virtual |
Implements QgsFillSymbolLayerV2.
Definition at line 196 of file qgsfillsymbollayerv2.cpp.
References QgsFillSymbolLayerV2::_renderPolygon(), applyDataDefinedSymbology(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mBrush, mOffset, mOffsetMapUnitScale, mOffsetUnit, mPen, mSelBrush, mSelPen, offset(), QgsRenderContext::painter(), QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2RenderContext::selected().
|
inline |
Definition at line 71 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 88 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 91 of file qgsfillsymbollayerv2.h.
Referenced by QgsHighlight::setSymbol().
|
inline |
Definition at line 102 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 99 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 68 of file qgsfillsymbollayerv2.h.
|
inlinevirtual |
Set fill color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 85 of file qgsfillsymbollayerv2.h.
References QgsSymbolLayerV2::setColor().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 63 of file qgsfillsymbollayerv2.cpp.
References mBorderWidthMapUnitScale, and mOffsetMapUnitScale.
|
inline |
Definition at line 96 of file qgsfillsymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 108 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 105 of file qgsfillsymbollayerv2.h.
|
inlinevirtual |
Set outline color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 78 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 47 of file qgsfillsymbollayerv2.cpp.
References mBorderWidthUnit, and mOffsetUnit.
|
inline |
Definition at line 94 of file qgsfillsymbollayerv2.h.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 159 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolV2RenderContext::alpha(), borderColor(), QgsSymbolV2RenderContext::fields(), fillColor(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mBorderColor, mBorderStyle, mBorderWidth, mBorderWidthMapUnitScale, mBorderWidthUnit, mBrush, mBrushStyle, QgsSymbolLayerV2::mColor, mPen, mPenJoinStyle, mSelBrush, mSelPen, QgsSymbolLayerV2::prepareExpressions(), QgsRenderContext::rasterScaleFactor(), rasterScaleFactor, QgsSymbolV2RenderContext::renderContext(), QgsRenderContext::rendererScale(), QgsSymbolLayerV2::selectFillStyle, QgsRenderContext::selectionColor(), and QgsSymbolLayerV2::selectionIsOpaque.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 191 of file qgsfillsymbollayerv2.cpp.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 255 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::createDisplacementElement(), QgsSymbolLayerV2Utils::createGeometryElement(), QgsSymbolLayerV2Utils::fillToSld(), QgsSymbolLayerV2Utils::lineToSld(), mBorderColor, mBorderStyle, mBorderWidth, mBrushStyle, QgsSymbolLayerV2::mColor, mOffset, and mPenJoinStyle.
|
protected |
Definition at line 127 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfColor(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 128 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfPenStyle(), estimateMaxBleed(), properties(), startRender(), and toSld().
|
protected |
Definition at line 129 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfWidth(), estimateMaxBleed(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 131 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSymbology(), clone(), mapUnitScale(), properties(), setMapUnitScale(), and startRender().
|
protected |
Definition at line 130 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSymbology(), clone(), dxfWidth(), outputUnit(), properties(), setOutputUnit(), and startRender().
|
protected |
Definition at line 124 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().
|
protected |
Definition at line 126 of file qgsfillsymbollayerv2.h.
Referenced by clone(), properties(), startRender(), and toSld().
|
protected |
Definition at line 136 of file qgsfillsymbollayerv2.h.
Referenced by clone(), estimateMaxBleed(), properties(), renderPolygon(), and toSld().
|
protected |
Definition at line 138 of file qgsfillsymbollayerv2.h.
Referenced by clone(), mapUnitScale(), properties(), renderPolygon(), and setMapUnitScale().
|
protected |
Definition at line 137 of file qgsfillsymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), renderPolygon(), and setOutputUnit().
|
protected |
Definition at line 133 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().
|
protected |
Definition at line 132 of file qgsfillsymbollayerv2.h.
Referenced by clone(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 125 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().
|
protected |
Definition at line 134 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().