62 if ( ! labelnode.
isNull() )
79 return QColor( red, green, blue );
107 if ( ! psymbnode.
isNull() )
110 return psymbelement.
text();
112 return QString(
"hard:circle" );
118 if ( ! psizenode.
isNull() )
145 sl->setColor( color );
146 sl->setOutlineColor( borderColor );
212 if ( modeValue ==
"Empty" )
216 else if ( modeValue ==
"Quantile" )
228 while ( !symbolnode.
isNull() )
238 label =
QString(
"%1 - %2" ).
arg( lowerValue, -1,
'f', 3 ).
arg( upperValue, -1,
'f', 3 );
261 while ( !symbolnode.
isNull() )
292 if ( !singlenode.
isNull() )
296 else if ( !graduatednode.
isNull() )
300 else if ( !continuousnode.
isNull() )
304 else if ( !uniquevaluenode.
isNull() )
357 if ( penstyle == Qt::NoPen )
361 else if ( penstyle == Qt::SolidLine )
365 else if ( penstyle == Qt::DashLine )
369 else if ( penstyle == Qt::DotLine )
373 else if ( penstyle == Qt::DashDotLine )
375 return "DashDotLine";
377 else if ( penstyle == Qt::DashDotDotLine )
379 return "DashDotDotLine";
381 else if ( penstyle == Qt::MPenStyle )
393 if ( penString ==
"NoPen" )
397 else if ( penString ==
"SolidLine" )
399 return Qt::SolidLine;
401 else if ( penString ==
"DashLine" )
405 else if ( penString ==
"DotLine" )
409 else if ( penString ==
"DashDotLine" )
411 return Qt::DashDotLine;
413 else if ( penString ==
"DashDotDotLine" )
415 return Qt::DashDotDotLine;
417 else if ( penString ==
"MPenStyle" )
419 return Qt::MPenStyle;
429 if ( brushstyle == Qt::NoBrush )
433 else if ( brushstyle == Qt::SolidPattern )
435 return "SolidPattern";
437 else if ( brushstyle == Qt::Dense1Pattern )
439 return "Dense1Pattern";
441 else if ( brushstyle == Qt::Dense2Pattern )
443 return "Dense2Pattern";
445 else if ( brushstyle == Qt::Dense3Pattern )
447 return "Dense3Pattern";
449 else if ( brushstyle == Qt::Dense4Pattern )
451 return "Dense4Pattern";
453 else if ( brushstyle == Qt::Dense5Pattern )
455 return "Dense5Pattern";
457 else if ( brushstyle == Qt::Dense6Pattern )
459 return "Dense6Pattern";
461 else if ( brushstyle == Qt::Dense7Pattern )
463 return "Dense7Pattern";
465 else if ( brushstyle == Qt::HorPattern )
469 else if ( brushstyle == Qt::VerPattern )
473 else if ( brushstyle == Qt::CrossPattern )
475 return "CrossPattern";
477 else if ( brushstyle == Qt::BDiagPattern )
479 return "BDiagPattern";
481 else if ( brushstyle == Qt::FDiagPattern )
483 return "FDiagPattern";
485 else if ( brushstyle == Qt::DiagCrossPattern )
487 return "DiagCrossPattern";
489 else if ( brushstyle == Qt::TexturePattern )
491 return "TexturePattern";
502 if ( brushString ==
"NoBrush" )
506 else if ( brushString ==
"SolidPattern" )
508 return Qt::SolidPattern;
510 else if ( brushString ==
"Dense1Pattern" )
512 return Qt::Dense1Pattern;
514 else if ( brushString ==
"Dense2Pattern" )
516 return Qt::Dense2Pattern;
518 else if ( brushString ==
"Dense3Pattern" )
520 return Qt::Dense3Pattern;
522 else if ( brushString ==
"Dense4Pattern" )
524 return Qt::Dense4Pattern;
526 else if ( brushString ==
"Dense5Pattern" )
528 return Qt::Dense5Pattern;
530 else if ( brushString ==
"Dense6Pattern" )
532 return Qt::Dense6Pattern;
534 else if ( brushString ==
"Dense7Pattern" )
536 return Qt::Dense7Pattern;
538 else if ( brushString ==
"HorPattern" )
540 return Qt::HorPattern;
542 else if ( brushString ==
"VerPattern" )
544 return Qt::VerPattern;
546 else if ( brushString ==
"CrossPattern" )
548 return Qt::CrossPattern;
550 else if ( brushString ==
"BDiagPattern" )
552 return Qt::BDiagPattern;
554 else if ( brushString ==
"FDiagPattern" )
556 return Qt::FDiagPattern;
558 else if ( brushString ==
"DiagCrossPattern" )
560 return Qt::DiagCrossPattern;
562 else if ( brushString ==
"TexturePattern" )
564 return Qt::TexturePattern;
static QString penStyle2QString(Qt::PenStyle penstyle)
static Qt::BrushStyle readBrushStyle(const QDomNode &synode)
static QgsOldSymbolMeta readSymbolMeta(const QDomNode &synode)
QString attribute(const QString &name, const QString &defValue) const
static double readOutlineWidth(const QDomNode &synode)
static QgsFeatureRendererV2 * readOldUniqueValueRenderer(const QDomNode &rnode, QGis::GeometryType geomType)
static Shape decodeShape(const QString &name, bool *ok=nullptr)
Attempts to decode a string representation of a shape name to the corresponding shape.
static QgsSymbolV2 * readOldSymbol(const QDomNode &synode, QGis::GeometryType geomType)
double toDouble(bool *ok) const
static float readMarkerSymbolSize(const QDomNode &synode)
static QString readMarkerSymbolName(const QDomNode &synode)
QDomNode nextSibling() const
QDomElement toElement() const
void append(const T &value)
static Qt::PenStyle qString2PenStyle(const QString &string)
static QgsFeatureRendererV2 * readOldSingleSymbolRenderer(const QDomNode &rnode, QGis::GeometryType geomType)
int toInt(bool *ok, int base) const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
static QgsFeatureRendererV2 * readOldGraduatedSymbolRenderer(const QDomNode &rnode, QGis::GeometryType geomType)
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
QDomNode namedItem(const QString &name) const
static Qt::BrushStyle qString2BrushStyle(const QString &string)
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
static QColor readSymbolColor(const QDomNode &synode, bool fillColor)
QString mid(int position, int n) const
Shape
Marker symbol shapes.
float toFloat(bool *ok) const
static Qt::PenStyle readOutlineStyle(const QDomNode &synode)
static QString brushStyle2QString(Qt::BrushStyle brushstyle)
Abstract base class for marker symbol layers.
static QgsFeatureRendererV2 * readOldRenderer(const QDomNode &layerNode, QGis::GeometryType geomType)
Read old renderer definition from XML and create matching new renderer.
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
Simple marker symbol layer, consisting of a rendered shape with solid fill color and an outline...