QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Static Public Member Functions | List of all members
QgsSymbolLayerV2Utils Class Reference

#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 QgsSymbolV2loadSymbol (QDomElement &element)
static QgsSymbolLayerV2loadSymbolLayer (QDomElement &element)
static QDomElement saveSymbol (QString symbolName, QgsSymbolV2 *symbol, QDomDocument &doc)
static bool createSymbolLayerV2ListFromSld (QDomElement &element, QGis::GeometryType geomType, QgsSymbolLayerV2List &layers)
static QgsSymbolLayerV2createFillLayerFromSld (QDomElement &element)
static QgsSymbolLayerV2createLineLayerFromSld (QDomElement &element)
static QgsSymbolLayerV2createMarkerLayerFromSld (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 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 QgsVectorColorRampV2loadColorRamp (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.

Detailed Description

Definition at line 41 of file qgssymbollayerv2utils.h.

Member Function Documentation

void QgsSymbolLayerV2Utils::blurImageInPlace ( QImage &  image,
const QRect &  rect,
int  radius,
bool  alphaOnly 
)
static

Blurs an image in place, e.g.

creating Qt-independent drop shadows

Note
added in 1.9

Definition at line 2637 of file qgssymbollayerv2utils.cpp.

Referenced by QgsPalLabeling::drawLabelShadow().

void QgsSymbolLayerV2Utils::clearSymbolMap ( QgsSymbolV2Map symbols)
static
QIcon QgsSymbolLayerV2Utils::colorRampPreviewIcon ( QgsVectorColorRampV2 ramp,
QSize  size 
)
static

Definition at line 523 of file qgssymbollayerv2utils.cpp.

References colorRampPreviewPixmap().

Referenced by QgsCptCityColorRampItem::icon().

QPixmap QgsSymbolLayerV2Utils::colorRampPreviewPixmap ( QgsVectorColorRampV2 ramp,
QSize  size 
)
static
bool QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker ( QDomElement &  element,
QgsSymbolLayerV2List layerList 
)
static
void QgsSymbolLayerV2Utils::createDisplacementElement ( QDomDocument &  doc,
QDomElement &  element,
QPointF  offset 
)
static
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::createFillLayerFromSld ( QDomElement &  element)
static
bool QgsSymbolLayerV2Utils::createFunctionElement ( QDomDocument &  doc,
QDomElement &  element,
QString  function 
)
static
void QgsSymbolLayerV2Utils::createGeometryElement ( QDomDocument &  doc,
QDomElement &  element,
QString  geomFunc 
)
static
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::createLineLayerFromSld ( QDomElement &  element)
static
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::createMarkerLayerFromSld ( QDomElement &  element)
static
void QgsSymbolLayerV2Utils::createOnlineResourceElement ( QDomDocument &  doc,
QDomElement &  element,
QString  path,
QString  format 
)
static

Definition at line 2269 of file qgssymbollayerv2utils.cpp.

References symbolPathToName().

Referenced by externalGraphicToSld(), and externalMarkerToSld().

void QgsSymbolLayerV2Utils::createOpacityElement ( QDomDocument &  doc,
QDomElement &  element,
QString  alphaFunc 
)
static

Definition at line 2011 of file qgssymbollayerv2utils.cpp.

References createFunctionElement().

QgsRenderContext QgsSymbolLayerV2Utils::createRenderContext ( QPainter *  p)
static
void QgsSymbolLayerV2Utils::createRotationElement ( QDomDocument &  doc,
QDomElement &  element,
QString  rotationFunc 
)
static
QDomElement QgsSymbolLayerV2Utils::createSvgParameterElement ( QDomDocument &  doc,
QString  name,
QString  value 
)
static

Definition at line 2310 of file qgssymbollayerv2utils.cpp.

Referenced by fillToSld(), labelTextToSld(), and lineToSld().

bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld ( QDomElement &  element,
QGis::GeometryType  geomType,
QgsSymbolLayerV2List layers 
)
static
QDomElement QgsSymbolLayerV2Utils::createVendorOptionElement ( QDomDocument &  doc,
QString  name,
QString  value 
)
static
Qt::BrushStyle QgsSymbolLayerV2Utils::decodeBrushStyle ( QString  str)
static
QColor QgsSymbolLayerV2Utils::decodeColor ( QString  str)
static
QgsSymbolV2::OutputUnit QgsSymbolLayerV2Utils::decodeOutputUnit ( QString  str)
static
Qt::PenCapStyle QgsSymbolLayerV2Utils::decodePenCapStyle ( QString  str)
static
Qt::PenJoinStyle QgsSymbolLayerV2Utils::decodePenJoinStyle ( QString  str)
static
Qt::PenStyle QgsSymbolLayerV2Utils::decodePenStyle ( QString  str)
static
QPointF QgsSymbolLayerV2Utils::decodePoint ( QString  str)
static
QVector< qreal > QgsSymbolLayerV2Utils::decodeRealVector ( const QString &  s)
static

Definition at line 414 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::create().

QgsSymbolV2::ScaleMethod QgsSymbolLayerV2Utils::decodeScaleMethod ( QString  str)
static
int QgsSymbolLayerV2Utils::decodeSldAlpha ( QString  str)
static
Qt::BrushStyle QgsSymbolLayerV2Utils::decodeSldBrushStyle ( QString  str)
static

Definition at line 300 of file qgssymbollayerv2utils.cpp.

References decodeBrushStyle().

Referenced by fillFromSld().

QFont::Style QgsSymbolLayerV2Utils::decodeSldFontStyle ( QString  str)
static

Definition at line 92 of file qgssymbollayerv2utils.cpp.

int QgsSymbolLayerV2Utils::decodeSldFontWeight ( QString  str)
static

Definition at line 112 of file qgssymbollayerv2utils.cpp.

Qt::PenCapStyle QgsSymbolLayerV2Utils::decodeSldLineCapStyle ( QString  str)
static

Definition at line 218 of file qgssymbollayerv2utils.cpp.

Referenced by lineFromSld().

Qt::PenJoinStyle QgsSymbolLayerV2Utils::decodeSldLineJoinStyle ( QString  str)
static

Definition at line 180 of file qgssymbollayerv2utils.cpp.

Referenced by lineFromSld().

QVector< qreal > QgsSymbolLayerV2Utils::decodeSldRealVector ( const QString &  s)
static

Definition at line 443 of file qgssymbollayerv2utils.cpp.

Referenced by lineFromSld().

QgsSymbolV2::OutputUnit QgsSymbolLayerV2Utils::decodeSldUom ( QString  str,
double *  scaleFactor 
)
static

Definition at line 377 of file qgssymbollayerv2utils.cpp.

References QgsSymbolV2::MapUnit, and QgsSymbolV2::MM.

bool QgsSymbolLayerV2Utils::displacementFromSldElement ( QDomElement &  element,
QPointF &  offset 
)
static
void QgsSymbolLayerV2Utils::drawStippledBackround ( QPainter *  painter,
QRect  rect 
)
static

Definition at line 551 of file qgssymbollayerv2utils.cpp.

Referenced by colorRampPreviewPixmap().

QString QgsSymbolLayerV2Utils::encodeBrushStyle ( Qt::BrushStyle  style)
static
QString QgsSymbolLayerV2Utils::encodeColor ( QColor  color)
static
QString QgsSymbolLayerV2Utils::encodeOutputUnit ( QgsSymbolV2::OutputUnit  unit)
static
QString QgsSymbolLayerV2Utils::encodePenCapStyle ( Qt::PenCapStyle  style)
static

Definition at line 188 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::properties().

QString QgsSymbolLayerV2Utils::encodePenJoinStyle ( Qt::PenJoinStyle  style)
static

Definition at line 150 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::properties().

QString QgsSymbolLayerV2Utils::encodePenStyle ( Qt::PenStyle  style)
static
QString QgsSymbolLayerV2Utils::encodePoint ( QPointF  point)
static
QString QgsSymbolLayerV2Utils::encodeRealVector ( const QVector< qreal > &  v)
static

Definition at line 399 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::properties().

QString QgsSymbolLayerV2Utils::encodeScaleMethod ( QgsSymbolV2::ScaleMethod  scaleMethod)
static
QString QgsSymbolLayerV2Utils::encodeSldAlpha ( int  alpha)
static

Definition at line 65 of file qgssymbollayerv2utils.cpp.

Referenced by fillToSld(), and lineToSld().

QString QgsSymbolLayerV2Utils::encodeSldBrushStyle ( Qt::BrushStyle  style)
static

Definition at line 269 of file qgssymbollayerv2utils.cpp.

References encodeBrushStyle().

Referenced by fillToSld().

QString QgsSymbolLayerV2Utils::encodeSldFontStyle ( QFont::Style  style)
static

Definition at line 81 of file qgssymbollayerv2utils.cpp.

Referenced by labelTextToSld().

QString QgsSymbolLayerV2Utils::encodeSldFontWeight ( int  weight)
static

Definition at line 100 of file qgssymbollayerv2utils.cpp.

Referenced by labelTextToSld().

QString QgsSymbolLayerV2Utils::encodeSldLineCapStyle ( Qt::PenCapStyle  style)
static

Definition at line 207 of file qgssymbollayerv2utils.cpp.

Referenced by lineToSld().

QString QgsSymbolLayerV2Utils::encodeSldLineJoinStyle ( Qt::PenJoinStyle  style)
static

Definition at line 169 of file qgssymbollayerv2utils.cpp.

Referenced by lineToSld().

QString QgsSymbolLayerV2Utils::encodeSldRealVector ( const QVector< qreal > &  v)
static

Definition at line 428 of file qgssymbollayerv2utils.cpp.

Referenced by lineToSld().

QString QgsSymbolLayerV2Utils::encodeSldUom ( QgsSymbolV2::OutputUnit  unit,
double *  scaleFactor 
)
static

Definition at line 356 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
void QgsSymbolLayerV2Utils::externalGraphicToSld ( QDomDocument &  doc,
QDomElement &  element,
QString  path,
QString  mime,
QColor  color,
double  size = -1 
)
static
bool QgsSymbolLayerV2Utils::externalMarkerFromSld ( QDomElement &  element,
QString &  path,
QString &  format,
int &  markIndex,
QColor &  color,
double &  size 
)
static
void QgsSymbolLayerV2Utils::externalMarkerToSld ( QDomDocument &  doc,
QDomElement &  element,
QString  path,
QString  format,
int *  markIndex = 0,
QColor  color = QColor(),
double  size = -1 
)
static
bool QgsSymbolLayerV2Utils::fillFromSld ( QDomElement &  element,
Qt::BrushStyle &  brushStyle,
QColor &  color 
)
static
void QgsSymbolLayerV2Utils::fillToSld ( QDomDocument &  doc,
QDomElement &  element,
Qt::BrushStyle  brushStyle,
QColor  color = QColor() 
)
static
bool QgsSymbolLayerV2Utils::functionFromSldElement ( QDomElement &  element,
QString &  function 
)
static
bool QgsSymbolLayerV2Utils::geometryFromSldElement ( QDomElement &  element,
QString &  geomFunc 
)
static

Definition at line 2223 of file qgssymbollayerv2utils.cpp.

References functionFromSldElement().

QgsStringMap QgsSymbolLayerV2Utils::getSvgParameterList ( QDomElement &  element)
static

Definition at line 2318 of file qgssymbollayerv2utils.cpp.

Referenced by fillFromSld(), and lineFromSld().

QgsStringMap QgsSymbolLayerV2Utils::getVendorOptionList ( QDomElement &  element)
static
bool QgsSymbolLayerV2Utils::hasExternalGraphic ( QDomElement &  element)
static

Definition at line 1031 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by needSvgFill(), and needSvgMarker().

bool QgsSymbolLayerV2Utils::hasWellKnownMark ( QDomElement &  element)
static

Definition at line 1070 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
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
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
double QgsSymbolLayerV2Utils::lineWidthScaleFactor ( const QgsRenderContext c,
QgsSymbolV2::OutputUnit  u 
)
static
QStringList QgsSymbolLayerV2Utils::listSvgFiles ( )
static

Return a list of all available svg files.

Definition at line 2771 of file qgssymbollayerv2utils.cpp.

References QgsApplication::svgPaths().

QStringList QgsSymbolLayerV2Utils::listSvgFilesAt ( QString  directory)
static

Return a list of svg files at the specified directory.

Definition at line 2795 of file qgssymbollayerv2utils.cpp.

QgsVectorColorRampV2 * QgsSymbolLayerV2Utils::loadColorRamp ( QDomElement &  element)
static
QgsSymbolV2 * QgsSymbolLayerV2Utils::loadSymbol ( QDomElement &  element)
static
QgsSymbolLayerV2 * QgsSymbolLayerV2Utils::loadSymbolLayer ( QDomElement &  element)
static
QgsSymbolV2Map QgsSymbolLayerV2Utils::loadSymbols ( QDomElement &  element)
static
void QgsSymbolLayerV2Utils::multiplyImageOpacity ( QImage *  image,
qreal  alpha 
)
static

Multiplies opacity of image pixel values with a (global) transparency value.

Definition at line 2607 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by QgsSVGFillSymbolLayer::applyPattern(), QgsLinePatternFillSymbolLayer::applyPattern(), QgsPointPatternFillSymbolLayer::applyPattern(), and QgsSvgMarkerSymbolLayerV2::renderPoint().

bool QgsSymbolLayerV2Utils::needEllipseMarker ( QDomElement &  element)
static

Definition at line 1133 of file qgssymbollayerv2utils.cpp.

References getVendorOptionList().

Referenced by createMarkerLayerFromSld().

bool QgsSymbolLayerV2Utils::needFontMarker ( QDomElement &  element)
static

Definition at line 1088 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by createMarkerLayerFromSld().

bool QgsSymbolLayerV2Utils::needLinePatternFill ( QDomElement &  element)
static
bool QgsSymbolLayerV2Utils::needMarkerLine ( QDomElement &  element)
static

Definition at line 1151 of file qgssymbollayerv2utils.cpp.

References hasWellKnownMark().

Referenced by createLineLayerFromSld().

bool QgsSymbolLayerV2Utils::needPointPatternFill ( QDomElement &  element)
static

Definition at line 1201 of file qgssymbollayerv2utils.cpp.

Referenced by createFillLayerFromSld().

bool QgsSymbolLayerV2Utils::needSvgFill ( QDomElement &  element)
static

Definition at line 1207 of file qgssymbollayerv2utils.cpp.

References hasExternalGraphic().

Referenced by createFillLayerFromSld().

bool QgsSymbolLayerV2Utils::needSvgMarker ( QDomElement &  element)
static

Definition at line 1128 of file qgssymbollayerv2utils.cpp.

References hasExternalGraphic().

Referenced by createMarkerLayerFromSld().

QString QgsSymbolLayerV2Utils::ogrFeatureStyleBrush ( const QColor &  fillColr)
static

Create ogr feature style string for brush.

Parameters
fillColrfill color

Definition at line 2179 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleFillSymbolLayerV2::ogrFeatureStyle().

QString QgsSymbolLayerV2Utils::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 
)
static

Create ogr feature style string for pen.

Definition at line 2105 of file qgssymbollayerv2utils.cpp.

References qgsDoubleNear().

Referenced by QgsSimpleFillSymbolLayerV2::ogrFeatureStyle(), and QgsSimpleLineSymbolLayerV2::ogrFeatureStyle().

bool QgsSymbolLayerV2Utils::onlineResourceFromSldElement ( QDomElement &  element,
QString &  path,
QString &  format 
)
static

Definition at line 2291 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by externalGraphicFromSld(), and externalMarkerFromSld().

bool QgsSymbolLayerV2Utils::opacityFromSldElement ( QDomElement &  element,
QString &  alphaFunc 
)
static

Definition at line 2021 of file qgssymbollayerv2utils.cpp.

References functionFromSldElement().

QColor QgsSymbolLayerV2Utils::parseColor ( QString  colorStr)
static

parse color definition with format "rgb(0,0,0)" or "0,0,0"

Definition at line 2538 of file qgssymbollayerv2utils.cpp.

Referenced by QgsCptCityArchive::gradientColorMap(), and QgsColorBrewerPalette::listSchemeColors().

QgsStringMap QgsSymbolLayerV2Utils::parseProperties ( QDomElement &  element)
static

Definition at line 2368 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by loadColorRamp(), and loadSymbolLayer().

double QgsSymbolLayerV2Utils::pixelSizeScaleFactor ( const QgsRenderContext c,
QgsSymbolV2::OutputUnit  u 
)
static
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 2761 of file qgssymbollayerv2utils.cpp.

Referenced by QgsLinePatternFillSymbolLayer::applyPattern(), QgsComposerMap::drawGrid(), and QgsComposerItem::imageSizeConsideringRotation().

bool QgsSymbolLayerV2Utils::rotationFromSldElement ( QDomElement &  element,
QString &  rotationFunc 
)
static
QDomElement QgsSymbolLayerV2Utils::saveColorRamp ( QString  name,
QgsVectorColorRampV2 ramp,
QDomDocument &  doc 
)
static
void QgsSymbolLayerV2Utils::saveProperties ( QgsStringMap  props,
QDomDocument &  doc,
QDomElement &  element 
)
static

Definition at line 2390 of file qgssymbollayerv2utils.cpp.

Referenced by saveColorRamp(), and saveSymbol().

QDomElement QgsSymbolLayerV2Utils::saveSymbol ( QString  symbolName,
QgsSymbolV2 symbol,
QDomDocument &  doc 
)
static
QDomElement QgsSymbolLayerV2Utils::saveSymbols ( QgsSymbolV2Map symbols,
QString  tagName,
QDomDocument &  doc 
)
static
void QgsSymbolLayerV2Utils::sortVariantList ( QList< QVariant > &  list,
Qt::SortOrder  order 
)
static

Sorts the passed list in requested order.

Definition at line 2747 of file qgssymbollayerv2utils.cpp.

References qgsVariantGreaterThan(), and qgsVariantLessThan().

QIcon QgsSymbolLayerV2Utils::symbolLayerPreviewIcon ( QgsSymbolLayerV2 layer,
QgsSymbolV2::OutputUnit  u,
QSize  size 
)
static
QString QgsSymbolLayerV2Utils::symbolNameToPath ( QString  name)
static
QString QgsSymbolLayerV2Utils::symbolPathToName ( QString  path)
static
QIcon QgsSymbolLayerV2Utils::symbolPreviewIcon ( QgsSymbolV2 symbol,
QSize  size 
)
static
QPixmap QgsSymbolLayerV2Utils::symbolPreviewPixmap ( QgsSymbolV2 symbol,
QSize  size 
)
static
bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld ( QDomElement &  element,
QString &  name,
QColor &  color,
QColor &  borderColor,
double &  borderWidth,
double &  size 
)
static
void QgsSymbolLayerV2Utils::wellKnownMarkerToSld ( QDomDocument &  doc,
QDomElement &  element,
QString  name,
QColor  color,
QColor  borderColor = QColor(),
double  borderWidth = -1,
double  size = -1 
)
static

The documentation for this class was generated from the following files: