Quantum GIS API Documentation  1.7.4
Static Public Member Functions
QgsSymbolLayerV2Utils Class Reference

#include <qgssymbollayerv2utils.h>

List of all members.

Static Public Member Functions

static QString encodeColor (QColor color)
static QColor decodeColor (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 encodeBrushStyle (Qt::BrushStyle style)
static Qt::BrushStyle decodeBrushStyle (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 encodeOutputUnit (QgsSymbolV2::OutputUnit unit)
static QgsSymbolV2::OutputUnit decodeOutputUnit (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 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 name, QgsSymbolV2 *symbol, QDomDocument &doc, QgsSymbolV2Map *subSymbols=NULL)
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 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.

Detailed Description

Definition at line 26 of file qgssymbollayerv2utils.h.


Member Function Documentation

QIcon QgsSymbolLayerV2Utils::colorRampPreviewIcon ( QgsVectorColorRampV2 ramp,
QSize  size 
) [static]

Definition at line 253 of file qgssymbollayerv2utils.cpp.

References colorRampPreviewPixmap().

QPixmap QgsSymbolLayerV2Utils::colorRampPreviewPixmap ( QgsVectorColorRampV2 ramp,
QSize  size 
) [static]

Definition at line 258 of file qgssymbollayerv2utils.cpp.

References QgsVectorColorRampV2::color().

Referenced by colorRampPreviewIcon().

Qt::BrushStyle QgsSymbolLayerV2Utils::decodeBrushStyle ( QString  str) [static]

Definition at line 129 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleFillSymbolLayerV2::create().

QColor QgsSymbolLayerV2Utils::decodeColor ( QString  str) [static]

Definition at line 175 of file qgssymbollayerv2utils.cpp.

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

Referenced by loadSymbol().

Qt::PenCapStyle QgsSymbolLayerV2Utils::decodePenCapStyle ( QString  str) [static]

Definition at line 97 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::create().

Qt::PenJoinStyle QgsSymbolLayerV2Utils::decodePenJoinStyle ( QString  str) [static]

Definition at line 78 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::create().

Qt::PenStyle QgsSymbolLayerV2Utils::decodePenStyle ( QString  str) [static]
QPointF QgsSymbolLayerV2Utils::decodePoint ( QString  str) [static]
QVector< qreal > QgsSymbolLayerV2Utils::decodeRealVector ( const QString &  s) [static]

Definition at line 205 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::create().

QString QgsSymbolLayerV2Utils::encodeBrushStyle ( Qt::BrushStyle  style) [static]

Definition at line 106 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleFillSymbolLayerV2::properties().

QString QgsSymbolLayerV2Utils::encodeColor ( QColor  color) [static]

Definition at line 162 of file qgssymbollayerv2utils.cpp.

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

Referenced by saveSymbol().

QString QgsSymbolLayerV2Utils::encodePenCapStyle ( Qt::PenCapStyle  style) [static]

Definition at line 86 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::properties().

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

Definition at line 67 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 190 of file qgssymbollayerv2utils.cpp.

Referenced by QgsSimpleLineSymbolLayerV2::properties().

Returns the line width scale factor depending on the unit and the paint device.

Definition at line 681 of file qgssymbollayerv2utils.cpp.

References QgsRenderContext::mapToPixel(), QgsMapToPixel::mapUnitsPerPixel(), QgsSymbolV2::MM, and QgsRenderContext::scaleFactor().

Referenced by QgsSymbolV2RenderContext::outputLineWidth().

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 738 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by QgsSVGFillSymbolLayer::startRender().

QgsStringMap QgsSymbolLayerV2Utils::parseProperties ( QDomElement &  element) [static]

Definition at line 508 of file qgssymbollayerv2utils.cpp.

References QgsDebugMsg.

Referenced by loadColorRamp(), and loadSymbolLayer().

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

Definition at line 530 of file qgssymbollayerv2utils.cpp.

Referenced by saveColorRamp(), and saveSymbol().

QDomElement QgsSymbolLayerV2Utils::saveSymbol ( QString  name,
QgsSymbolV2 symbol,
QDomDocument &  doc,
QgsSymbolV2Map subSymbols = NULL 
) [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 800 of file qgssymbollayerv2utils.cpp.

References _QVariantGreaterThan(), and _QVariantLessThan().

QIcon QgsSymbolLayerV2Utils::symbolPreviewIcon ( QgsSymbolV2 symbol,
QSize  size 
) [static]
QPixmap QgsSymbolLayerV2Utils::symbolPreviewPixmap ( QgsSymbolV2 symbol,
QSize  size 
) [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines