QGIS API Documentation
2.2.0-Valmiera
|
#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) | |
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. | |
void | setOutlineColor (const QColor &color) |
Set outline color. | |
QColor | fillColor () const |
Get fill color. | |
void | setFillColor (const QColor &color) |
Set fill color. | |
Qt::PenStyle | borderStyle () const |
void | setBorderStyle (Qt::PenStyle borderStyle) |
double | borderWidth () const |
void | setBorderWidth (double borderWidth) |
void | setOffset (QPointF offset) |
QPointF | offset () |
void | setBorderWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | borderWidthUnit () const |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | offsetUnit () const |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
double | estimateMaxBleed () const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. | |
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 |
QPen | mPen |
QPen | mSelPen |
QPointF | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
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. | |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 30 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 |
||
) |
Definition at line 33 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2::color(), and QgsSymbolLayerV2::mColor.
Referenced by clone(), create(), and createFromSld().
|
private |
Definition at line 56 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::decodeColor(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mBorderWidthUnit, and QgsSymbolV2RenderContext::renderContext().
Referenced by renderPolygon().
|
inline |
Definition at line 65 of file qgsfillsymbollayerv2.h.
Referenced by create(), createFromSld(), and startRender().
|
inline |
Definition at line 82 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
|
inline |
Definition at line 85 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
|
inline |
Definition at line 92 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 62 of file qgsfillsymbollayerv2.h.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 209 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2::copyDataDefinedProperties(), mBorderColor, mBorderStyle, mBorderWidth, mBorderWidthUnit, mBrushStyle, QgsSymbolLayerV2::mColor, mOffset, mOffsetUnit, QgsSimpleFillSymbolLayerV2(), setBorderWidthUnit(), setOffset(), and setOffsetUnit().
|
static |
Definition at line 79 of file qgsfillsymbollayerv2.cpp.
References borderColor(), borderStyle(), borderWidth(), QgsSymbolLayerV2::color(), QgsSymbolLayerV2Utils::decodeBrushStyle(), QgsSymbolLayerV2Utils::decodeColor(), QgsSymbolLayerV2Utils::decodeOutputUnit(), QgsSymbolLayerV2Utils::decodePenStyle(), QgsSymbolLayerV2Utils::decodePoint(), DEFAULT_SIMPLEFILL_BORDERCOLOR, DEFAULT_SIMPLEFILL_BORDERSTYLE, DEFAULT_SIMPLEFILL_BORDERWIDTH, DEFAULT_SIMPLEFILL_COLOR, DEFAULT_SIMPLEFILL_STYLE, offset(), QgsSimpleFillSymbolLayerV2(), setBorderWidthUnit(), QgsSymbolLayerV2::setDataDefinedProperty(), setOffset(), and setOffsetUnit().
Referenced by QgsFillSymbolV2::createSimple(), QgsSymbolLayerV2Registry::defaultSymbolLayer(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 263 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 304 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::decodeColor(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), mBorderColor, mBrushStyle, and QgsSymbolLayerV2::mColor.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 326 of file qgsfillsymbollayerv2.cpp.
References mBorderStyle.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 293 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 286 of file qgsfillsymbollayerv2.cpp.
References mBorderStyle, mBorderWidth, and mOffset.
|
inlinevirtual |
Get fill color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 77 of file qgsfillsymbollayerv2.h.
References QgsSymbolLayerV2::color().
Referenced by startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 124 of file qgsfillsymbollayerv2.cpp.
|
inline |
Definition at line 89 of file qgsfillsymbollayerv2.h.
Referenced by create(), createFromSld(), and renderPolygon().
|
inline |
Definition at line 95 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 252 of file qgsfillsymbollayerv2.cpp.
References mBorderColor, mBorderWidth, QgsSymbolLayerV2::mColor, QgsSymbolLayerV2Utils::ogrFeatureStyleBrush(), and QgsSymbolLayerV2Utils::ogrFeatureStylePen().
|
inlinevirtual |
Get outline color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 70 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 46 of file qgsfillsymbollayerv2.cpp.
References mBorderWidthUnit, QgsSymbolV2::Mixed, and mOffsetUnit.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 194 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::encodeBrushStyle(), QgsSymbolLayerV2Utils::encodeColor(), QgsSymbolLayerV2Utils::encodeOutputUnit(), QgsSymbolLayerV2Utils::encodePenStyle(), QgsSymbolLayerV2Utils::encodePoint(), mBorderColor, mBorderStyle, mBorderWidth, mBorderWidthUnit, mBrushStyle, QgsSymbolLayerV2::mColor, mOffset, mOffsetUnit, and QgsSymbolLayerV2::saveDataDefinedProperties().
|
virtual |
Implements QgsFillSymbolLayerV2.
Definition at line 165 of file qgsfillsymbollayerv2.cpp.
References QgsFillSymbolLayerV2::_renderPolygon(), applyDataDefinedSymbology(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mBrush, mOffset, mOffsetUnit, mPen, mSelBrush, mSelPen, offset(), QgsRenderContext::painter(), QgsSymbolV2RenderContext::renderContext(), and QgsSymbolV2RenderContext::selected().
|
inline |
Definition at line 66 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 83 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 86 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 91 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 63 of file qgsfillsymbollayerv2.h.
|
inlinevirtual |
Set fill color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 80 of file qgsfillsymbollayerv2.h.
References QgsSymbolLayerV2::setColor().
|
inline |
Definition at line 88 of file qgsfillsymbollayerv2.h.
Referenced by clone(), create(), and createFromSld().
|
inline |
Definition at line 94 of file qgsfillsymbollayerv2.h.
|
inlinevirtual |
Set outline color.
Reimplemented from QgsSymbolLayerV2.
Definition at line 73 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 40 of file qgsfillsymbollayerv2.cpp.
References mBorderWidthUnit, and mOffsetUnit.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 129 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolV2RenderContext::alpha(), borderColor(), fillColor(), QgsSymbolV2RenderContext::layer(), QgsSymbolLayerV2Utils::lineWidthScaleFactor(), mBorderColor, mBorderStyle, mBorderWidth, mBorderWidthUnit, mBrush, mBrushStyle, QgsSymbolLayerV2::mColor, mPen, mSelBrush, mSelPen, QgsSymbolLayerV2::prepareExpressions(), QgsRenderContext::rasterScaleFactor(), rasterScaleFactor, QgsSymbolV2RenderContext::renderContext(), QgsRenderContext::rendererScale(), QgsSymbolLayerV2::selectFillStyle, QgsRenderContext::selectionColor(), and QgsSymbolLayerV2::selectionIsOpaque.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 160 of file qgsfillsymbollayerv2.cpp.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 219 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::createDisplacementElement(), QgsSymbolLayerV2Utils::createGeometryElement(), QgsSymbolLayerV2Utils::fillToSld(), QgsSymbolLayerV2Utils::lineToSld(), mBorderColor, mBorderStyle, mBorderWidth, mBrushStyle, QgsSymbolLayerV2::mColor, and mOffset.
|
protected |
Definition at line 110 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfColor(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 111 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfPenStyle(), estimateMaxBleed(), properties(), startRender(), and toSld().
|
protected |
Definition at line 112 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfWidth(), estimateMaxBleed(), ogrFeatureStyle(), properties(), startRender(), and toSld().
|
protected |
Definition at line 113 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSymbology(), clone(), dxfWidth(), outputUnit(), properties(), setOutputUnit(), and startRender().
|
protected |
Definition at line 107 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().
|
protected |
Definition at line 109 of file qgsfillsymbollayerv2.h.
Referenced by clone(), dxfColor(), properties(), startRender(), and toSld().
|
protected |
Definition at line 117 of file qgsfillsymbollayerv2.h.
Referenced by clone(), estimateMaxBleed(), properties(), renderPolygon(), and toSld().
|
protected |
Definition at line 118 of file qgsfillsymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), renderPolygon(), and setOutputUnit().
|
protected |
Definition at line 114 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().
|
protected |
Definition at line 108 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().
|
protected |
Definition at line 115 of file qgsfillsymbollayerv2.h.
Referenced by renderPolygon(), and startRender().