Quantum GIS API Documentation
1.8
|
#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 QIcon | symbolPreviewIcon (QgsSymbolV2 *symbol, QSize size) |
static QIcon | symbolLayerPreviewIcon (QgsSymbolLayerV2 *layer, QgsSymbolV2::OutputUnit u, QSize size) |
static QIcon | colorRampPreviewIcon (QgsVectorColorRampV2 *ramp, QSize size) |
static QPixmap | symbolPreviewPixmap (QgsSymbolV2 *symbol, QSize size) |
static QPixmap | colorRampPreviewPixmap (QgsVectorColorRampV2 *ramp, QSize size) |
static QgsSymbolV2 * | loadSymbol (QDomElement &element) |
static QgsSymbolLayerV2 * | loadSymbolLayer (QDomElement &element) |
static QDomElement | saveSymbol (QString name, QgsSymbolV2 *symbol, QDomDocument &doc, QgsSymbolV2Map *subSymbols=NULL) |
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 void | wellKnownMarkerToSld (QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor=QColor(), double borderWidth=-1, double size=-1) |
static bool | wellKnownMarkerFromSld (QDomElement &element, QString &name, QColor &color, QColor &borderColor, 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 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 double | lineWidthScaleFactor (QgsRenderContext &c, QgsSymbolV2::OutputUnit u) |
Returns the line width scale factor depending on the unit and the paint device. | |
static double | pixelSizeScaleFactor (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 | 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. |
Definition at line 41 of file qgssymbollayerv2utils.h.
void QgsSymbolLayerV2Utils::clearSymbolMap | ( | QgsSymbolV2Map & | symbols | ) | [static] |
Definition at line 2281 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSingleSymbolRendererV2::create(), QgsCategorizedSymbolRendererV2::create(), QgsGraduatedSymbolRendererV2::create(), and QgsRuleBasedRendererV2::create().
QIcon QgsSymbolLayerV2Utils::colorRampPreviewIcon | ( | QgsVectorColorRampV2 * | ramp, |
QSize | size | ||
) | [static] |
Definition at line 485 of file qgssymbollayerv2utils.cpp.
References colorRampPreviewPixmap().
QPixmap QgsSymbolLayerV2Utils::colorRampPreviewPixmap | ( | QgsVectorColorRampV2 * | ramp, |
QSize | size | ||
) | [static] |
Definition at line 490 of file qgssymbollayerv2utils.cpp.
References QgsVectorColorRampV2::color().
Referenced by colorRampPreviewIcon().
bool QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker | ( | QDomElement & | element, |
QgsSymbolLayerV2List & | layerList | ||
) | [static] |
Definition at line 1106 of file qgssymbollayerv2utils.cpp.
References MathUtils::angle(), decodeSldAlpha(), displacementFromSldElement(), doubleNear(), encodeColor(), encodePoint(), fillFromSld(), QgsSymbolLayerV2Registry::instance(), lineFromSld(), QgsDebugMsg, rotationFromSldElement(), and size.
Referenced by createSymbolLayerV2ListFromSld().
void QgsSymbolLayerV2Utils::createDisplacementElement | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QPointF | offset | ||
) | [static] |
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::createFillLayerFromSld | ( | QDomElement & | element | ) | [static] |
Definition at line 889 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), needLinePatternFill(), needPointPatternFill(), needSvgFill(), and QgsDebugMsg.
Referenced by createSymbolLayerV2ListFromSld().
bool QgsSymbolLayerV2Utils::createFunctionElement | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | function | ||
) | [static] |
Definition at line 2022 of file qgssymbollayerv2utils.cpp.
References QgsExpression::hasParserError(), QgsExpression::parserErrorString(), and QgsExpression::toOgcFilter().
Referenced by createGeometryElement(), createOpacityElement(), createRotationElement(), QgsRendererRangeV2::toSld(), QgsRendererCategoryV2::toSld(), QgsRuleBasedRendererV2::Rule::toSld(), and QgsMarkerLineSymbolLayerV2::toSld().
void QgsSymbolLayerV2Utils::createGeometryElement | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | geomFunc | ||
) | [static] |
Definition at line 1979 of file qgssymbollayerv2utils.cpp.
References createFunctionElement().
Referenced by QgsEllipseSymbolLayerV2::toSld(), QgsSimpleLineSymbolLayerV2::toSld(), QgsSimpleFillSymbolLayerV2::toSld(), QgsMarkerSymbolLayerV2::toSld(), QgsSVGFillSymbolLayer::toSld(), QgsMarkerLineSymbolLayerV2::toSld(), QgsLinePatternFillSymbolLayer::toSld(), QgsLineDecorationSymbolLayerV2::toSld(), and QgsPointPatternFillSymbolLayer::toSld().
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::createLineLayerFromSld | ( | QDomElement & | element | ) | [static] |
Definition at line 912 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), needMarkerLine(), and QgsDebugMsg.
Referenced by QgsSVGFillSymbolLayer::createFromSld(), and createSymbolLayerV2ListFromSld().
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::createMarkerLayerFromSld | ( | QDomElement & | element | ) | [static] |
Definition at line 931 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayerFromSld(), QgsSymbolLayerV2Registry::instance(), needEllipseMarker(), needFontMarker(), needSvgMarker(), and QgsDebugMsg.
Referenced by QgsMarkerLineSymbolLayerV2::createFromSld(), QgsCentroidFillSymbolLayerV2::createFromSld(), and createSymbolLayerV2ListFromSld().
void QgsSymbolLayerV2Utils::createOnlineResourceElement | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | path, | ||
QString | format | ||
) | [static] |
Definition at line 2057 of file qgssymbollayerv2utils.cpp.
Referenced by externalGraphicToSld(), and externalMarkerToSld().
void QgsSymbolLayerV2Utils::createOpacityElement | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | alphaFunc | ||
) | [static] |
Definition at line 1885 of file qgssymbollayerv2utils.cpp.
References createFunctionElement().
QgsRenderContext QgsSymbolLayerV2Utils::createRenderContext | ( | QPainter * | p | ) | [static] |
Creates a render context for a pixel based device.
Definition at line 2363 of file qgssymbollayerv2utils.cpp.
References QgsRenderContext::setPainter(), QgsRenderContext::setRasterScaleFactor(), and QgsRenderContext::setScaleFactor().
Referenced by QgsSymbolV2::bigSymbolPreviewImage(), QgsSymbolV2::drawPreviewIcon(), and symbolLayerPreviewIcon().
void QgsSymbolLayerV2Utils::createRotationElement | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | rotationFunc | ||
) | [static] |
Definition at line 1864 of file qgssymbollayerv2utils.cpp.
References createFunctionElement().
Referenced by QgsSVGFillSymbolLayer::toSld(), QgsLinePatternFillSymbolLayer::toSld(), QgsLineDecorationSymbolLayerV2::toSld(), QgsEllipseSymbolLayerV2::writeSldMarker(), QgsSimpleMarkerSymbolLayerV2::writeSldMarker(), QgsSvgMarkerSymbolLayerV2::writeSldMarker(), and QgsFontMarkerSymbolLayerV2::writeSldMarker().
QDomElement QgsSymbolLayerV2Utils::createSvgParameterElement | ( | QDomDocument & | doc, |
QString | name, | ||
QString | value | ||
) | [static] |
Definition at line 2089 of file qgssymbollayerv2utils.cpp.
Referenced by fillToSld(), labelTextToSld(), and lineToSld().
bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld | ( | QDomElement & | element, |
QGis::GeometryType | geomType, | ||
QgsSymbolLayerV2List & | layers | ||
) | [static] |
Definition at line 741 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().
QDomElement QgsSymbolLayerV2Utils::createVendorOptionElement | ( | QDomDocument & | doc, |
QString | name, | ||
QString | value | ||
) | [static] |
Definition at line 2119 of file qgssymbollayerv2utils.cpp.
Referenced by QgsMarkerLineSymbolLayerV2::toSld(), QgsLineDecorationSymbolLayerV2::toSld(), QgsPointPatternFillSymbolLayer::toSld(), and QgsEllipseSymbolLayerV2::writeSldMarker().
Qt::BrushStyle QgsSymbolLayerV2Utils::decodeBrushStyle | ( | QString | str | ) | [static] |
Definition at line 243 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleFillSymbolLayerV2::create(), and decodeSldBrushStyle().
QColor QgsSymbolLayerV2Utils::decodeColor | ( | QString | str | ) | [static] |
Definition at line 40 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::create(), QgsSimpleLineSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsVectorGradientColorRampV2::create(), QgsPointDisplacementRenderer::create(), QgsLinePatternFillSymbolLayer::create(), QgsFontMarkerSymbolLayerV2::create(), and QgsLineDecorationSymbolLayerV2::create().
QgsSymbolV2::OutputUnit QgsSymbolLayerV2Utils::decodeOutputUnit | ( | QString | str | ) | [static] |
Definition at line 335 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
Referenced by loadSymbol().
Qt::PenCapStyle QgsSymbolLayerV2Utils::decodePenCapStyle | ( | QString | str | ) | [static] |
Definition at line 193 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::create().
Qt::PenJoinStyle QgsSymbolLayerV2Utils::decodePenJoinStyle | ( | QString | str | ) | [static] |
Definition at line 155 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::create().
Qt::PenStyle QgsSymbolLayerV2Utils::decodePenStyle | ( | QString | str | ) | [static] |
Definition at line 133 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::create(), and QgsSimpleFillSymbolLayerV2::create().
QPointF QgsSymbolLayerV2Utils::decodePoint | ( | QString | str | ) | [static] |
Definition at line 314 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleFillSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsSvgMarkerSymbolLayerV2::create(), and QgsFontMarkerSymbolLayerV2::create().
QVector< qreal > QgsSymbolLayerV2Utils::decodeRealVector | ( | const QString & | s | ) | [static] |
Definition at line 408 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::create().
int QgsSymbolLayerV2Utils::decodeSldAlpha | ( | QString | str | ) | [static] |
Definition at line 64 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), fillFromSld(), and lineFromSld().
Qt::BrushStyle QgsSymbolLayerV2Utils::decodeSldBrushStyle | ( | QString | str | ) | [static] |
Definition at line 294 of file qgssymbollayerv2utils.cpp.
References decodeBrushStyle().
Referenced by fillFromSld().
QFont::Style QgsSymbolLayerV2Utils::decodeSldFontStyle | ( | QString | str | ) | [static] |
Definition at line 86 of file qgssymbollayerv2utils.cpp.
int QgsSymbolLayerV2Utils::decodeSldFontWeight | ( | QString | str | ) | [static] |
Definition at line 106 of file qgssymbollayerv2utils.cpp.
Qt::PenCapStyle QgsSymbolLayerV2Utils::decodeSldLineCapStyle | ( | QString | str | ) | [static] |
Definition at line 212 of file qgssymbollayerv2utils.cpp.
Referenced by lineFromSld().
Qt::PenJoinStyle QgsSymbolLayerV2Utils::decodeSldLineJoinStyle | ( | QString | str | ) | [static] |
Definition at line 174 of file qgssymbollayerv2utils.cpp.
Referenced by lineFromSld().
QVector< qreal > QgsSymbolLayerV2Utils::decodeSldRealVector | ( | const QString & | s | ) | [static] |
Definition at line 437 of file qgssymbollayerv2utils.cpp.
Referenced by lineFromSld().
QgsSymbolV2::OutputUnit QgsSymbolLayerV2Utils::decodeSldUom | ( | QString | str, |
double * | scaleFactor | ||
) | [static] |
Definition at line 371 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
bool QgsSymbolLayerV2Utils::displacementFromSldElement | ( | QDomElement & | element, |
QPointF & | offset | ||
) | [static] |
QString QgsSymbolLayerV2Utils::encodeBrushStyle | ( | Qt::BrushStyle | style | ) | [static] |
Definition at line 220 of file qgssymbollayerv2utils.cpp.
Referenced by encodeSldBrushStyle(), and QgsSimpleFillSymbolLayerV2::properties().
QString QgsSymbolLayerV2Utils::encodeColor | ( | QColor | color | ) | [static] |
Definition at line 35 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSymbolV2::dump(), QgsEllipseSymbolLayerV2::properties(), QgsSimpleLineSymbolLayerV2::properties(), QgsSimpleFillSymbolLayerV2::properties(), QgsVectorGradientColorRampV2::properties(), QgsSimpleMarkerSymbolLayerV2::properties(), QgsLinePatternFillSymbolLayer::properties(), QgsFontMarkerSymbolLayerV2::properties(), QgsLineDecorationSymbolLayerV2::properties(), and QgsPointDisplacementRenderer::save().
QString QgsSymbolLayerV2Utils::encodeOutputUnit | ( | QgsSymbolV2::OutputUnit | unit | ) | [static] |
Definition at line 322 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
Referenced by saveSymbol().
QString QgsSymbolLayerV2Utils::encodePenCapStyle | ( | Qt::PenCapStyle | style | ) | [static] |
Definition at line 182 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties().
QString QgsSymbolLayerV2Utils::encodePenJoinStyle | ( | Qt::PenJoinStyle | style | ) | [static] |
Definition at line 144 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties().
QString QgsSymbolLayerV2Utils::encodePenStyle | ( | Qt::PenStyle | style | ) | [static] |
Definition at line 119 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties(), and QgsSimpleFillSymbolLayerV2::properties().
QString QgsSymbolLayerV2Utils::encodePoint | ( | QPointF | point | ) | [static] |
Definition at line 309 of file qgssymbollayerv2utils.cpp.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSimpleFillSymbolLayerV2::properties(), QgsSimpleMarkerSymbolLayerV2::properties(), QgsSvgMarkerSymbolLayerV2::properties(), QgsFontMarkerSymbolLayerV2::properties(), and QgsPointPatternFillSymbolLayer::toSld().
QString QgsSymbolLayerV2Utils::encodeRealVector | ( | const QVector< qreal > & | v | ) | [static] |
Definition at line 393 of file qgssymbollayerv2utils.cpp.
Referenced by QgsSimpleLineSymbolLayerV2::properties().
QString QgsSymbolLayerV2Utils::encodeSldAlpha | ( | int | alpha | ) | [static] |
Definition at line 59 of file qgssymbollayerv2utils.cpp.
Referenced by fillToSld(), and lineToSld().
QString QgsSymbolLayerV2Utils::encodeSldBrushStyle | ( | Qt::BrushStyle | style | ) | [static] |
Definition at line 263 of file qgssymbollayerv2utils.cpp.
References encodeBrushStyle().
Referenced by fillToSld().
QString QgsSymbolLayerV2Utils::encodeSldFontStyle | ( | QFont::Style | style | ) | [static] |
Definition at line 75 of file qgssymbollayerv2utils.cpp.
Referenced by labelTextToSld().
QString QgsSymbolLayerV2Utils::encodeSldFontWeight | ( | int | weight | ) | [static] |
Definition at line 94 of file qgssymbollayerv2utils.cpp.
Referenced by labelTextToSld().
QString QgsSymbolLayerV2Utils::encodeSldLineCapStyle | ( | Qt::PenCapStyle | style | ) | [static] |
Definition at line 201 of file qgssymbollayerv2utils.cpp.
Referenced by lineToSld().
QString QgsSymbolLayerV2Utils::encodeSldLineJoinStyle | ( | Qt::PenJoinStyle | style | ) | [static] |
Definition at line 163 of file qgssymbollayerv2utils.cpp.
Referenced by lineToSld().
QString QgsSymbolLayerV2Utils::encodeSldRealVector | ( | const QVector< qreal > & | v | ) | [static] |
Definition at line 422 of file qgssymbollayerv2utils.cpp.
Referenced by lineToSld().
QString QgsSymbolLayerV2Utils::encodeSldUom | ( | QgsSymbolV2::OutputUnit | unit, |
double * | scaleFactor | ||
) | [static] |
Definition at line 350 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.
Referenced by QgsSymbolV2::toSld().
bool QgsSymbolLayerV2Utils::externalGraphicFromSld | ( | QDomElement & | element, |
QString & | path, | ||
QString & | mime, | ||
QColor & | color, | ||
double & | size | ||
) | [static] |
Definition at line 1681 of file qgssymbollayerv2utils.cpp.
References onlineResourceFromSldElement(), and QgsDebugMsg.
Referenced by QgsSvgMarkerSymbolLayerV2::createFromSld(), and QgsSVGFillSymbolLayer::createFromSld().
void QgsSymbolLayerV2Utils::externalGraphicToSld | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | path, | ||
QString | mime, | ||
QColor | color, | ||
double | size = -1 |
||
) | [static] |
Definition at line 1661 of file qgssymbollayerv2utils.cpp.
References createOnlineResourceElement().
Referenced by QgsSVGFillSymbolLayer::toSld(), and QgsSvgMarkerSymbolLayerV2::writeSldMarker().
bool QgsSymbolLayerV2Utils::externalMarkerFromSld | ( | QDomElement & | element, |
QString & | path, | ||
QString & | format, | ||
int & | markIndex, | ||
QColor & | color, | ||
double & | size | ||
) | [static] |
Definition at line 1736 of file qgssymbollayerv2utils.cpp.
References fillFromSld(), onlineResourceFromSldElement(), and QgsDebugMsg.
Referenced by QgsFontMarkerSymbolLayerV2::createFromSld().
void QgsSymbolLayerV2Utils::externalMarkerToSld | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | path, | ||
QString | format, | ||
int * | markIndex = 0 , |
||
QColor | color = QColor() , |
||
double | size = -1 |
||
) | [static] |
Definition at line 1706 of file qgssymbollayerv2utils.cpp.
References createOnlineResourceElement(), doubleNear(), and fillToSld().
Referenced by QgsFontMarkerSymbolLayerV2::writeSldMarker().
bool QgsSymbolLayerV2Utils::fillFromSld | ( | QDomElement & | element, |
Qt::BrushStyle & | brushStyle, | ||
QColor & | color | ||
) | [static] |
Definition at line 1411 of file qgssymbollayerv2utils.cpp.
References decodeSldAlpha(), decodeSldBrushStyle(), getSvgParameterList(), QgsDebugMsg, size, and wellKnownMarkerFromSld().
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSimpleFillSymbolLayerV2::createFromSld(), externalMarkerFromSld(), and wellKnownMarkerFromSld().
void QgsSymbolLayerV2Utils::fillToSld | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
Qt::BrushStyle | brushStyle, | ||
QColor | color = QColor() |
||
) | [static] |
Definition at line 1360 of file qgssymbollayerv2utils.cpp.
References createSvgParameterElement(), encodeSldAlpha(), encodeSldBrushStyle(), and wellKnownMarkerToSld().
Referenced by externalMarkerToSld(), labelTextToSld(), QgsSimpleFillSymbolLayerV2::toSld(), and wellKnownMarkerToSld().
bool QgsSymbolLayerV2Utils::functionFromSldElement | ( | QDomElement & | element, |
QString & | function | ||
) | [static] |
Definition at line 2035 of file qgssymbollayerv2utils.cpp.
References QgsExpression::createFromOgcFilter(), QgsExpression::dump(), QgsExpression::hasParserError(), QgsExpression::parserErrorString(), and QgsDebugMsg.
Referenced by geometryFromSldElement(), opacityFromSldElement(), and rotationFromSldElement().
bool QgsSymbolLayerV2Utils::geometryFromSldElement | ( | QDomElement & | element, |
QString & | geomFunc | ||
) | [static] |
Definition at line 2013 of file qgssymbollayerv2utils.cpp.
References functionFromSldElement().
QgsStringMap QgsSymbolLayerV2Utils::getSvgParameterList | ( | QDomElement & | element | ) | [static] |
Definition at line 2097 of file qgssymbollayerv2utils.cpp.
Referenced by fillFromSld(), and lineFromSld().
QgsStringMap QgsSymbolLayerV2Utils::getVendorOptionList | ( | QDomElement & | element | ) | [static] |
Definition at line 2127 of file qgssymbollayerv2utils.cpp.
Referenced by QgsEllipseSymbolLayerV2::createFromSld(), QgsMarkerLineSymbolLayerV2::createFromSld(), and needEllipseMarker().
bool QgsSymbolLayerV2Utils::hasExternalGraphic | ( | QDomElement & | element | ) | [static] |
Definition at line 954 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by needSvgFill(), and needSvgMarker().
bool QgsSymbolLayerV2Utils::hasWellKnownMark | ( | QDomElement & | element | ) | [static] |
Definition at line 995 of file qgssymbollayerv2utils.cpp.
Referenced by needMarkerLine().
void QgsSymbolLayerV2Utils::labelTextToSld | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | label, | ||
QFont | font, | ||
QColor | color = QColor() , |
||
double | size = -1 |
||
) | [static] |
Definition at line 1952 of file qgssymbollayerv2utils.cpp.
References createSvgParameterElement(), encodeSldFontStyle(), encodeSldFontWeight(), and fillToSld().
bool QgsSymbolLayerV2Utils::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] |
Definition at line 1539 of file qgssymbollayerv2utils.cpp.
References decodeSldAlpha(), decodeSldLineCapStyle(), decodeSldLineJoinStyle(), decodeSldRealVector(), getSvgParameterList(), and QgsDebugMsg.
Referenced by convertPolygonSymbolizerToPointMarker(), QgsSimpleLineSymbolLayerV2::createFromSld(), QgsSimpleFillSymbolLayerV2::createFromSld(), QgsSVGFillSymbolLayer::createFromSld(), and wellKnownMarkerFromSld().
void QgsSymbolLayerV2Utils::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] |
Definition at line 1464 of file qgssymbollayerv2utils.cpp.
References createSvgParameterElement(), doubleNear(), encodeSldAlpha(), encodeSldLineCapStyle(), encodeSldLineJoinStyle(), and encodeSldRealVector().
Referenced by QgsSimpleLineSymbolLayerV2::toSld(), QgsSimpleFillSymbolLayerV2::toSld(), QgsSVGFillSymbolLayer::toSld(), and wellKnownMarkerToSld().
double QgsSymbolLayerV2Utils::lineWidthScaleFactor | ( | QgsRenderContext & | c, |
QgsSymbolV2::OutputUnit | u | ||
) | [static] |
Returns the line width scale factor depending on the unit and the paint device.
Definition at line 2322 of file qgssymbollayerv2utils.cpp.
References QgsRenderContext::mapToPixel(), QgsMapToPixel::mapUnitsPerPixel(), QgsSymbolV2::MM, and QgsRenderContext::scaleFactor().
Referenced by QgsSymbolV2RenderContext::outputLineWidth(), and QgsPointDisplacementRenderer::renderFeature().
QgsVectorColorRampV2 * QgsSymbolLayerV2Utils::loadColorRamp | ( | QDomElement & | element | ) | [static] |
Definition at line 2291 of file qgssymbollayerv2utils.cpp.
References QgsVectorGradientColorRampV2::create(), QgsVectorRandomColorRampV2::create(), QgsVectorColorBrewerColorRampV2::create(), parseProperties(), and QgsDebugMsg.
Referenced by QgsCategorizedSymbolRendererV2::create(), QgsGraduatedSymbolRendererV2::create(), and QgsStyleV2::load().
QgsSymbolV2 * QgsSymbolLayerV2Utils::loadSymbol | ( | QDomElement & | element | ) | [static] |
Definition at line 622 of file qgssymbollayerv2utils.cpp.
References decodeOutputUnit(), loadSymbolLayer(), QgsDebugMsg, QgsSymbolV2::setAlpha(), and QgsSymbolV2::setOutputUnit().
Referenced by QgsAnnotationItem::_readXML(), QgsPointDisplacementRenderer::create(), and loadSymbols().
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::loadSymbolLayer | ( | QDomElement & | element | ) | [static] |
Definition at line 673 of file qgssymbollayerv2utils.cpp.
References QgsSymbolLayerV2Registry::createSymbolLayer(), QgsSymbolLayerV2Registry::instance(), parseProperties(), QgsDebugMsg, QgsSymbolLayerV2::setLocked(), and QgsSymbolLayerV2::setRenderingPass().
Referenced by loadSymbol().
QgsSymbolV2Map QgsSymbolLayerV2Utils::loadSymbols | ( | QDomElement & | element | ) | [static] |
Definition at line 2180 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::load(), and QgsComposerSymbolV2Item::readXML().
void QgsSymbolLayerV2Utils::multiplyImageOpacity | ( | QImage * | image, |
qreal | alpha | ||
) | [static] |
Multiplies opacity of image pixel values with a (global) transparency value.
Definition at line 2379 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsSVGFillSymbolLayer::startRender(), QgsLinePatternFillSymbolLayer::startRender(), and QgsPointPatternFillSymbolLayer::startRender().
bool QgsSymbolLayerV2Utils::needEllipseMarker | ( | QDomElement & | element | ) | [static] |
Definition at line 1058 of file qgssymbollayerv2utils.cpp.
References getVendorOptionList().
Referenced by createMarkerLayerFromSld().
bool QgsSymbolLayerV2Utils::needFontMarker | ( | QDomElement & | element | ) | [static] |
Definition at line 1013 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by createMarkerLayerFromSld().
bool QgsSymbolLayerV2Utils::needLinePatternFill | ( | QDomElement & | element | ) | [static] |
Definition at line 1089 of file qgssymbollayerv2utils.cpp.
Referenced by createFillLayerFromSld().
bool QgsSymbolLayerV2Utils::needMarkerLine | ( | QDomElement & | element | ) | [static] |
Definition at line 1076 of file qgssymbollayerv2utils.cpp.
References hasWellKnownMark().
Referenced by createLineLayerFromSld().
bool QgsSymbolLayerV2Utils::needPointPatternFill | ( | QDomElement & | element | ) | [static] |
Definition at line 1090 of file qgssymbollayerv2utils.cpp.
Referenced by createFillLayerFromSld().
bool QgsSymbolLayerV2Utils::needSvgFill | ( | QDomElement & | element | ) | [static] |
Definition at line 1092 of file qgssymbollayerv2utils.cpp.
References hasExternalGraphic().
Referenced by createFillLayerFromSld().
bool QgsSymbolLayerV2Utils::needSvgMarker | ( | QDomElement & | element | ) | [static] |
Definition at line 1053 of file qgssymbollayerv2utils.cpp.
References hasExternalGraphic().
Referenced by createMarkerLayerFromSld().
bool QgsSymbolLayerV2Utils::onlineResourceFromSldElement | ( | QDomElement & | element, |
QString & | path, | ||
QString & | format | ||
) | [static] |
Definition at line 2070 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by externalGraphicFromSld(), and externalMarkerFromSld().
bool QgsSymbolLayerV2Utils::opacityFromSldElement | ( | QDomElement & | element, |
QString & | alphaFunc | ||
) | [static] |
Definition at line 1895 of file qgssymbollayerv2utils.cpp.
References functionFromSldElement().
QgsStringMap QgsSymbolLayerV2Utils::parseProperties | ( | QDomElement & | element | ) | [static] |
Definition at line 2147 of file qgssymbollayerv2utils.cpp.
References QgsDebugMsg.
Referenced by loadColorRamp(), and loadSymbolLayer().
double QgsSymbolLayerV2Utils::pixelSizeScaleFactor | ( | QgsRenderContext & | c, |
QgsSymbolV2::OutputUnit | u | ||
) | [static] |
Returns scale factor painter units -> pixel dimensions.
Definition at line 2343 of file qgssymbollayerv2utils.cpp.
References QgsRenderContext::mapToPixel(), QgsMapToPixel::mapUnitsPerPixel(), QgsSymbolV2::MM, QgsRenderContext::rasterScaleFactor(), and QgsRenderContext::scaleFactor().
Referenced by QgsSymbolV2RenderContext::outputPixelSize().
QPointF QgsSymbolLayerV2Utils::pointOnLineWithDistance | ( | const QPointF & | startPoint, |
const QPointF & | directionPoint, | ||
double | distance | ||
) | [static] |
Returns a point on the line from startPoint to directionPoint that is a certain distance away from the starting point.
Definition at line 2453 of file qgssymbollayerv2utils.cpp.
Referenced by QgsComposerMap::drawGrid(), QgsComposerItem::imageSizeConsideringRotation(), and QgsLinePatternFillSymbolLayer::startRender().
bool QgsSymbolLayerV2Utils::rotationFromSldElement | ( | QDomElement & | element, |
QString & | rotationFunc | ||
) | [static] |
Definition at line 1874 of file qgssymbollayerv2utils.cpp.
References functionFromSldElement().
Referenced by convertPolygonSymbolizerToPointMarker(), QgsEllipseSymbolLayerV2::createFromSld(), QgsSimpleMarkerSymbolLayerV2::createFromSld(), QgsSvgMarkerSymbolLayerV2::createFromSld(), QgsSVGFillSymbolLayer::createFromSld(), and QgsFontMarkerSymbolLayerV2::createFromSld().
QDomElement QgsSymbolLayerV2Utils::saveColorRamp | ( | QString | name, |
QgsVectorColorRampV2 * | ramp, | ||
QDomDocument & | doc | ||
) | [static] |
Definition at line 2312 of file qgssymbollayerv2utils.cpp.
References QgsVectorColorRampV2::properties(), saveProperties(), and QgsVectorColorRampV2::type().
Referenced by QgsStyleV2::save(), QgsCategorizedSymbolRendererV2::save(), and QgsGraduatedSymbolRendererV2::save().
void QgsSymbolLayerV2Utils::saveProperties | ( | QgsStringMap | props, |
QDomDocument & | doc, | ||
QDomElement & | element | ||
) | [static] |
Definition at line 2169 of file qgssymbollayerv2utils.cpp.
Referenced by saveColorRamp(), and saveSymbol().
QDomElement QgsSymbolLayerV2Utils::saveSymbol | ( | QString | name, |
QgsSymbolV2 * | symbol, | ||
QDomDocument & | doc, | ||
QgsSymbolV2Map * | subSymbols = NULL |
||
) | [static] |
Definition at line 708 of file qgssymbollayerv2utils.cpp.
References _nameForSymbolType(), QgsSymbolV2::alpha(), encodeOutputUnit(), QgsSymbolLayerV2::isLocked(), QgsSymbolLayerV2::layerType(), QgsSymbolV2::outputUnit(), QgsSymbolLayerV2::properties(), QgsDebugMsg, QgsSymbolLayerV2::renderingPass(), saveProperties(), QgsSymbolLayerV2::subSymbol(), QgsSymbolV2::symbolLayer(), QgsSymbolV2::symbolLayerCount(), and QgsSymbolV2::type().
Referenced by QgsAnnotationItem::_writeXML(), QgsPointDisplacementRenderer::save(), and saveSymbols().
QDomElement QgsSymbolLayerV2Utils::saveSymbols | ( | QgsSymbolV2Map & | symbols, |
QString | tagName, | ||
QDomDocument & | doc | ||
) | [static] |
Definition at line 2258 of file qgssymbollayerv2utils.cpp.
References saveSymbol().
Referenced by QgsSingleSymbolRendererV2::save(), QgsStyleV2::save(), QgsCategorizedSymbolRendererV2::save(), QgsGraduatedSymbolRendererV2::save(), QgsRuleBasedRendererV2::save(), and QgsComposerSymbolV2Item::writeXML().
void QgsSymbolLayerV2Utils::sortVariantList | ( | QList< QVariant > & | list, |
Qt::SortOrder | order | ||
) | [static] |
Sorts the passed list in requested order.
Definition at line 2441 of file qgssymbollayerv2utils.cpp.
References _QVariantGreaterThan(), and _QVariantLessThan().
QIcon QgsSymbolLayerV2Utils::symbolLayerPreviewIcon | ( | QgsSymbolLayerV2 * | layer, |
QgsSymbolV2::OutputUnit | u, | ||
QSize | size | ||
) | [static] |
Definition at line 471 of file qgssymbollayerv2utils.cpp.
References createRenderContext(), and QgsSymbolLayerV2::drawPreviewIcon().
QIcon QgsSymbolLayerV2Utils::symbolPreviewIcon | ( | QgsSymbolV2 * | symbol, |
QSize | size | ||
) | [static] |
Definition at line 451 of file qgssymbollayerv2utils.cpp.
References symbolPreviewPixmap().
Referenced by QgsLegendModel::addVectorLayerItemsV2(), and QgsComposerSymbolV2Item::readXML().
QPixmap QgsSymbolLayerV2Utils::symbolPreviewPixmap | ( | QgsSymbolV2 * | symbol, |
QSize | size | ||
) | [static] |
Definition at line 456 of file qgssymbollayerv2utils.cpp.
References QgsSymbolV2::drawPreviewIcon().
Referenced by QgsSingleSymbolRendererV2::legendSymbologyItems(), QgsCategorizedSymbolRendererV2::legendSymbologyItems(), QgsGraduatedSymbolRendererV2::legendSymbologyItems(), QgsRuleBasedRendererV2::legendSymbologyItems(), and symbolPreviewIcon().
bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld | ( | QDomElement & | element, |
QString & | name, | ||
QColor & | color, | ||
QColor & | borderColor, | ||
double & | borderWidth, | ||
double & | size | ||
) | [static] |
Definition at line 1816 of file qgssymbollayerv2utils.cpp.
References fillFromSld(), lineFromSld(), and QgsDebugMsg.
Referenced by QgsEllipseSymbolLayerV2::createFromSld(), QgsSimpleMarkerSymbolLayerV2::createFromSld(), and fillFromSld().
void QgsSymbolLayerV2Utils::wellKnownMarkerToSld | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QString | name, | ||
QColor | color, | ||
QColor | borderColor = QColor() , |
||
double | borderWidth = -1 , |
||
double | size = -1 |
||
) | [static] |
Definition at line 1780 of file qgssymbollayerv2utils.cpp.
References doubleNear(), fillToSld(), and lineToSld().
Referenced by fillToSld(), QgsLinePatternFillSymbolLayer::toSld(), QgsLineDecorationSymbolLayerV2::toSld(), QgsEllipseSymbolLayerV2::writeSldMarker(), and QgsSimpleMarkerSymbolLayerV2::writeSldMarker().