Skip to content

Commit

Permalink
#9254: avoid break compatibility with the 2.0 api
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuarte47 committed Jan 2, 2014
1 parent a8c2d23 commit 2752107
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
12 changes: 11 additions & 1 deletion python/core/symbology-ng/qgssymbollayerv2utils.sip
Expand Up @@ -111,12 +111,22 @@ class QgsSymbolLayerV2Utils
QString &path, QString &mime,
QColor &color, double &size );

/** @deprecated Use wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle, double borderWidth, double size ) instead */
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor = QColor(), Qt::PenStyle borderStyle = Qt::SolidLine,
QString name, QColor color, QColor borderColor = QColor(),
double borderWidth = -1, double size = -1 ) /Deprecated/ ;
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle,
double borderWidth = -1, double size = -1 );
/** @deprecated Use wellKnownMarkerFromSld( QDomElement &element, QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle, double &borderWidth, double &size ) instead */
static bool wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor,
double &borderWidth, double &size ) /Deprecated/ ;
/** TODO: Enable to override deprecated wellKnownMarkerFromSld function
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,
Expand Down
15 changes: 15 additions & 0 deletions src/core/symbology-ng/qgssymbollayerv2utils.cpp
Expand Up @@ -1905,6 +1905,13 @@ bool QgsSymbolLayerV2Utils::externalMarkerFromSld( QDomElement &element,
return true;
}

void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor,
double borderWidth, double size )
{
wellKnownMarkerToSld( doc, element, name, color, borderColor, Qt::SolidLine, borderWidth, size );
}

void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle,
double borderWidth, double size )
Expand Down Expand Up @@ -1941,6 +1948,14 @@ void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement
}
}

bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor,
double &borderWidth, double &size )
{
Qt::PenStyle borderStyle;
return wellKnownMarkerFromSld( element, name, color, borderColor, borderStyle, borderWidth, size );
}

bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
double &borderWidth, double &size )
Expand Down
10 changes: 9 additions & 1 deletion src/core/symbology-ng/qgssymbollayerv2utils.h
Expand Up @@ -146,9 +146,17 @@ class CORE_EXPORT QgsSymbolLayerV2Utils
QString &path, QString &mime,
QColor &color, double &size );

/** @deprecated Use wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle, double borderWidth, double size ) instead */
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor = QColor(), Qt::PenStyle borderStyle = Qt::SolidLine,
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 );
/** @deprecated Use wellKnownMarkerFromSld( QDomElement &element, QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle, double &borderWidth, double &size ) instead */
static 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 );
Expand Down

0 comments on commit 2752107

Please sign in to comment.