QGIS API Documentation
2.2.0-Valmiera
|
#include <qgssymbollayerv2utils.h>
Static Public Member Functions | |
static QString | encodeColor (QColor color) |
static QColor | decodeColor (QString str) |
static QString | encodeSldAlpha (int alpha) |
static int | decodeSldAlpha (QString str) |
static QString | encodeSldFontStyle (QFont::Style style) |
static QFont::Style | decodeSldFontStyle (QString str) |
static QString | encodeSldFontWeight (int weight) |
static int | decodeSldFontWeight (QString str) |
static QString | encodePenStyle (Qt::PenStyle style) |
static Qt::PenStyle | decodePenStyle (QString str) |
static QString | encodePenJoinStyle (Qt::PenJoinStyle style) |
static Qt::PenJoinStyle | decodePenJoinStyle (QString str) |
static QString | encodePenCapStyle (Qt::PenCapStyle style) |
static Qt::PenCapStyle | decodePenCapStyle (QString str) |
static QString | encodeSldLineJoinStyle (Qt::PenJoinStyle style) |
static Qt::PenJoinStyle | decodeSldLineJoinStyle (QString str) |
static QString | encodeSldLineCapStyle (Qt::PenCapStyle style) |
static Qt::PenCapStyle | decodeSldLineCapStyle (QString str) |
static QString | encodeBrushStyle (Qt::BrushStyle style) |
static Qt::BrushStyle | decodeBrushStyle (QString str) |
static QString | encodeSldBrushStyle (Qt::BrushStyle style) |
static Qt::BrushStyle | decodeSldBrushStyle (QString str) |
static QString | encodePoint (QPointF point) |
static QPointF | decodePoint (QString str) |
static QString | encodeRealVector (const QVector< qreal > &v) |
static QVector< qreal > | decodeRealVector (const QString &s) |
static QString | encodeSldRealVector (const QVector< qreal > &v) |
static QVector< qreal > | decodeSldRealVector (const QString &s) |
static QString | encodeOutputUnit (QgsSymbolV2::OutputUnit unit) |
static QgsSymbolV2::OutputUnit | decodeOutputUnit (QString str) |
static QString | encodeSldUom (QgsSymbolV2::OutputUnit unit, double *scaleFactor) |
static QgsSymbolV2::OutputUnit | decodeSldUom (QString str, double *scaleFactor) |
static QString | encodeScaleMethod (QgsSymbolV2::ScaleMethod scaleMethod) |
static QgsSymbolV2::ScaleMethod | decodeScaleMethod (QString str) |
static QIcon | symbolPreviewIcon (QgsSymbolV2 *symbol, QSize size) |
static QIcon | symbolLayerPreviewIcon (QgsSymbolLayerV2 *layer, QgsSymbolV2::OutputUnit u, QSize size) |
static QIcon | colorRampPreviewIcon (QgsVectorColorRampV2 *ramp, QSize size) |
static void | drawStippledBackround (QPainter *painter, QRect rect) |
static QPixmap | symbolPreviewPixmap (QgsSymbolV2 *symbol, QSize size) |
static QPixmap | colorRampPreviewPixmap (QgsVectorColorRampV2 *ramp, QSize size) |
static double | estimateMaxSymbolBleed (QgsSymbolV2 *symbol) |
Returns the maximum estimated bleed for the symbol. | |
static QgsSymbolV2 * | loadSymbol (QDomElement &element) |
static QgsSymbolLayerV2 * | loadSymbolLayer (QDomElement &element) |
static QDomElement | saveSymbol (QString symbolName, QgsSymbolV2 *symbol, QDomDocument &doc) |
static bool | createSymbolLayerV2ListFromSld (QDomElement &element, QGis::GeometryType geomType, QgsSymbolLayerV2List &layers) |
static QgsSymbolLayerV2 * | createFillLayerFromSld (QDomElement &element) |
static QgsSymbolLayerV2 * | createLineLayerFromSld (QDomElement &element) |
static QgsSymbolLayerV2 * | createMarkerLayerFromSld (QDomElement &element) |
static bool | convertPolygonSymbolizerToPointMarker (QDomElement &element, QgsSymbolLayerV2List &layerList) |
static bool | hasExternalGraphic (QDomElement &element) |
static bool | hasWellKnownMark (QDomElement &element) |
static bool | needFontMarker (QDomElement &element) |
static bool | needSvgMarker (QDomElement &element) |
static bool | needEllipseMarker (QDomElement &element) |
static bool | needMarkerLine (QDomElement &element) |
static bool | needLinePatternFill (QDomElement &element) |
static bool | needPointPatternFill (QDomElement &element) |
static bool | needSvgFill (QDomElement &element) |
static void | fillToSld (QDomDocument &doc, QDomElement &element, Qt::BrushStyle brushStyle, QColor color=QColor()) |
static bool | fillFromSld (QDomElement &element, Qt::BrushStyle &brushStyle, QColor &color) |
static void | lineToSld (QDomDocument &doc, QDomElement &element, Qt::PenStyle penStyle, QColor color, double width=-1, const Qt::PenJoinStyle *penJoinStyle=0, const Qt::PenCapStyle *penCapStyle=0, const QVector< qreal > *customDashPattern=0, double dashOffset=0.0) |
static bool | lineFromSld (QDomElement &element, Qt::PenStyle &penStyle, QColor &color, double &width, Qt::PenJoinStyle *penJoinStyle=0, Qt::PenCapStyle *penCapStyle=0, QVector< qreal > *customDashPattern=0, double *dashOffset=0) |
static void | externalGraphicToSld (QDomDocument &doc, QDomElement &element, QString path, QString mime, QColor color, double size=-1) |
static bool | externalGraphicFromSld (QDomElement &element, QString &path, QString &mime, QColor &color, double &size) |
static Q_DECL_DEPRECATED void | wellKnownMarkerToSld (QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor=QColor(), double borderWidth=-1, double size=-1) |
static void | wellKnownMarkerToSld (QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle, double borderWidth=-1, double size=-1) |
static Q_DECL_DEPRECATED bool | wellKnownMarkerFromSld (QDomElement &element, QString &name, QColor &color, QColor &borderColor, double &borderWidth, double &size) |
static bool | wellKnownMarkerFromSld (QDomElement &element, QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle, double &borderWidth, double &size) |
static void | externalMarkerToSld (QDomDocument &doc, QDomElement &element, QString path, QString format, int *markIndex=0, QColor color=QColor(), double size=-1) |
static bool | externalMarkerFromSld (QDomElement &element, QString &path, QString &format, int &markIndex, QColor &color, double &size) |
static void | labelTextToSld (QDomDocument &doc, QDomElement &element, QString label, QFont font, QColor color=QColor(), double size=-1) |
static QString | ogrFeatureStylePen (double width, double mmScaleFactor, double mapUnitsScaleFactor, const QColor &c, Qt::PenJoinStyle joinStyle=Qt::MiterJoin, Qt::PenCapStyle capStyle=Qt::FlatCap, double offset=0.0, const QVector< qreal > *dashPattern=0) |
Create ogr feature style string for pen. | |
static QString | ogrFeatureStyleBrush (const QColor &fillColr) |
Create ogr feature style string for brush. | |
static void | createRotationElement (QDomDocument &doc, QDomElement &element, QString rotationFunc) |
static bool | rotationFromSldElement (QDomElement &element, QString &rotationFunc) |
static void | createOpacityElement (QDomDocument &doc, QDomElement &element, QString alphaFunc) |
static bool | opacityFromSldElement (QDomElement &element, QString &alphaFunc) |
static void | createDisplacementElement (QDomDocument &doc, QDomElement &element, QPointF offset) |
static bool | displacementFromSldElement (QDomElement &element, QPointF &offset) |
static void | createOnlineResourceElement (QDomDocument &doc, QDomElement &element, QString path, QString format) |
static bool | onlineResourceFromSldElement (QDomElement &element, QString &path, QString &format) |
static void | createGeometryElement (QDomDocument &doc, QDomElement &element, QString geomFunc) |
static bool | geometryFromSldElement (QDomElement &element, QString &geomFunc) |
static bool | createFunctionElement (QDomDocument &doc, QDomElement &element, QString function) |
static bool | functionFromSldElement (QDomElement &element, QString &function) |
static QDomElement | createSvgParameterElement (QDomDocument &doc, QString name, QString value) |
static QgsStringMap | getSvgParameterList (QDomElement &element) |
static QDomElement | createVendorOptionElement (QDomDocument &doc, QString name, QString value) |
static QgsStringMap | getVendorOptionList (QDomElement &element) |
static QgsStringMap | parseProperties (QDomElement &element) |
static void | saveProperties (QgsStringMap props, QDomDocument &doc, QDomElement &element) |
static QgsSymbolV2Map | loadSymbols (QDomElement &element) |
static QDomElement | saveSymbols (QgsSymbolV2Map &symbols, QString tagName, QDomDocument &doc) |
static void | clearSymbolMap (QgsSymbolV2Map &symbols) |
static QgsVectorColorRampV2 * | loadColorRamp (QDomElement &element) |
static QDomElement | saveColorRamp (QString name, QgsVectorColorRampV2 *ramp, QDomDocument &doc) |
static QColor | parseColor (QString colorStr) |
parse color definition with format "rgb(0,0,0)" or "0,0,0" | |
static double | lineWidthScaleFactor (const QgsRenderContext &c, QgsSymbolV2::OutputUnit u) |
Returns the line width scale factor depending on the unit and the paint device. | |
static double | pixelSizeScaleFactor (const QgsRenderContext &c, QgsSymbolV2::OutputUnit u) |
Returns scale factor painter units -> pixel dimensions. | |
static QgsRenderContext | createRenderContext (QPainter *p) |
Creates a render context for a pixel based device. | |
static void | multiplyImageOpacity (QImage *image, qreal alpha) |
Multiplies opacity of image pixel values with a (global) transparency value. | |
static void | blurImageInPlace (QImage &image, const QRect &rect, int radius, bool alphaOnly) |
Blurs an image in place, e.g. | |
static void | sortVariantList (QList< QVariant > &list, Qt::SortOrder order) |
Sorts the passed list in requested order. | |
static QPointF | pointOnLineWithDistance (const QPointF &startPoint, const QPointF &directionPoint, double distance) |
Returns a point on the line from startPoint to directionPoint that is a certain distance away from the starting point. | |
static QStringList | listSvgFiles () |
Return a list of all available svg files. | |
static QStringList | listSvgFilesAt (QString directory) |
Return a list of svg files at the specified directory. | |
static QString | symbolNameToPath (QString name) |
Get symbol's path from its name. | |
static QString | symbolPathToName (QString path) |
Get symbols's name from its path. | |
static QPointF | polygonCentroid (const QPolygonF &points) |
Calculate the centroid point of a QPolygonF. | |
static QgsExpression * | fieldOrExpressionToExpression (const QString &fieldOrExpression) |
Return a new valid expression instance for given field or expression string. | |
static QString | fieldOrExpressionFromExpression (QgsExpression *expression) |
Return a field name if the whole expression is just a name of the field . |
Definition at line 42 of file qgssymbollayerv2utils.h.
|
static |
Blurs an image in place, e.g.
creating Qt-independent drop shadows
Definition at line 2662 of file qgssymbollayerv2utils.cpp.
Referenced by QgsPalLabeling::drawLabelShadow().
|
static |
Definition at line 2518 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSingleSymbolRendererV2::create(), QgsCategorizedSymbolRendererV2::create(), QgsGraduatedSymbolRendererV2::create(), and QgsRuleBasedRendererV2::create().
|
static |
Definition at line 535 of file qgssymbollayerv2utils.cpp.
References colorRampPreviewPixmap().
Referenced by QgsCptCityColorRampItem::icon().
|
static |
Definition at line 540 of file qgssymbollayerv2utils.cpp.
References QgsVectorColorRampV2::color(), and drawStippledBackround().
Referenced by colorRampPreviewIcon().
|
static |
Definition at line 1236 of file qgssymbollayerv2utils.cpp.
References MathUtils::angle(), decodeSldAlpha(), displacementFromSldElement(), encodeColor(), encodePoint(), fillFromSld(), QgsSymbolLayerV2Registry::instance(), lineFromSld(), QgsDebugMsg, qgsDoubleNear(), rotationFromSldElement(), and size.
Referenced by createSymbolLayerV2ListFromSld().
|
static |
|
static |
Definition at line 978 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), needLinePatternFill(), needPointPatternFill(), needSvgFill(), and QgsDebugMsg.
Referenced by createSymbolLayerV2ListFromSld().
|
static |
Definition at line 2264 of file qgssymbollayerv2utils.cpp.
References QgsOgcUtils::expressionToOgcFilter(), QgsExpression::hasParserError(), and QgsExpression::parserErrorString().
Referenced by createGeometryElement(), createOpacityElement(), createRotationElement(), QgsRendererRangeV2::toSld(), QgsRendererCategoryV2::toSld(), QgsRuleBasedRendererV2::Rule::toSld(), and QgsMarkerLineSymbolLayerV2::toSld().
|
static |
Definition at line 2221 of file qgssymbollayerv2utils.cpp.
References createFunctionElement().
Referenced by QgsEllipseSymbolLayerV2::toSld(), QgsSimpleFillSymbolLayerV2::toSld(), QgsSimpleLineSymbolLayerV2::toSld(), QgsMarkerLineSymbolLayerV2::toSld(), QgsMarkerSymbolLayerV2::toSld(), QgsSVGFillSymbolLayer::toSld(), QgsLinePatternFillSymbolLayer::toSld(), and QgsPointPatternFillSymbolLayer::toSld().
|
static |
Definition at line 1001 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), needMarkerLine(), and QgsDebugMsg.
Referenced by QgsSVGFillSymbolLayer::createFromSld(), QgsLinePatternFillSymbolLayer::createFromSld(), and createSymbolLayerV2ListFromSld().
|
static |
Definition at line 1020 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), needEllipseMarker(), needFontMarker(), needSvgMarker(), and QgsDebugMsg.
Referenced by QgsMarkerLineSymbolLayerV2::createFromSld(), QgsCentroidFillSymbolLayerV2::createFromSld(), and createSymbolLayerV2ListFromSld().
|
static |
Definition at line 2301 of file qgssymbollayerv2utils.cpp.
References symbolPathToName().
Referenced by externalGraphicToSld(), and externalMarkerToSld().
|
static |
Definition at line 2043 of file qgssymbollayerv2utils.cpp.
References createFunctionElement().
|
static |
Creates a render context for a pixel based device.
Definition at line 2616 of file qgssymbollayerv2utils.cpp.
References QgsRenderContext::setPainter(), QgsRenderContext::setRasterScaleFactor(), and QgsRenderContext::setScaleFactor().
Referenced by QgsSymbolV2::bigSymbolPreviewImage(), QgsSymbolV2::drawPreviewIcon(), and symbolLayerPreviewIcon().
|
static |
Definition at line 2022 of file qgssymbollayerv2utils.cpp.
References createFunctionElement().
Referenced by QgsSVGFillSymbolLayer::toSld(), QgsLinePatternFillSymbolLayer::toSld(), QgsEllipseSymbolLayerV2::writeSldMarker(), QgsSimpleMarkerSymbolLayerV2::writeSldMarker(), QgsSvgMarkerSymbolLayerV2::writeSldMarker(), and QgsFontMarkerSymbolLayerV2::writeSldMarker().
|
static |
Definition at line 2335 of file qgssymbollayerv2utils.cpp.
Referenced by fillToSld(), labelTextToSld(), and lineToSld().
|
static |
Definition at line 830 of file qgssymbollayerv2utils.cpp.
References convertPolygonSymbolizerToPointMarker(), createFillLayerFromSld(), createLineLayerFromSld(), createMarkerLayerFromSld(), QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), QgsSymbolLayerV2::layerType(), QGis::Line, QGis::Point, QGis::Polygon, and QgsDebugMsg.
Referenced by QgsSingleSymbolRendererV2::createFromSld(), and QgsRuleBasedRendererV2::Rule::createFromSld().
|
static |
Definition at line 2365 of file qgssymbollayerv2utils.cpp.
Referenced by QgsMarkerLineSymbolLayerV2::toSld(), QgsPointPatternFillSymbolLayer::toSld(), and QgsEllipseSymbolLayerV2::writeSldMarker().
|
static |
Definition at line 249 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleFillSymbolLayerV2::create(), and decodeSldBrushStyle().
|
static |
Definition at line 46 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSVGFillSymbolLayer::applyDataDefinedSettings(), QgsLinePatternFillSymbolLayer::applyDataDefinedSettings(), QgsSimpleFillSymbolLayerV2::applyDataDefinedSymbology(), QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology(), QgsGradientFillSymbolLayerV2::applyDataDefinedSymbology(), QgsEllipseSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleLineSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsPointDisplacementRenderer::create(), QgsVectorGradientColorRampV2::create(), QgsGradientFillSymbolLayerV2::create(), QgsFontMarkerSymbolLayerV2::create(), QgsLinePatternFillSymbolLayer::create(), QgsPalLayerSettings::dataDefinedValEval(), QgsSimpleLineSymbolLayerV2::dxfColor(), QgsSimpleFillSymbolLayerV2::dxfColor(), QgsEllipseSymbolLayerV2::renderPoint(), QgsSimpleMarkerSymbolLayerV2::renderPoint(), QgsSvgMarkerSymbolLayerV2::renderPoint(), and QgsSimpleMarkerSymbolLayerV2::writeDxf().
|
static |
Definition at line 341 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
Referenced by QgsEllipseSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleLineSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsVectorFieldSymbolLayer::create(), QgsSvgMarkerSymbolLayerV2::create(), QgsMarkerLineSymbolLayerV2::create(), QgsGradientFillSymbolLayerV2::create(), QgsFontMarkerSymbolLayerV2::create(), QgsSVGFillSymbolLayer::create(), QgsLinePatternFillSymbolLayer::create(), QgsPointPatternFillSymbolLayer::create(), and loadSymbol().
|
static |
Definition at line 199 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology(), and QgsSimpleLineSymbolLayerV2::create().
|
static |
Definition at line 161 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology(), and QgsSimpleLineSymbolLayerV2::create().
|
static |
Definition at line 139 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleLineSymbolLayerV2::create(), and QgsSimpleMarkerSymbolLayerV2::create().
|
static |
Definition at line 320 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsSvgMarkerSymbolLayerV2::create(), QgsGradientFillSymbolLayerV2::create(), QgsFontMarkerSymbolLayerV2::create(), QgsPalLayerSettings::dataDefinedValEval(), QgsMarkerSymbolLayerV2::markerOffset(), QgsPalLayerSettings::registerFeature(), and QgsSvgMarkerSymbolLayerV2::writeDxf().
|
static |
Definition at line 414 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::create().
|
static |
Definition at line 473 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::ScaleArea, and QgsSymbolV2::ScaleDiameter.
Referenced by QgsSimpleMarkerSymbolLayerV2::create(), QgsSingleSymbolRendererV2::create(), QgsCategorizedSymbolRendererV2::create(), and QgsGraduatedSymbolRendererV2::create().
|
static |
Definition at line 70 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), fillFromSld(), and lineFromSld().
|
static |
Definition at line 300 of file qgssymbollayerv2utils.cpp.
References decodeBrushStyle().
Referenced by fillFromSld().
|
static |
Definition at line 92 of file qgssymbollayerv2utils.cpp.
|
static |
Definition at line 112 of file qgssymbollayerv2utils.cpp.
|
static |
Definition at line 218 of file qgssymbollayerv2utils.cpp.
Referenced by lineFromSld().
|
static |
Definition at line 180 of file qgssymbollayerv2utils.cpp.
Referenced by lineFromSld().
|
static |
Definition at line 443 of file qgssymbollayerv2utils.cpp.
Referenced by lineFromSld().
|
static |
Definition at line 377 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
|
static |
Definition at line 2081 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSimpleFillSymbolLayerV2::createFromSld(), QgsSimpleMarkerSymbolLayerV2::createFromSld(), QgsSvgMarkerSymbolLayerV2::createFromSld(), QgsFontMarkerSymbolLayerV2::createFromSld(), and QgsLinePatternFillSymbolLayer::createFromSld().
|
static |
Definition at line 563 of file qgssymbollayerv2utils.cpp.
Referenced by colorRampPreviewPixmap().
|
static |
Definition at line 226 of file qgssymbollayerv2utils.cpp.
Referenced by encodeSldBrushStyle(), and QgsSimpleFillSymbolLayerV2::properties().
|
static |
Definition at line 41 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSymbolV2::dump(), fcnRampColor(), fncColorCmyka(), fncColorHsla(), fncColorHsva(), fncColorRgba(), QgsEllipseSymbolLayerV2::properties(), QgsSimpleFillSymbolLayerV2::properties(), QgsSimpleLineSymbolLayerV2::properties(), QgsSimpleMarkerSymbolLayerV2::properties(), QgsVectorGradientColorRampV2::properties(), QgsGradientFillSymbolLayerV2::properties(), QgsFontMarkerSymbolLayerV2::properties(), QgsLinePatternFillSymbolLayer::properties(), QgsComposerShape::readXML(), and QgsPointDisplacementRenderer::save().
|
static |
Definition at line 328 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
Referenced by QgsPalLabeling::drawLabelBackground(), QgsEllipseSymbolLayerV2::properties(), QgsSimpleFillSymbolLayerV2::properties(), QgsSimpleLineSymbolLayerV2::properties(), QgsSimpleMarkerSymbolLayerV2::properties(), QgsVectorFieldSymbolLayer::properties(), QgsSvgMarkerSymbolLayerV2::properties(), QgsMarkerLineSymbolLayerV2::properties(), QgsGradientFillSymbolLayerV2::properties(), QgsFontMarkerSymbolLayerV2::properties(), QgsSVGFillSymbolLayer::properties(), QgsLinePatternFillSymbolLayer::properties(), and QgsPointPatternFillSymbolLayer::properties().
|
static |
Definition at line 188 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties().
|
static |
Definition at line 150 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties().
|
static |
Definition at line 125 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::properties(), QgsSimpleFillSymbolLayerV2::properties(), QgsSimpleLineSymbolLayerV2::properties(), and QgsSimpleMarkerSymbolLayerV2::properties().
|
static |
Definition at line 315 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsEllipseSymbolLayerV2::properties(), QgsSimpleFillSymbolLayerV2::properties(), QgsSimpleMarkerSymbolLayerV2::properties(), QgsSvgMarkerSymbolLayerV2::properties(), QgsGradientFillSymbolLayerV2::properties(), QgsFontMarkerSymbolLayerV2::properties(), and QgsPointPatternFillSymbolLayer::toSld().
|
static |
Definition at line 399 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties().
|
static |
Definition at line 457 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::ScaleArea, and QgsSymbolV2::ScaleDiameter.
Referenced by QgsSimpleMarkerSymbolLayerV2::properties(), QgsSingleSymbolRendererV2::save(), QgsCategorizedSymbolRendererV2::save(), and QgsGraduatedSymbolRendererV2::save().
|
static |
Definition at line 65 of file qgssymbollayerv2utils.cpp.
Referenced by fillToSld(), and lineToSld().
|
static |
Definition at line 269 of file qgssymbollayerv2utils.cpp.
References encodeBrushStyle().
Referenced by fillToSld().
|
static |
Definition at line 81 of file qgssymbollayerv2utils.cpp.
Referenced by labelTextToSld().
|
static |
Definition at line 100 of file qgssymbollayerv2utils.cpp.
Referenced by labelTextToSld().
|
static |
Definition at line 207 of file qgssymbollayerv2utils.cpp.
Referenced by lineToSld().
|
static |
Definition at line 169 of file qgssymbollayerv2utils.cpp.
Referenced by lineToSld().
|
static |
Definition at line 428 of file qgssymbollayerv2utils.cpp.
Referenced by lineToSld().
|
static |
Definition at line 356 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
Referenced by QgsSymbolV2::toSld().
|
static |
Returns the maximum estimated bleed for the symbol.
Definition at line 508 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2::estimateMaxBleed(), QgsSymbolV2::symbolLayer(), and QgsSymbolV2::symbolLayerCount().
Referenced by QgsPaperItem::calculatePageMargin(), QgsComposerShape::drawShapeUsingSymbol(), and QgsComposerShape::estimatedFrameBleed().
|
static |
Definition at line 1825 of file qgssymbollayerv2utils.cpp.
References onlineResourceFromSldElement(), and QgsDebugMsg.
Referenced by QgsSvgMarkerSymbolLayerV2::createFromSld(), and QgsSVGFillSymbolLayer::createFromSld().
|
static |
Definition at line 1805 of file qgssymbollayerv2utils.cpp.
References createOnlineResourceElement().
Referenced by QgsSVGFillSymbolLayer::toSld(), and QgsSvgMarkerSymbolLayerV2::writeSldMarker().
|
static |
Definition at line 1880 of file qgssymbollayerv2utils.cpp.
References fillFromSld(), onlineResourceFromSldElement(), and QgsDebugMsg.
Referenced by QgsFontMarkerSymbolLayerV2::createFromSld().
|
static |
Definition at line 1850 of file qgssymbollayerv2utils.cpp.
References createOnlineResourceElement(), fillToSld(), and qgsDoubleNear().
Referenced by QgsFontMarkerSymbolLayerV2::writeSldMarker().
|
static |
Return a field name if the whole expression is just a name of the field .
Returns full expression string if the expression is more complex than just one field. Using just expression->expression() method may return quoted field name, but that is not wanted for saving (due to backward compatibility) or display in GUI.
Definition at line 2991 of file qgssymbollayerv2utils.cpp.
References QgsExpression::expression(), QgsExpression::Node::nodeType(), QgsExpression::ntColumnRef, and QgsExpression::rootNode().
Referenced by QgsSingleSymbolRendererV2::rotationField(), QgsCategorizedSymbolRendererV2::rotationField(), QgsGraduatedSymbolRendererV2::rotationField(), QgsSingleSymbolRendererV2::save(), QgsCategorizedSymbolRendererV2::save(), QgsGraduatedSymbolRendererV2::save(), QgsSingleSymbolRendererV2::sizeScaleField(), QgsCategorizedSymbolRendererV2::sizeScaleField(), and QgsGraduatedSymbolRendererV2::sizeScaleField().
|
static |
Return a new valid expression instance for given field or expression string.
If the input is not a valid expression, it is assumed that it is a field name and gets properly quoted. If the string is empty, returns null pointer. This is useful when accepting input which could be either a non-quoted field name or expression.
Definition at line 2975 of file qgssymbollayerv2utils.cpp.
References QgsExpression::hasParserError(), and QgsExpression::quotedColumnRef().
Referenced by QgsSingleSymbolRendererV2::setRotationField(), QgsCategorizedSymbolRendererV2::setRotationField(), QgsGraduatedSymbolRendererV2::setRotationField(), QgsSingleSymbolRendererV2::setSizeScaleField(), QgsCategorizedSymbolRendererV2::setSizeScaleField(), QgsGraduatedSymbolRendererV2::setSizeScaleField(), QgsGraduatedSymbolRendererV2::usedAttributes(), and QgsCategorizedSymbolRendererV2::usedAttributes().
|
static |
Definition at line 1543 of file qgssymbollayerv2utils.cpp.
References decodeSldAlpha(), decodeSldBrushStyle(), getSvgParameterList(), QgsDebugMsg, size, and wellKnownMarkerFromSld().
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSimpleFillSymbolLayerV2::createFromSld(), externalMarkerFromSld(), and wellKnownMarkerFromSld().
|
static |
Definition at line 1492 of file qgssymbollayerv2utils.cpp.
References createSvgParameterElement(), encodeSldAlpha(), encodeSldBrushStyle(), and wellKnownMarkerToSld().
Referenced by externalMarkerToSld(), labelTextToSld(), QgsSimpleFillSymbolLayerV2::toSld(), and wellKnownMarkerToSld().
|
static |
Definition at line 2279 of file qgssymbollayerv2utils.cpp.
References QgsExpression::expression(), QgsOgcUtils::expressionFromOgcFilter(), QgsExpression::hasParserError(), QgsExpression::parserErrorString(), and QgsDebugMsg.
Referenced by geometryFromSldElement(), opacityFromSldElement(), and rotationFromSldElement().
|
static |
Definition at line 2255 of file qgssymbollayerv2utils.cpp.
References functionFromSldElement().
|
static |
Definition at line 2343 of file qgssymbollayerv2utils.cpp.
Referenced by fillFromSld(), and lineFromSld().
|
static |
Definition at line 2373 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::createFromSld(), QgsMarkerLineSymbolLayerV2::createFromSld(), and needEllipseMarker().
|
static |
Definition at line 1043 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by needSvgFill(), and needSvgMarker().
|
static |
Definition at line 1084 of file qgssymbollayerv2utils.cpp.
Referenced by needMarkerLine().
|
static |
Definition at line 2110 of file qgssymbollayerv2utils.cpp.
References createSvgParameterElement(), encodeSldFontStyle(), encodeSldFontWeight(), and fillToSld().
|
static |
Definition at line 1674 of file qgssymbollayerv2utils.cpp.
References decodeSldAlpha(), decodeSldLineCapStyle(), decodeSldLineJoinStyle(), decodeSldRealVector(), getSvgParameterList(), and QgsDebugMsg.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSimpleFillSymbolLayerV2::createFromSld(), QgsSimpleLineSymbolLayerV2::createFromSld(), QgsSVGFillSymbolLayer::createFromSld(), and wellKnownMarkerFromSld().
|
static |
Definition at line 1597 of file qgssymbollayerv2utils.cpp.
References createSvgParameterElement(), encodeSldAlpha(), encodeSldLineCapStyle(), encodeSldLineJoinStyle(), encodeSldRealVector(), and qgsDoubleNear().
Referenced by QgsSimpleFillSymbolLayerV2::toSld(), QgsSimpleLineSymbolLayerV2::toSld(), QgsSVGFillSymbolLayer::toSld(), and wellKnownMarkerToSld().
|
static |
Returns the line width scale factor depending on the unit and the paint device.
Definition at line 2575 of file qgssymbollayerv2utils.cpp.
References QgsRenderContext::mapToPixel(), QgsMapToPixel::mapUnitsPerPixel(), QgsSymbolV2::MM, and QgsRenderContext::scaleFactor().
Referenced by QgsSimpleFillSymbolLayerV2::applyDataDefinedSymbology(), QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology(), QgsSVGFillSymbolLayer::applyPattern(), QgsSimpleLineSymbolLayerV2::dxfWidth(), QgsMarkerSymbolLayerV2::markerOffset(), QgsSymbolV2RenderContext::outputLineWidth(), QgsSimpleMarkerSymbolLayerV2::prepareCache(), QgsEllipseSymbolLayerV2::preparePath(), QgsPointDisplacementRenderer::renderFeature(), QgsEllipseSymbolLayerV2::renderPoint(), QgsSimpleMarkerSymbolLayerV2::renderPoint(), QgsVectorFieldSymbolLayer::renderPoint(), QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsSimpleFillSymbolLayerV2::renderPolygon(), QgsGradientFillSymbolLayerV2::renderPolygon(), QgsSimpleLineSymbolLayerV2::renderPolyline(), QgsMarkerLineSymbolLayerV2::renderPolyline(), QgsMarkerLineSymbolLayerV2::renderPolylineInterval(), QgsEllipseSymbolLayerV2::startRender(), QgsSimpleFillSymbolLayerV2::startRender(), QgsSimpleLineSymbolLayerV2::startRender(), QgsSimpleMarkerSymbolLayerV2::startRender(), QgsFontMarkerSymbolLayerV2::startRender(), and QgsSimpleMarkerSymbolLayerV2::writeDxf().
|
static |
Return a list of all available svg files.
Definition at line 2796 of file qgssymbollayerv2utils.cpp.
References QgsApplication::svgPaths().
|
static |
Return a list of svg files at the specified directory.
Definition at line 2820 of file qgssymbollayerv2utils.cpp.
|
static |
Definition at line 2528 of file qgssymbollayerv2utils.cpp.
References QgsVectorGradientColorRampV2::create(), QgsVectorRandomColorRampV2::create(), QgsVectorColorBrewerColorRampV2::create(), QgsCptCityColorRampV2::create(), parseProperties(), and QgsDebugMsg.
Referenced by QgsCategorizedSymbolRendererV2::create(), QgsGraduatedSymbolRendererV2::create(), QgsStyleV2::importXML(), and QgsStyleV2::load().
|
static |
Definition at line 696 of file qgssymbollayerv2utils.cpp.
References decodeOutputUnit(), loadSymbolLayer(), QgsDebugMsg, QgsSymbolV2::setAlpha(), QgsSymbolV2::setOutputUnit(), and QgsSymbolLayerV2::setSubSymbol().
Referenced by QgsAnnotationItem::_readXML(), QgsPointDisplacementRenderer::create(), QgsStyleV2::importXML(), QgsStyleV2::load(), loadSymbols(), QgsComposerShape::readXML(), QgsComposerMap::readXML(), and QgsComposition::readXML().
|
static |
Definition at line 764 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayer(), QgsSymbolLayerV2Registry::instance(), parseProperties(), QgsDebugMsg, QgsSymbolLayerV2::setLocked(), and QgsSymbolLayerV2::setRenderingPass().
Referenced by loadSymbol().
|
static |
Definition at line 2426 of file qgssymbollayerv2utils.cpp.
References loadSymbol(), QgsDebugMsg, QgsSymbolLayerV2::setSubSymbol(), QgsSymbolV2::symbolLayer(), and QgsSymbolV2::symbolLayerCount().
Referenced by QgsSingleSymbolRendererV2::create(), QgsCategorizedSymbolRendererV2::create(), QgsGraduatedSymbolRendererV2::create(), QgsRuleBasedRendererV2::create(), QgsStyleV2::importXML(), and QgsComposerSymbolV2Item::readXML().
|
static |
Multiplies opacity of image pixel values with a (global) transparency value.
Definition at line 2632 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by QgsSVGFillSymbolLayer::applyPattern(), QgsLinePatternFillSymbolLayer::applyPattern(), QgsPointPatternFillSymbolLayer::applyPattern(), and QgsSvgMarkerSymbolLayerV2::renderPoint().
|
static |
Definition at line 1147 of file qgssymbollayerv2utils.cpp.
References getVendorOptionList().
Referenced by createMarkerLayerFromSld().
|
static |
Definition at line 1102 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by createMarkerLayerFromSld().
|
static |
Definition at line 1178 of file qgssymbollayerv2utils.cpp.
References MathUtils::angle(), rotationFromSldElement(), size, and wellKnownMarkerFromSld().
Referenced by createFillLayerFromSld().
|
static |
Definition at line 1165 of file qgssymbollayerv2utils.cpp.
References hasWellKnownMark().
Referenced by createLineLayerFromSld().
|
static |
Definition at line 1216 of file qgssymbollayerv2utils.cpp.
Referenced by createFillLayerFromSld().
|
static |
Definition at line 1222 of file qgssymbollayerv2utils.cpp.
References hasExternalGraphic().
Referenced by createFillLayerFromSld().
|
static |
Definition at line 1142 of file qgssymbollayerv2utils.cpp.
References hasExternalGraphic().
Referenced by createMarkerLayerFromSld().
|
static |
Create ogr feature style string for brush.
fillColr | fill color |
Definition at line 2211 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleFillSymbolLayerV2::ogrFeatureStyle().
|
static |
Create ogr feature style string for pen.
Definition at line 2137 of file qgssymbollayerv2utils.cpp.
References qgsDoubleNear().
Referenced by QgsSimpleFillSymbolLayerV2::ogrFeatureStyle(), and QgsSimpleLineSymbolLayerV2::ogrFeatureStyle().
|
static |
Definition at line 2316 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by externalGraphicFromSld(), and externalMarkerFromSld().
|
static |
Definition at line 2053 of file qgssymbollayerv2utils.cpp.
References functionFromSldElement().
|
static |
parse color definition with format "rgb(0,0,0)" or "0,0,0"
Definition at line 2563 of file qgssymbollayerv2utils.cpp.
Referenced by QgsCptCityArchive::gradientColorMap(), and QgsColorBrewerPalette::listSchemeColors().
|
static |
Definition at line 2393 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by loadColorRamp(), and loadSymbolLayer().
|
static |
Returns scale factor painter units -> pixel dimensions.
Definition at line 2596 of file qgssymbollayerv2utils.cpp.
References QgsRenderContext::mapToPixel(), QgsMapToPixel::mapUnitsPerPixel(), QgsSymbolV2::MM, QgsRenderContext::rasterScaleFactor(), and QgsRenderContext::scaleFactor().
Referenced by QgsSVGFillSymbolLayer::applyPattern(), QgsLinePatternFillSymbolLayer::applyPattern(), QgsPointPatternFillSymbolLayer::applyPattern(), and QgsSymbolV2RenderContext::outputPixelSize().
|
static |
Returns a point on the line from startPoint to directionPoint that is a certain distance away from the starting point.
Definition at line 2786 of file qgssymbollayerv2utils.cpp.
Referenced by QgsLinePatternFillSymbolLayer::applyPattern(), QgsComposerMap::drawGrid(), and QgsComposerItem::imageSizeConsideringRotation().
|
static |
Calculate the centroid point of a QPolygonF.
Definition at line 2953 of file qgssymbollayerv2utils.cpp.
Referenced by QgsGradientFillSymbolLayerV2::applyDataDefinedSymbology(), and QgsCentroidFillSymbolLayerV2::renderPolygon().
|
static |
Definition at line 2032 of file qgssymbollayerv2utils.cpp.
References functionFromSldElement().
Referenced by convertPolygonSymbolizerToPointMarker(), QgsEllipseSymbolLayerV2::createFromSld(), QgsSimpleMarkerSymbolLayerV2::createFromSld(), QgsSvgMarkerSymbolLayerV2::createFromSld(), QgsFontMarkerSymbolLayerV2::createFromSld(), QgsSVGFillSymbolLayer::createFromSld(), QgsLinePatternFillSymbolLayer::createFromSld(), and needLinePatternFill().
|
static |
Definition at line 2551 of file qgssymbollayerv2utils.cpp.
References QgsVectorColorRampV2::properties(), saveProperties(), and QgsVectorColorRampV2::type().
Referenced by QgsCategorizedSymbolRendererV2::save(), and QgsGraduatedSymbolRendererV2::save().
|
static |
Definition at line 2415 of file qgssymbollayerv2utils.cpp.
Referenced by saveColorRamp(), and saveSymbol().
|
static |
Definition at line 799 of file qgssymbollayerv2utils.cpp.
References _nameForSymbolType(), QgsSymbolV2::alpha(), QgsSymbolLayerV2::isLocked(), QgsSymbolLayerV2::layerType(), QgsSymbolLayerV2::properties(), QgsDebugMsg, QgsSymbolLayerV2::renderingPass(), saveProperties(), QgsSymbolLayerV2::subSymbol(), QgsSymbolV2::symbolLayer(), QgsSymbolV2::symbolLayerCount(), and QgsSymbolV2::type().
Referenced by QgsAnnotationItem::_writeXML(), QgsPointDisplacementRenderer::save(), saveSymbols(), QgsComposerShape::writeXML(), QgsComposerMap::writeXML(), and QgsComposition::writeXML().
|
static |
Definition at line 2504 of file qgssymbollayerv2utils.cpp.
References saveSymbol().
Referenced by QgsStyleV2::exportXML(), QgsSingleSymbolRendererV2::save(), QgsCategorizedSymbolRendererV2::save(), QgsGraduatedSymbolRendererV2::save(), QgsRuleBasedRendererV2::save(), QgsStyleV2::save(), and QgsComposerSymbolV2Item::writeXML().
|
static |
Sorts the passed list in requested order.
Definition at line 2772 of file qgssymbollayerv2utils.cpp.
References qgsVariantGreaterThan(), and qgsVariantLessThan().
|
static |
Definition at line 521 of file qgssymbollayerv2utils.cpp.
References createRenderContext(), and QgsSymbolLayerV2::drawPreviewIcon().
|
static |
Get symbol's path from its name.
If the name is not absolute path the file is searched in SVG paths specified in settings svg/searchPathsForSVG.
Definition at line 2845 of file qgssymbollayerv2utils.cpp.
References QgsProject::instance(), QgsDebugMsg, and QgsApplication::svgPaths().
Referenced by QgsSVGFillSymbolLayer::create(), QgsPalLabeling::drawLabelBackground(), QgsSvgCache::insertSVG(), and QgsSvgMarkerSymbolLayerV2::QgsSvgMarkerSymbolLayerV2().
|
static |
Get symbols's name from its path.
Definition at line 2922 of file qgssymbollayerv2utils.cpp.
References QgsProject::instance(), QgsApplication::svgPaths(), and QgsProject::writePath().
Referenced by createOnlineResourceElement(), QgsSvgMarkerSymbolLayerV2::properties(), and QgsSVGFillSymbolLayer::properties().
|
static |
Definition at line 489 of file qgssymbollayerv2utils.cpp.
References symbolPreviewPixmap().
Referenced by QgsLegendModel::addVectorLayerItemsV2(), and QgsComposerSymbolV2Item::readXML().
|
static |
Definition at line 494 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::drawPreviewIcon().
Referenced by QgsSingleSymbolRendererV2::legendSymbologyItems(), QgsCategorizedSymbolRendererV2::legendSymbologyItems(), QgsGraduatedSymbolRendererV2::legendSymbologyItems(), QgsRuleBasedRendererV2::legendSymbologyItems(), and symbolPreviewIcon().
|
static |
Definition at line 1967 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::createFromSld(), QgsSimpleMarkerSymbolLayerV2::createFromSld(), QgsLinePatternFillSymbolLayer::createFromSld(), fillFromSld(), and needLinePatternFill().
|
static |
Definition at line 1975 of file qgssymbollayerv2utils.cpp.
References fillFromSld(), lineFromSld(), and QgsDebugMsg.
|
static |
Definition at line 1924 of file qgssymbollayerv2utils.cpp.
Referenced by fillToSld(), QgsLinePatternFillSymbolLayer::toSld(), QgsEllipseSymbolLayerV2::writeSldMarker(), and QgsSimpleMarkerSymbolLayerV2::writeSldMarker().
|
static |
Definition at line 1931 of file qgssymbollayerv2utils.cpp.
References fillToSld(), lineToSld(), and qgsDoubleNear().